Compare commits
2 Commits
release_up
...
release_up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffa3a43979 | ||
|
|
7ce79a43f1 |
@@ -82,7 +82,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"## Create trained model\n",
|
"## Create trained model\n",
|
||||||
"\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",
|
||||||
"\n",
|
"\n",
|
||||||
"environment = Environment('my-sklearn-environment')\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",
|
" 'azureml-defaults',\n",
|
||||||
" 'inference-schema[numpy-support]',\n",
|
" 'inference-schema[numpy-support]',\n",
|
||||||
" 'joblib',\n",
|
" 'joblib',\n",
|
||||||
@@ -478,7 +480,9 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"environment = Environment('my-sklearn-environment')\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",
|
" 'azureml-defaults',\n",
|
||||||
" 'inference-schema[numpy-support]',\n",
|
" 'inference-schema[numpy-support]',\n",
|
||||||
" 'joblib',\n",
|
" 'joblib',\n",
|
||||||
|
|||||||
@@ -105,7 +105,9 @@
|
|||||||
"from azureml.core.conda_dependencies import CondaDependencies\n",
|
"from azureml.core.conda_dependencies import CondaDependencies\n",
|
||||||
"\n",
|
"\n",
|
||||||
"environment=Environment('my-sklearn-environment')\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",
|
" 'azureml-defaults',\n",
|
||||||
" 'inference-schema[numpy-support]',\n",
|
" 'inference-schema[numpy-support]',\n",
|
||||||
" 'numpy',\n",
|
" 'numpy',\n",
|
||||||
|
|||||||
@@ -358,6 +358,7 @@
|
|||||||
"# cause errors. Please take extra care when specifying your dependencies in a production environment.\n",
|
"# cause errors. Please take extra care when specifying your dependencies in a production environment.\n",
|
||||||
"myenv = CondaDependencies.create(\n",
|
"myenv = CondaDependencies.create(\n",
|
||||||
" python_version=python_version,\n",
|
" python_version=python_version,\n",
|
||||||
|
" conda_packages=['pip==20.2.4'],\n",
|
||||||
" pip_packages=['pyyaml', sklearn_dep, pandas_dep] + azureml_pip_packages)\n",
|
" pip_packages=['pyyaml', sklearn_dep, pandas_dep] + azureml_pip_packages)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"with open(\"myenv.yml\",\"w\") as f:\n",
|
"with open(\"myenv.yml\",\"w\") as f:\n",
|
||||||
|
|||||||
@@ -242,11 +242,7 @@
|
|||||||
" register(workspace=ws)\n",
|
" register(workspace=ws)\n",
|
||||||
"ray_cpu_build_details = ray_cpu_env.build(workspace=ws)\n",
|
"ray_cpu_build_details = ray_cpu_env.build(workspace=ws)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"import time\n",
|
"ray_cpu_build_details.wait_for_completion(show_output=True)"
|
||||||
"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}')"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -279,11 +275,7 @@
|
|||||||
" register(workspace=ws)\n",
|
" register(workspace=ws)\n",
|
||||||
"ray_gpu_build_details = ray_gpu_env.build(workspace=ws)\n",
|
"ray_gpu_build_details = ray_gpu_env.build(workspace=ws)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"import time\n",
|
"ray_gpu_build_details.wait_for_completion(show_output=True)"
|
||||||
"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}')"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -255,11 +255,7 @@
|
|||||||
" register(workspace=ws)\n",
|
" register(workspace=ws)\n",
|
||||||
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
|
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# import time\n",
|
"ray_env_build_details.wait_for_completion(show_output=True)"
|
||||||
"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}')"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -223,11 +223,7 @@
|
|||||||
" register(workspace=ws)\n",
|
" register(workspace=ws)\n",
|
||||||
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
|
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"import time\n",
|
"ray_env_build_details.wait_for_completion(show_output=True)"
|
||||||
"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}')"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,10 +8,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
rm -rf /usr/share/man/*
|
rm -rf /usr/share/man/*
|
||||||
|
|
||||||
RUN conda install -y conda=4.7.12 python=3.7 && conda clean -ay && \
|
RUN conda install -y conda=4.12.0 python=3.7 && conda clean -ay
|
||||||
pip install ray-on-aml==0.1.6 & \
|
RUN pip install ray-on-aml==0.1.6 & \
|
||||||
pip install --upgrade ray==0.8.3 \
|
|
||||||
ray[rllib,dashboard,tune]==0.8.3 & \
|
|
||||||
pip install --no-cache-dir \
|
pip install --no-cache-dir \
|
||||||
azureml-defaults \
|
azureml-defaults \
|
||||||
azureml-dataset-runtime[fuse,pandas] \
|
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 -y -c conda-forge x264='1!152.20180717' ffmpeg=4.0.2 && \
|
||||||
conda install -c anaconda opencv
|
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",
|
"ray_environment = Environment. \\\n",
|
||||||
" from_dockerfile(name=ray_environment_name, dockerfile=ray_environment_dockerfile_path). \\\n",
|
" from_dockerfile(name=ray_environment_name, dockerfile=ray_environment_dockerfile_path). \\\n",
|
||||||
" register(workspace=ws)\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