Skip to content

Commit e028cbb

Browse files
committed
Fixes the progress bar issue when exporting artifacts to the Model Catalog.
1 parent ca5766d commit e028cbb

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

ads/model/service/oci_datascience_model.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@
3838
)
3939

4040

41-
class ModelProvenanceNotFoundError(Exception): # pragma: no cover
41+
class ModelProvenanceNotFoundError(Exception): # pragma: no cover
4242
pass
4343

4444

45-
class ModelArtifactNotFoundError(Exception): # pragma: no cover
45+
class ModelArtifactNotFoundError(Exception): # pragma: no cover
4646
pass
4747

4848

49-
class ModelNotSavedError(Exception): # pragma: no cover
49+
class ModelNotSavedError(Exception): # pragma: no cover
5050
pass
5151

5252

53-
class ModelWithActiveDeploymentError(Exception): # pragma: no cover
53+
class ModelWithActiveDeploymentError(Exception): # pragma: no cover
5454
pass
5555

5656

@@ -410,7 +410,7 @@ def export_model_artifact(self, bucket_uri: str, region: str = None):
410410
# Show progress of exporting model artifacts
411411
self._wait_for_work_request(
412412
work_request_id=work_request_id,
413-
num_steps=3,
413+
num_steps=2,
414414
)
415415

416416
@check_for_model_id(
@@ -596,3 +596,7 @@ def _wait_for_work_request(self, work_request_id: str, num_steps: int = 3) -> No
596596
)
597597
else:
598598
break
599+
600+
while i < num_steps:
601+
progress.update()
602+
i += 1

docs/source/user_guide/model_catalog/model_catalog.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ If you don't have an Object Storage bucket, create one using the OCI SDK or the
12041204
12051205
Allow service datascience to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
12061206
1207-
Allow service objectstorage to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
1207+
Allow service objectstorage-<region> to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
12081208
12091209
Saving
12101210
======
@@ -1545,4 +1545,3 @@ In the next example, the model that was stored in the model catalog as part of t
15451545
.. code-block:: python3
15461546
15471547
mc.delete_model(mc_model.id)
1548-

docs/source/user_guide/model_registration/large_model_artifact.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you don't have an Object Storage bucket, create one using the OCI SDK or the
1313
1414
Allow service datascience to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
1515
16-
Allow service objectstorage to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
16+
Allow service objectstorage-<region> to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
1717
1818
See `API documentation <../../ads.model.html#id10>`__ for more details.
1919

docs/source/user_guide/model_registration/model_load.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ If you don't have an Object Storage bucket, create one using the OCI SDK or the
119119
120120
Allow service datascience to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
121121
122-
Allow service objectstorage to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
122+
Allow service objectstorage-<region> to manage object-family in compartment <compartment> where ALL {target.bucket.name='<bucket_name>'}
123123
124124
The following example loads a model using the large model artifact approach. The ``bucket_uri`` has the following syntax: ``oci://<bucket_name>@<namespace>/<path>/`` See `API documentation <../../ads.model.html#id4>`__ for more details.
125125

@@ -169,4 +169,4 @@ Alternatively the ``.from_id()`` method can be used to load registered or deploy
169169
bucket_uri=<oci://<bucket_name>@<namespace>/prefix/>,
170170
force_overwrite=True,
171171
remove_existing_artifact=True,
172-
)
172+
)

0 commit comments

Comments
 (0)