mirror of
https://github.com/Azure/MachineLearningNotebooks.git
synced 2025-12-19 17:17:04 -05:00
Merge pull request #1748 from Azure/release_update/Release-138
update samples from Release-138 as a part of SDK release
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
"source": [
|
||||
"## Create trained model\n",
|
||||
"\n",
|
||||
"For this example, we will train a small model on scikit-learn's [diabetes dataset](https://scikit-learn.org/stable/datasets/index.html#diabetes-dataset). "
|
||||
"For this example, we will train a small model on scikit-learn's [diabetes dataset](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_diabetes.html). "
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -279,7 +279,9 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"environment = Environment('my-sklearn-environment')\n",
|
||||
"environment.python.conda_dependencies = CondaDependencies.create(pip_packages=[\n",
|
||||
"environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[\n",
|
||||
" 'pip==20.2.4'],\n",
|
||||
" pip_packages=[\n",
|
||||
" 'azureml-defaults',\n",
|
||||
" 'inference-schema[numpy-support]',\n",
|
||||
" 'joblib',\n",
|
||||
@@ -478,7 +480,9 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"environment = Environment('my-sklearn-environment')\n",
|
||||
"environment.python.conda_dependencies = CondaDependencies.create(pip_packages=[\n",
|
||||
"environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[\n",
|
||||
" 'pip==20.2.4'],\n",
|
||||
" pip_packages=[\n",
|
||||
" 'azureml-defaults',\n",
|
||||
" 'inference-schema[numpy-support]',\n",
|
||||
" 'joblib',\n",
|
||||
|
||||
@@ -105,7 +105,9 @@
|
||||
"from azureml.core.conda_dependencies import CondaDependencies\n",
|
||||
"\n",
|
||||
"environment=Environment('my-sklearn-environment')\n",
|
||||
"environment.python.conda_dependencies = CondaDependencies.create(pip_packages=[\n",
|
||||
"environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[\n",
|
||||
" 'pip==20.2.4'],\n",
|
||||
" pip_packages=[\n",
|
||||
" 'azureml-defaults',\n",
|
||||
" 'inference-schema[numpy-support]',\n",
|
||||
" 'numpy',\n",
|
||||
|
||||
@@ -358,6 +358,7 @@
|
||||
"# cause errors. Please take extra care when specifying your dependencies in a production environment.\n",
|
||||
"myenv = CondaDependencies.create(\n",
|
||||
" python_version=python_version,\n",
|
||||
" conda_packages=['pip==20.2.4'],\n",
|
||||
" pip_packages=['pyyaml', sklearn_dep, pandas_dep] + azureml_pip_packages)\n",
|
||||
"\n",
|
||||
"with open(\"myenv.yml\",\"w\") as f:\n",
|
||||
|
||||
@@ -242,11 +242,7 @@
|
||||
" register(workspace=ws)\n",
|
||||
"ray_cpu_build_details = ray_cpu_env.build(workspace=ws)\n",
|
||||
"\n",
|
||||
"import time\n",
|
||||
"while ray_cpu_build_details.status not in ['Succeeded', 'Failed']:\n",
|
||||
" print(f'Awaiting completion of ray CPU environment build. Current status is: {ray_cpu_build_details.status}')\n",
|
||||
" time.sleep(30)\n",
|
||||
"print(f'status={ray_cpu_build_details.status}')"
|
||||
"ray_cpu_build_details.wait_for_completion(show_output=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -279,11 +275,7 @@
|
||||
" register(workspace=ws)\n",
|
||||
"ray_gpu_build_details = ray_gpu_env.build(workspace=ws)\n",
|
||||
"\n",
|
||||
"import time\n",
|
||||
"while ray_gpu_build_details.status not in ['Succeeded', 'Failed']:\n",
|
||||
" print(f'Awaiting completion of ray GPU environment build. Current status is: {ray_gpu_build_details.status}')\n",
|
||||
" time.sleep(30)\n",
|
||||
"print(f'status={ray_gpu_build_details.status}')"
|
||||
"ray_gpu_build_details.wait_for_completion(show_output=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -255,11 +255,7 @@
|
||||
" register(workspace=ws)\n",
|
||||
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
|
||||
"\n",
|
||||
"# import time\n",
|
||||
"while ray_env_build_details.status not in ['Succeeded', 'Failed']:\n",
|
||||
" print(f'Awaiting completion of environment build. Current status is: {ray_env_build_details.status}')\n",
|
||||
" time.sleep(30)\n",
|
||||
"print(f'status={ray_env_build_details.status}')"
|
||||
"ray_env_build_details.wait_for_completion(show_output=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -223,11 +223,7 @@
|
||||
" register(workspace=ws)\n",
|
||||
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
|
||||
"\n",
|
||||
"import time\n",
|
||||
"while ray_env_build_details.status not in ['Succeeded', 'Failed']:\n",
|
||||
" print(f'Awaiting completion of environment build. Current status is: {ray_env_build_details.status}')\n",
|
||||
" time.sleep(30)\n",
|
||||
"print(f'status={ray_env_build_details.status}')"
|
||||
"ray_env_build_details.wait_for_completion(show_output=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,10 +8,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /usr/share/man/*
|
||||
|
||||
RUN conda install -y conda=4.7.12 python=3.7 && conda clean -ay && \
|
||||
pip install ray-on-aml==0.1.6 & \
|
||||
pip install --upgrade ray==0.8.3 \
|
||||
ray[rllib,dashboard,tune]==0.8.3 & \
|
||||
RUN conda install -y conda=4.12.0 python=3.7 && conda clean -ay
|
||||
RUN pip install ray-on-aml==0.1.6 & \
|
||||
pip install --no-cache-dir \
|
||||
azureml-defaults \
|
||||
azureml-dataset-runtime[fuse,pandas] \
|
||||
@@ -32,3 +30,5 @@ RUN conda install -y conda=4.7.12 python=3.7 && conda clean -ay && \
|
||||
conda install -y -c conda-forge x264='1!152.20180717' ffmpeg=4.0.2 && \
|
||||
conda install -c anaconda opencv
|
||||
|
||||
RUN pip install --upgrade ray==0.8.3 \
|
||||
ray[rllib,dashboard,tune]==0.8.3
|
||||
@@ -246,7 +246,9 @@
|
||||
"ray_environment = Environment. \\\n",
|
||||
" from_dockerfile(name=ray_environment_name, dockerfile=ray_environment_dockerfile_path). \\\n",
|
||||
" register(workspace=ws)\n",
|
||||
"ray_gpu_build_details = ray_environment.build(workspace=ws)"
|
||||
"ray_cpu_build_details = ray_environment.build(workspace=ws)\n",
|
||||
"\n",
|
||||
"ray_cpu_build_details.wait_for_completion(show_output=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user