Add support for SGC run resumption from Databricks Jobs#19015
Add support for SGC run resumption from Databricks Jobs#19015artjen merged 13 commits intomlflow:masterfrom
Conversation
Signed-off-by: Arpit Jasapara <arpit.jasapara@databricks.com>
|
@artjen Thank you for the contribution! Could you fix the following issue(s)? ⚠ DCO checkThe DCO check failed. Please sign off your commit(s) by following the instructions here. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.md#sign-your-work for more details. |
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
|
Documentation preview for 336d0c0 is available at: More info
|
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
| client.set_experiment_tag( | ||
| exp_id_for_run, sgc_job_run_id_tag_key, active_run_obj.info.run_id | ||
| ) |
There was a problem hiding this comment.
Users have to specify the SERVERLESS_GPU_COMPUTE_ASSOCIATED_JOB_RUN_ID parameter in the running job to take effect:
try:
return dbutils.jobs.taskValues.get(
"SERVERLESS_GPU_COMPUTE_ASSOCIATED_JOB_RUN_ID", debugValue=None
)
except Exception as e:
_logger.debug(f"Failed to retrieve SGC job run ID from task values: {e}", exc_info=True)
return None
This means that non-SGC users will not add new experiment tags by default.
For SGC users, we can increase the tag limit on a case-by-case basis if this becomes an issue.
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
| return dbutils.jobs.taskValues.get( | ||
| "SERVERLESS_GPU_COMPUTE_ASSOCIATED_JOB_RUN_ID", debugValue=None | ||
| ) | ||
| except Exception as e: |
There was a problem hiding this comment.
[non blocker] is it possible to have more specific exceptions here?
There was a problem hiding this comment.
I want to ensure this will not disrupt the normal start_run flow. The error is reprinted in a debug message below for debugging if necessary.
XiaohanZhangCMU
left a comment
There was a problem hiding this comment.
thanks looks nice! left two nits.
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>

🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
Automatically associate a Databricks jobId with a MLflow run_id when specifying Databricks job parameter SERVERLESS_GPU_COMPUTE_ASSOCIATED_JOB_RUN_ID. This allows MLflow runs to be resumed across Databricks Job invocations automatically.
How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow 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" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould 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?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.