Skip to content

Fix temperature/json issues with ConversationSimulator on managed#20236

Merged
smoorjani merged 2 commits intomlflow:masterfrom
xsh310:stack/retry-goal-check-when-temperature-is-unsupported
Jan 27, 2026
Merged

Fix temperature/json issues with ConversationSimulator on managed#20236
smoorjani merged 2 commits intomlflow:masterfrom
xsh310:stack/retry-goal-check-when-temperature-is-unsupported

Conversation

@xsh310
Copy link
Collaborator

@xsh310 xsh310 commented Jan 22, 2026

🥞 Stacked PR

Use this link to review incremental changes.


Related Issues/PRs

#xxx

What changes are proposed in this pull request?

We currently have a few issues when running conversation simulator on managed with FMAPI.

One issue is related to temperature, in conversation simulator we are setting the temperature param to 0.0 which is not supported for models like gpt-5. We have drop_params flags set to true for LiteLLM which works for OpenAI native api, but it does not seem to address the issue for datarbricks-managed models.

Screenshot 2026-01-26 at 7 05 54 AM

Another issue is related to json parsing, for models like databricks-claude-sonnet-4-5, the goal check returns non-json format consistently.

Screenshot 2026-01-26 at 7 08 34 AM

Both issues fails the goal check and the conversation simulation will continue until the max_turn is hit.

This PR adds a retry logic when the LiteLLM completion call returns a temperature error and also adds response format to the goal check.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Manual Testing

Tested with databricks notebook: https://e2-dogfood.staging.cloud.databricks.com/editor/notebooks/2791734932961460?o=6051921418418893

Verified goal check works for databricks default model
Screenshot 2026-01-26 at 9 10 32 AM

Verified goal check works for databricks gpt-5 model
Screenshot 2026-01-26 at 8 52 58 AM

Verified goal check works for databricks claude sonnet model
Screenshot 2026-01-26 at 7 18 16 AM

Verfieid goal check works for databricks gemini 3 pro model
Screenshot 2026-01-26 at 7 48 57 AM

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

What is a minor/patch release?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

@xsh310 xsh310 force-pushed the stack/retry-goal-check-when-temperature-is-unsupported branch from f464e02 to 9613fbd Compare January 22, 2026 20:32
@xsh310 xsh310 changed the title retry goal check when temperature is not supported Retry ConversationSimulator goal check when temperature is not supported Jan 22, 2026
@xsh310 xsh310 force-pushed the stack/retry-goal-check-when-temperature-is-unsupported branch 5 times, most recently from 44af55e to c515c4f Compare January 26, 2026 15:52
@xsh310 xsh310 changed the title Retry ConversationSimulator goal check when temperature is not supported Fix temperature/json issues with ConversationSimulator on managed Jan 26, 2026
@xsh310 xsh310 force-pushed the stack/retry-goal-check-when-temperature-is-unsupported branch from c515c4f to 127810b Compare January 26, 2026 17:02
Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
@xsh310 xsh310 force-pushed the stack/retry-goal-check-when-temperature-is-unsupported branch from 127810b to fcd3636 Compare January 26, 2026 17:16
@smoorjani smoorjani marked this pull request as ready for review January 26, 2026 17:22
@github-actions
Copy link
Contributor

🛠 DevTools 🛠

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/20236/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/20236/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/20236/merge

@github-actions github-actions bot added area/evaluation MLflow Evaluation rn/bug-fix Mention under Bug Fixes in Changelogs. labels Jan 26, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2026

Documentation preview for 5a7ae5c is available at:

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

Comment on lines +205 to +206
# Drop unsupported params (e.g., temperature=0 for certain models)
"drop_params": True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xsh310 @smoorjani @TomeHirata can we. define some standardized utilities for this stuff? I worry we have multiple LiteLLM call sites with different combinations of arguments throughout the code base

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbczumar Yes, agree. @smoorjani and I also discussed this. I think the long term solution would be to make our invocation adapters to be MLflow-level util and not eval-specific, and refactor this to use invocation adapters.

This would be a larger refactor and it's probably better to decouple these changes in separate PRs. I can add a ticket to keep track of this action item.

@smoorjani smoorjani enabled auto-merge January 27, 2026 05:02
@smoorjani smoorjani added this pull request to the merge queue Jan 27, 2026
Merged via the queue into mlflow:master with commit 49a244e Jan 27, 2026
46 checks passed
harupy pushed a commit to harupy/mlflow that referenced this pull request Jan 28, 2026
…flow#20236)

Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
Co-authored-by: Samraj Moorjani <samrajmoorjani@gmail.com>
harupy pushed a commit to harupy/mlflow that referenced this pull request Jan 28, 2026
…flow#20236)

Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
Co-authored-by: Samraj Moorjani <samrajmoorjani@gmail.com>
harupy pushed a commit that referenced this pull request Jan 28, 2026
…0236)

Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
Co-authored-by: Samraj Moorjani <samrajmoorjani@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/evaluation MLflow Evaluation rn/bug-fix Mention under Bug Fixes in Changelogs. v3.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants