You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Set versions of packages in training and scoring #128
This led to binary incompatibility of the saved model when a new version of scikit-learn was released: #127, #126
For IaC best practices, we should use fixed versions for all packages in all environments.
Ideally we should also have a mechanism to define in a single place the names and versions of packages needed in training and scoring, to avoid redundancy and the risk of divergence.
Let's not forget about the requirements.txt file in the environment setup. It would be great to be consistent in using top-level packages with versions. Scoring dependencies should mirror a smaller version of the training requirements dependencies.
I'm preparing a PR, where we have 3 conda YAML environment definition (for training, scoring, and CI), and using conda-merge to merge all 3 for the build container. conda-merge should also fail in case of incompatible versions.
The impact of this would be to require the use of conda for dev, while today the repo happens to work also without conda. In practice using conda is an explicit requirement of the AML SDK and very useful for installing more advanced ML frameworks.
Looking at both of your code branches, here are some ideas:
Avoid using conda-merge and stick to three conda deps files:
scoring - smallest number of deps to just run inference
training - slightly more deps to enable train on remote compute
ci - training plus what is needed for container & local development (i.e. tox, flake8, pytest, etc)
IMO conda-merge adds more unnecessary tools and complexity
Use Sushant's environment code foundation to register and use the scoring/training AzML environments via those deps
scoring/training/ci deps should all have pinned versions which match each other
Looking at both of your code branches, here are some ideas:
Avoid using conda-merge and stick to three conda deps files:
scoring - smallest number of deps to just run inference
training - slightly more deps to enable train on remote compute
ci - training plus what is needed for container & local development (i.e. tox, flake8, pytest, etc)
IMO conda-merge adds more unnecessary tools and complexity
Use Sushant's environment code foundation to register and use the scoring/training AzML environments via those deps
scoring/training/ci deps should all have pinned versions which match each other
That's feasible. conda-merge surely has downsides, but I find it interesting that it protects from what I see time and time again - developers changing the version in training and forgetting to keep scoring in sync.
Perhaps we should change the layout to have the 3 conda files in a single dir, to help with that?
Activity
dtzar commentedon Jan 28, 2020
Let's not forget about the requirements.txt file in the environment setup. It would be great to be consistent in using top-level packages with versions. Scoring dependencies should mirror a smaller version of the training requirements dependencies.
algattik commentedon Jan 29, 2020
I'm preparing a PR, where we have 3 conda YAML environment definition (for training, scoring, and CI), and using conda-merge to merge all 3 for the build container. conda-merge should also fail in case of incompatible versions.
The impact of this would be to require the use of conda for dev, while today the repo happens to work also without conda. In practice using conda is an explicit requirement of the AML SDK and very useful for installing more advanced ML frameworks.
dtzar commentedon Jan 29, 2020
Sounds good Alexandre Gattiker (@algattik)! IMO we should weave this standardization in with https://docs.microsoft.com/en-us/azure/machine-learning/how-to-use-environments in the code.
I'd also prefer to use miniconda if possible so the overhead is less.
sudivate commentedon Jan 30, 2020
Alexandre Gattiker (@algattik) please take look at my branch. This is what I'm trying.
dtzar commentedon Jan 30, 2020
Looking at both of your code branches, here are some ideas:
IMO conda-merge adds more unnecessary tools and complexity
algattik commentedon Jan 30, 2020
Perhaps we should change the layout to have the 3 conda files in a single dir, to help with that?
dtzar commentedon Jan 30, 2020