https://www.boundaryml.com logo
🟡 Unit test timing out in CLI but not in VSCode
# questions
a
hey, I'm noticing an unit test is running fine in VScode but it seems to be timing out (and subsequently failing) when I run in cli. Would you happen to know what could be reason?
I think I know the reason, probably a false alarm
I'm not sure as the failed test doesn't show any debug message
on cli the test runs for 108 seconds and then fails, whereas in the VScode the test takes about 10 seconds to finish successfully
a
what version of the cli do you have?
do you use python or TS?
if you have a reproduction / baml_src you can share let us know -- it does sound super strange.
a
the rest of the 22 units are passing
a
can you run baml-cli --version
a
I'm running
uv sync --frozen  --prerelease=allow
, just to make sure things are synchronized
it's
baml-cli 0.202.1
i'm using python
I'm not sure if we can get any error logs for failed tests
g
Could you paste the
EvaluateQA
BAML function, too? I can try to reproduce this locally.
a
yes:
Copy code
function EvaluateQA(
  input: QAEvaluationInput
) -> Feedback {
  client ReasoningModels
  prompt #"
    Review the provided Q/A list against the text and constraints.

     **Task context**
    text: {{ input.text }}
    {% if input.instructions %}
    user instructions: {{ input.instructions }}
    {% endif %}
    hierarchical level: {{ input.level }}
    prompt: {{ Prompt() }}

    {% if input.keypoints %}
    Make sure the QA pair at least covers the following keypoints:
    {% for keypoint in input.keypoints %}
      - {{ keypoint }}
    {% endfor %}
    {% endif %}

    Question answer pairs:
    {% for qapair in input.qaList.qapairs %}
      - question: {{ qapair.question }}
        answer: {{ qapair.answer }}
    {% endfor %}


    Your response MUST be a single, valid JSON object matching the schema below. Do not include any other text, explanations, or markdown.
    {{ ctx.output_format }}
    "#
}
I think it's due to this client:
Copy code
client<llm> ReasoningModels {
  provider fallback
  options {
    // This will try the clients in order until one succeeds
    strategy [DeepSeekQwen_32b, DeepSeekQwen_8b, Phi_4]
  }
}
we aren't using this fallback approach for other functions
g
Ahh, very useful context, thanks! And how are DeepSeekQwen_32b et. al. defined? Are you running those in ollama?
a
we use vLLM
Copy code
client<llm> DeepSeekQwen_32b {
  provider openai-generic
  options {
    api_key env.SEEKR_API_KEY
    model "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
    max_tokens env.ALIGNMENT_MAX_TOKENS
    base_url env.SEEKR_API_BASE
    temperature 0.5
    default_role "user" // Required for using VLLM
  }
}
I guess I will comment out the test for now until there is a fix for this scenario
g
That's probably the best thing for now. I'm working on reproducing but don't have an answer for you yet.
@arindamkhaled4530 I'd also recommend trying each llm provider one at a time in baml-cli, rather than the fallback strategy. It's possible that some combination of baml-cli, fallback, and your provider's error is causing errors to not be reported. If you do that (run EvaluateQA in your tests with baml-cli using {DeepSeekQwen_32b | DeepSeekQwen_8b | Phi_4 } directly), and find a more useful error message, please let me know. That would help a lot in tracking down the issue.
a
I will try following the steps and will let you know if I find anything
I'm not seeing the issue with the latest version of BAML