Skip to content

Commit b26c32b

Browse files
committed
Merge pull request #22 in ODSC/oci-data-science-ai-samples from merge_to_github2021-07-16-07-33-46 to github
* commit '5226083980661de8a3aab8d51895b8fe6cca743e': Releasing version
2 parents c604a58 + 5226083 commit b26c32b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

model_catalog_examples/artifact_boilerplate/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ MODEL_DEPLOYMENT:
7171
INFERENCE_CONDA_ENV:
7272
INFERENCE_ENV_SLUG: <insert-the-environment-slug> # for example mlcpuv1 see: https://docs.oracle.com/en-us/iaas/data-science/using/conda-gml-fam.htm
7373
INFERENCE_ENV_TYPE: <env-type> # can either be "published" or "data_science"
74-
INFERENCE_ENV_PATH: <conda-environment-path-on-object-storage> # For example:
74+
INFERENCE_ENV_PATH: <conda-environment-path-on-object-storage> # For example: "oci://service_conda_packs@ociodscdev/service_pack/cpu/General Machine Learning for CPUs/1.0/mlcpuv1"
7575
INFERENCE_PYTHON_VERSION: '3.7' #
7676
```
7777

78-
Go to this page(link to https://docs.oracle.com/en-us/iaas/data-science/using/model_runtime_yaml.htm) for a definition of all the parameters that can be included in `runtime.yaml`.
78+
Go to this page [link](https://docs.oracle.com/en-us/iaas/data-science/using/model_runtime_yaml.htm) for a definition of all the parameters that can be included in `runtime.yaml`.
7979

8080
As an example, here's a complete `runtime.yaml` for a data_science conda environment (mlcpuv1) used as a runtime environment for model deployment.
8181
In most cases the runtime environment for model deployment should be the same as the conda environment used to train the model.
@@ -110,14 +110,14 @@ Python version > 3.5 is required to run the tests. Before running the tests loca
110110
namely `pyyaml` and `requests`. This installation step is a one-time operation. Go to your artifact directory and run the following command:
111111

112112
```
113-
python3 -m pip install --user -r model-artifact-validation/requirements.txt
113+
python3 -m pip install --user -r artifact_introspection_test/requirements.txt
114114
```
115115

116116
### Running the Tests Locally
117117

118118
Next, replace `<artifact-path>` with the path to your model artifact directory
119119
```
120-
python3 model-artifact-validation/model_artifact_validate.py --artifact <artifact-path>
120+
python3 artifact_introspection_test/model_artifact_validate.py --artifact <artifact-path>
121121
```
122122

123123
The script automatically generates a report of the test results in the same folder . Two files are generated containing the test results in different formats:
Binary file not shown.

model_catalog_examples/artifact_boilerplate/artifact_introspection_test/model_artifact_validate.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ def model_deployment_find_fields(cfg) -> None:
6767
TESTS['runtime_env_path']['success'] = True
6868
TESTS['runtime_env_path']['value'] = value
6969
elif key == 'INFERENCE_PYTHON_VERSION':
70-
TESTS['runtime_env_python']['success'] = True
71-
TESTS['runtime_env_python']['value'] = value
70+
m = re.match(PYTHON_VER_PATTERN, str(value))
71+
if m and m.group():
72+
TESTS['runtime_env_python']['success'] = True
73+
TESTS['runtime_env_python']['value'] = value
7274
else:
7375
model_deployment_find_fields(value)
7476

0 commit comments

Comments
 (0)