Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion mlflow/utils/environment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import hashlib
import importlib.metadata
import logging
Expand Down Expand Up @@ -43,6 +44,14 @@
from mlflow.utils.timeout import MlflowTimeoutError, run_with_timeout
from mlflow.version import VERSION

_conda_header_dict = yaml.safe_load(
"""\
name: mlflow-env
channels:
- conda-forge
"""
)

_logger = logging.getLogger(__name__)

_conda_header = """\
Expand Down Expand Up @@ -257,7 +266,7 @@ def _mlflow_conda_env(
)
conda_deps.append("pip")

env = yaml.safe_load(_conda_header)
env = copy.deepcopy(_conda_header_dict)
env["dependencies"] = [f"python={PYTHON_VERSION}"]
env["dependencies"] += conda_deps
env["dependencies"].append({"pip": pip_deps})
Expand Down