Skip to content

Commit b7b4690

Browse files
authored
docs(py): minor fix for the tutorial (kubeflow#1058)
- in the previous section, the client is referred as `registry.method()` - suggest to the reader the expected import, useful for copy-paste Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>
1 parent eb7b82b commit b7b4690

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

clients/python/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,14 @@ In order to utilize this method you must instantiate an `upload_params` object w
201201
Common S3 env vars will be automatically read, such ass the access_key_id, etc. It can also be provided explicitly in the `S3Params` object if desired.
202202

203203
```python
204+
from model_registry.utils import S3Params
205+
204206
s3_upload_params = S3Params(
205207
bucket_name="my-bucket",
206208
s3_prefix="models/my_fraud_model",
207209
)
208210

209-
registered_model = client.upload_artifact_and_register_model(
211+
registered_model = registry.upload_artifact_and_register_model(
210212
name="hello_world_model",
211213
model_files_path="/home/user-01/models/model_training_01",
212214
# If the model consists of a single file, such as a .onnx file, you can specify that as well
@@ -243,12 +245,14 @@ First, you must ensure you are logged in the to appropriate OCI registry using
243245
Full example:
244246

245247
```python
248+
from model_registry.utils import OCIParams
249+
246250
oci_upload_params = OCIParams(
247251
base_image="busybox",
248252
oci_ref="registry.example.com/acme_org/hello_world_model:0.0.1"
249253
)
250254

251-
registered_model = client.upload_artifact_and_register_model(
255+
registered_model = registry.upload_artifact_and_register_model(
252256
name="hello_world_model",
253257
model_files_path="/home/user-01/models/model_training_01",
254258
# If the model consists of a single file, such as a .onnx file, you can specify that as well

0 commit comments

Comments
 (0)