Automated machine learning image build failures due to pip 20.0.1
Automated machine learning's docker image build fails due to the new version of pip (20.0.1) having issues with platform tags. Several packages are broken due to this and is being tracked here: https://github.com/pypa/pip/issues/7626
Workaround:
Using pip 19.3.1 version is the workaround. This can be specified using the RunConfiguration, which in turn picks the specified package versions while building the image.
from azureml.core.runconfig import RunConfiguration
from azureml.core.conda_dependencies import CondaDependencies
import pkg_resources
# create a new RunConfig object
conda_run_config = RunConfiguration(framework="python")
# Set compute target to AmlCompute
conda_run_config.target = compute_target
conda_run_config.environment.docker.enabled = True
cd = CondaDependencies.create(conda_packages=['pip==19.3.1'])
conda_run_config.environment.python.conda_dependencies = cd
In addition, AutoML configuration's run_configuration field needs to be updated with the conda_run_config created above. Sample for classification below:
sample_automl_settings = {
"iteration_timeout_minutes": 10,
"iterations": 10,
"n_cross_validations": 5,
"primary_metric": 'AUC_weighted',
"featurization": 'off',
"max_concurrent_iterations": 5,
"verbosity": logging.INFO
}
sample_automl_config = AutoMLConfig(
task='classification',
debug_log='automl_errors.log',
run_configuration=conda_run_config, # As defined above.
X=X,
y=y,
**sample_automl_settings)
Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
Confirmed with @skasturi - at the time of writing the post looks like pip released a new version which broke image builds. Looks like this has been resolved an no action is required. We can close this issue.
Yes. This post is no longer relevant as pip has released a new version that fixes this.