Compare commits

...

4 Commits

Author SHA1 Message Date
amlrelsa-ms
b86191ed7f update samples from Release-144 as a part of SDK release 2022-06-03 17:28:37 +00:00
Harneet Virk
22753486de Merge pull request #1762 from Azure/release_update/Release-143
update samples from Release-143 as a part of  SDK release
2022-06-01 11:29:19 -07:00
amlrelsa-ms
cf1d1dbf01 update samples from Release-143 as a part of SDK release 2022-06-01 17:26:59 +00:00
Harneet Virk
2e45d9800d Merge pull request #1758 from Azure/release_update/Release-142
update samples from Release-142 as a part of  SDK release
2022-05-27 15:44:52 -07:00
12 changed files with 30 additions and 17 deletions

View File

@@ -17,6 +17,7 @@ dependencies:
- notebook
- pywin32==227
- PySocks==1.7.1
- jsonschema==4.5.1
- conda-forge::pyqt==5.12.3
- pip:

View File

@@ -519,6 +519,10 @@
"\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",
")"
]
},
@@ -662,7 +666,7 @@
"metadata": {},
"outputs": [],
"source": [
"conda_dep = automl_run.get_environment().python.conda_dependencies\n",
"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",

View File

@@ -361,7 +361,7 @@
"\n",
"batch_conda_deps = CondaDependencies.create(python_version=\"3.7\",\n",
" conda_packages=['pip==20.2.4'],\n",
" pip_packages=[\"tensorflow==1.15.2\", \"pillow\", \n",
" pip_packages=[\"tensorflow==1.15.2\", \"pillow\", \"protobuf==3.20.1\",\n",
" \"azureml-core\", \"azureml-dataset-runtime[fuse]\"])\n",
"batch_env = Environment(name=\"batch_environment\")\n",
"batch_env.python.conda_dependencies = batch_conda_deps\n",

View File

@@ -37,8 +37,7 @@ RUN pip install gym[atari]==0.19.0
RUN pip install gym[accept-rom-license]==0.19.0
# Install pip dependencies
RUN HOROVOD_WITH_TENSORFLOW=1 \
pip install 'matplotlib>=3.3,<3.4' \
RUN pip install 'matplotlib>=3.3,<3.4' \
'psutil>=5.8,<5.9' \
'tqdm>=4.59,<4.60' \
'pandas>=1.1,<1.2' \

View File

@@ -97,7 +97,7 @@
"import azureml.core\n",
"\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": [],
"source": [
"import azureml.core\n",
"print(\"Azure Machine Learning SDK version:\", azureml.core.VERSION)"
"print(\"Azure Machine Learning SDK Version:\", azureml.core.VERSION)"
]
},
{

View File

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

View File

@@ -30,5 +30,7 @@ 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 protobuf==3.20.0
RUN pip install --upgrade ray==0.8.3 \
ray[rllib,dashboard,tune]==0.8.3

View File

@@ -28,6 +28,8 @@ RUN cd multiagent-particle-envs && \
RUN pip3 install ray-on-aml==0.1.6
RUN pip install protobuf==3.20.0
RUN pip3 install --upgrade \
ray==0.8.7 \
ray[rllib]==0.8.7 \

View File

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

View File

@@ -5,17 +5,19 @@ import os
import argparse
import datetime
import time
import tensorflow as tf
import tensorflow.compat.v1 as tf
from math import ceil
import numpy as np
import sys
import shutil
from tensorflow.contrib.slim.python.slim.nets import inception_v3
import subprocess
import tf_slim
from azureml.core import Run
from azureml.core.model import Model
from azureml.core.dataset import Dataset
slim = tf.contrib.slim
slim = tf_slim
image_size = 299
num_channel = 3
@@ -32,16 +34,18 @@ def get_class_label_dict(labels_dir):
def init():
global g_tf_sess, probabilities, label_dict, input_images
subprocess.run(["git", "clone", "https://github.com/tensorflow/models/"])
sys.path.append("./models/research/slim")
parser = argparse.ArgumentParser(description="Start a tensorflow model serving")
parser.add_argument('--model_name', dest="model_name", required=True)
parser.add_argument('--labels_dir', dest="labels_dir", required=True)
args, _ = parser.parse_known_args()
from nets import inception_v3, inception_utils
label_dict = get_class_label_dict(args.labels_dir)
classes_num = len(label_dict)
with slim.arg_scope(inception_v3.inception_v3_arg_scope()):
tf.disable_v2_behavior()
with slim.arg_scope(inception_utils.inception_arg_scope()):
input_images = tf.placeholder(tf.float32, [1, image_size, image_size, num_channel])
logits, _ = inception_v3.inception_v3(input_images,
num_classes=classes_num,

View File

@@ -247,7 +247,7 @@
" config = AmlCompute.provisioning_configuration(vm_size=\"STANDARD_NC6\",\n",
" vm_priority=\"lowpriority\", \n",
" min_nodes=0, \n",
" max_nodes=1)\n",
" max_nodes=2)\n",
"\n",
" compute_target = ComputeTarget.create(workspace=ws, name=compute_name, provisioning_configuration=config)\n",
" compute_target.wait_for_completion(show_output=True, min_node_count=None, timeout_in_minutes=20)"
@@ -305,9 +305,10 @@
"from azureml.core.conda_dependencies import CondaDependencies\n",
"from azureml.core.runconfig import DEFAULT_GPU_IMAGE\n",
"\n",
"cd = CondaDependencies.create(python_version=\"3.7\",\n",
"cd = CondaDependencies.create(python_version=\"3.8\",\n",
" conda_packages=['pip==20.2.4'],\n",
" pip_packages=[\"tensorflow-gpu==1.15.2\",\n",
" pip_packages=[\"tensorflow-gpu==2.3.0\",\n",
" \"tf_slim==1.1.0\", \"protobuf==3.20.1\",\n",
" \"azureml-core\", \"azureml-dataset-runtime[fuse]\"])\n",
"\n",
"env = Environment(name=\"parallelenv\")\n",