Compare commits

...

1 Commits

Author SHA1 Message Date
amlrelsa-ms
73afd0ae54 update samples from Release-145 as a part of SDK release 2022-06-10 22:22:04 +00:00
10 changed files with 17 additions and 41 deletions

View File

@@ -513,17 +513,7 @@
"conda_run_config.environment.docker.enabled = True\n", "conda_run_config.environment.docker.enabled = True\n",
"\n", "\n",
"# specify CondaDependencies obj\n", "# specify CondaDependencies obj\n",
"conda_run_config.environment.python.conda_dependencies = (\n", "conda_run_config.environment = automl_run.get_environment()"
" automl_run.get_environment().python.conda_dependencies\n",
")\n",
"\n",
"conda_run_config.environment.python.conda_dependencies.add_pip_package(\n",
" \"dotnetcore2==2.1.23\"\n",
")\n",
"\n",
"conda_run_config.environment.python.conda_dependencies.add_pip_package(\n",
" \"protobuf==3.20.1\"\n",
")"
] ]
}, },
{ {
@@ -652,28 +642,6 @@
")" ")"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Create the conda dependencies for setting up the service\n",
"We need to create the conda dependencies comprising of the *azureml* packages using the training environment from the *automl_run*."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"conda_dep = conda_run_config.environment.python.conda_dependencies\n",
"\n",
"with open(\"myenv.yml\", \"w\") as f:\n",
" f.write(conda_dep.serialize_to_string())\n",
"with open(\"myenv.yml\", \"r\") as f:\n",
" print(f.read())"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
@@ -696,7 +664,7 @@
"metadata": {}, "metadata": {},
"source": [ "source": [
"### Deploy the service\n", "### Deploy the service\n",
"In the cell below, we deploy the service using the conda file and the scoring file from the previous steps. " "In the cell below, we deploy the service using the automl training environment and the scoring file from the previous steps. "
] ]
}, },
{ {
@@ -718,7 +686,7 @@
" description=\"Get local explanations for Machine test data\",\n", " description=\"Get local explanations for Machine test data\",\n",
")\n", ")\n",
"\n", "\n",
"myenv = Environment.from_conda_specification(name=\"myenv\", file_path=\"myenv.yml\")\n", "myenv = automl_run.get_environment()\n",
"inference_config = InferenceConfig(entry_script=\"score_explain.py\", environment=myenv)\n", "inference_config = InferenceConfig(entry_script=\"score_explain.py\", environment=myenv)\n",
"\n", "\n",
"# Use configs and models generated above\n", "# Use configs and models generated above\n",

View File

@@ -11,6 +11,7 @@ RUN pip install azureml-core
RUN pip install ray==0.8.7 RUN pip install ray==0.8.7
RUN pip install ray[rllib,tune,serve]==0.8.7 RUN pip install ray[rllib,tune,serve]==0.8.7
RUN pip install tensorflow==1.14.0 RUN pip install tensorflow==1.14.0
RUN pip install 'msrest<0.7.0'
RUN apt-get update RUN apt-get update
RUN apt-get install -y jq RUN apt-get install -y jq

View File

@@ -69,6 +69,8 @@ RUN pip install --no-cache-dir \
# This is required for ray 0.8.7 # This is required for ray 0.8.7
RUN pip install -U aiohttp==3.7.4 RUN pip install -U aiohttp==3.7.4
RUN pip install 'msrest<0.7.0'
# This is needed for mpi to locate libpython # This is needed for mpi to locate libpython
ENV LD_LIBRARY_PATH $AZUREML_CONDA_ENVIRONMENT_PATH/lib:$LD_LIBRARY_PATH ENV LD_LIBRARY_PATH $AZUREML_CONDA_ENVIRONMENT_PATH/lib:$LD_LIBRARY_PATH

View File

@@ -97,7 +97,7 @@
"import azureml.core\n", "import azureml.core\n",
"\n", "\n",
"# Check core SDK version number\n", "# Check core SDK version number\n",
"print(\"Azure Machine Learning SDK Version: \", azureml.core.VERSION)" "print(\"Azure Machine Learning SDK version: \", azureml.core.VERSION)"
] ]
}, },
{ {

View File

@@ -90,7 +90,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"import azureml.core\n", "import azureml.core\n",
"print(\"Azure Machine Learning SDK Version:\", azureml.core.VERSION)" "print(\"Azure Machine Learning SDK version:\", azureml.core.VERSION)"
] ]
}, },
{ {

View File

@@ -12,6 +12,7 @@ RUN pip install azureml-dataset-runtime
RUN pip install ray==0.8.7 RUN pip install ray==0.8.7
RUN pip install ray[rllib,tune,serve]==0.8.7 RUN pip install ray[rllib,tune,serve]==0.8.7
RUN pip install tensorflow==1.14.0 RUN pip install tensorflow==1.14.0
RUN pip install 'msrest<0.7.0'
RUN apt-get update RUN apt-get update
RUN apt-get install -y jq RUN apt-get install -y jq

View File

@@ -91,7 +91,7 @@
"source": [ "source": [
"import azureml.core\n", "import azureml.core\n",
"\n", "\n",
"print(\"Azure Machine Learning SDK Version:\", azureml.core.VERSION)" "print(\"Azure Machine Learning SDK version:\", azureml.core.VERSION)"
] ]
}, },
{ {

View File

@@ -34,3 +34,5 @@ RUN pip install protobuf==3.20.0
RUN pip install --upgrade ray==0.8.3 \ RUN pip install --upgrade ray==0.8.3 \
ray[rllib,dashboard,tune]==0.8.3 ray[rllib,dashboard,tune]==0.8.3
RUN pip install 'msrest<0.7.0'

View File

@@ -34,3 +34,5 @@ RUN pip3 install --upgrade \
ray==0.8.7 \ ray==0.8.7 \
ray[rllib]==0.8.7 \ ray[rllib]==0.8.7 \
ray[tune]==0.8.7 ray[tune]==0.8.7
RUN pip install 'msrest<0.7.0'

View File

@@ -85,7 +85,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"import azureml.core\n", "import azureml.core\n",
"print('Azure Machine Learning SDK Version: ', azureml.core.VERSION)" "print('Azure Machine Learning SDK version: ', azureml.core.VERSION)"
] ]
}, },
{ {