Compare commits

..

1 Commits

Author SHA1 Message Date
amlrelsa-ms
8e1211bef8 update samples from Release-131 as a part of 1.41.0 SDK stable release 2022-04-25 16:41:55 +00:00
9 changed files with 30 additions and 24 deletions

View File

@@ -15,9 +15,8 @@ dependencies:
- cudatoolkit=10.1.243
- scipy==1.5.2
- notebook
- pywin32==227
- pywin32==225
- PySocks==1.7.1
- Pygments==2.11.2
- conda-forge::pyqt==5.12.3
- pip:

View File

@@ -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/modules/generated/sklearn.datasets.load_diabetes.html). "
"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). "
]
},
{
@@ -279,9 +279,7 @@
"\n",
"\n",
"environment = Environment('my-sklearn-environment')\n",
"environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[\n",
" 'pip==20.2.4'],\n",
" pip_packages=[\n",
"environment.python.conda_dependencies = CondaDependencies.create(pip_packages=[\n",
" 'azureml-defaults',\n",
" 'inference-schema[numpy-support]',\n",
" 'joblib',\n",
@@ -480,9 +478,7 @@
"\n",
"\n",
"environment = Environment('my-sklearn-environment')\n",
"environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[\n",
" 'pip==20.2.4'],\n",
" pip_packages=[\n",
"environment.python.conda_dependencies = CondaDependencies.create(pip_packages=[\n",
" 'azureml-defaults',\n",
" 'inference-schema[numpy-support]',\n",
" 'joblib',\n",

View File

@@ -105,9 +105,7 @@
"from azureml.core.conda_dependencies import CondaDependencies\n",
"\n",
"environment=Environment('my-sklearn-environment')\n",
"environment.python.conda_dependencies = CondaDependencies.create(conda_packages=[\n",
" 'pip==20.2.4'],\n",
" pip_packages=[\n",
"environment.python.conda_dependencies = CondaDependencies.create(pip_packages=[\n",
" 'azureml-defaults',\n",
" 'inference-schema[numpy-support]',\n",
" 'numpy',\n",

View File

@@ -358,7 +358,6 @@
"# 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",

View File

@@ -242,7 +242,11 @@
" register(workspace=ws)\n",
"ray_cpu_build_details = ray_cpu_env.build(workspace=ws)\n",
"\n",
"ray_cpu_build_details.wait_for_completion(show_output=True)"
"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}')"
]
},
{
@@ -275,7 +279,11 @@
" register(workspace=ws)\n",
"ray_gpu_build_details = ray_gpu_env.build(workspace=ws)\n",
"\n",
"ray_gpu_build_details.wait_for_completion(show_output=True)"
"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}')"
]
},
{

View File

@@ -255,7 +255,11 @@
" register(workspace=ws)\n",
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
"\n",
"ray_env_build_details.wait_for_completion(show_output=True)"
"# 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}')"
]
},
{

View File

@@ -223,7 +223,11 @@
" register(workspace=ws)\n",
"ray_env_build_details = ray_environment.build(workspace=ws)\n",
"\n",
"ray_env_build_details.wait_for_completion(show_output=True)"
"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}')"
]
},
{

View File

@@ -8,8 +8,10 @@ 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.12.0 python=3.7 && conda clean -ay
RUN pip install ray-on-aml==0.1.6 & \
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 & \
pip install --no-cache-dir \
azureml-defaults \
azureml-dataset-runtime[fuse,pandas] \
@@ -30,5 +32,3 @@ RUN pip install ray-on-aml==0.1.6 & \
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

View File

@@ -246,9 +246,7 @@
"ray_environment = Environment. \\\n",
" from_dockerfile(name=ray_environment_name, dockerfile=ray_environment_dockerfile_path). \\\n",
" register(workspace=ws)\n",
"ray_cpu_build_details = ray_environment.build(workspace=ws)\n",
"\n",
"ray_cpu_build_details.wait_for_completion(show_output=True)"
"ray_gpu_build_details = ray_environment.build(workspace=ws)"
]
},
{