Skip to content

Commit

Permalink
fix: override image id tag when running kubernetes (#7066)
Browse files Browse the repository at this point in the history
Signed-off-by: Subramaniam Ramasubramanian <subramaniam.r20jan@gmail.com>

Signed-off-by: Subramaniam Ramasubramanian <subramaniam.r20jan@gmail.com>
  • Loading branch information
subramaniam20jan committed Oct 17, 2022
1 parent fcdaf8b commit 8773d13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mlflow/projects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
)
from mlflow.projects.backend import loader
from mlflow.tracking.fluent import _get_experiment_id
from mlflow.utils.mlflow_tags import MLFLOW_PROJECT_ENV, MLFLOW_PROJECT_BACKEND, MLFLOW_RUN_NAME
from mlflow.utils.mlflow_tags import (
MLFLOW_PROJECT_ENV,
MLFLOW_PROJECT_BACKEND,
MLFLOW_RUN_NAME,
MLFLOW_DOCKER_IMAGE_ID,
)
from mlflow.utils import env_manager as _EnvManager
import mlflow.utils.uri

Expand Down Expand Up @@ -162,6 +167,9 @@ def _run(
skip_image_build=skip_image_build,
)
image_digest = kb.push_image_to_registry(image.tags[0])
tracking.MlflowClient().set_tag(
active_run.info.run_id, MLFLOW_DOCKER_IMAGE_ID, image_digest
)
submitted_run = kb.run_kubernetes_job(
project.name,
active_run,
Expand Down

0 comments on commit 8773d13

Please sign in to comment.