Skip to content

Commit 0538144

Browse files
Updating docstring
1 parent 05a409b commit 0538144

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

ads/model/datascience_model.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,14 +2254,21 @@ def create_custom_metadata_artifact(
22542254
The name of the model custom metadata key
22552255
22562256
artifact_path_or_content: Union[str,bytes]
2257-
The model custom metadata artifact path to be upload. It can also be the actual content of the defined metadata
2257+
The model custom metadata artifact path to be uploaded. It can also be the actual content of the custom metadata artifact
22582258
The type is string when it represents local path or oss path.
22592259
The type is bytes when it represents content itself
22602260
22612261
path_type: MetadataArtifactPathType
22622262
Can be either of MetadataArtifactPathType.LOCAL , MetadataArtifactPathType.OSS , MetadataArtifactPathType.CONTENT
22632263
Specifies what type of path is to be provided for metadata artifact.
2264-
Can be either local , oss or the actual content itself
2264+
2265+
Example:
2266+
>>> ds_model=DataScienceModel.from_id("ocid1.datasciencemodel.iad.xxyxz...")
2267+
>>> ds_model.create_custom_metadata_artifact(
2268+
... "README",
2269+
... artifact_path_or_content="/Users/<username>/Downloads/README.md",
2270+
... path_type=MetadataArtifactPathType.LOCAL
2271+
... )
22652272
22662273
Returns
22672274
-------
@@ -2307,7 +2314,7 @@ def create_defined_metadata_artifact(
23072314
The name of the model defined metadata key
23082315
23092316
artifact_path_or_content: Union[str,bytes]
2310-
The model defined metadata artifact path to be upload. It can also be the actual content of the defined metadata
2317+
The model defined metadata artifact path to be uploaded. It can also be the actual content of the defined metadata
23112318
The type is string when it represents local path or oss path.
23122319
The type is bytes when it represents content itself
23132320
@@ -2316,6 +2323,14 @@ def create_defined_metadata_artifact(
23162323
Specifies what type of path is to be provided for metadata artifact.
23172324
Can be either local , oss or the actual content itself
23182325
2326+
Example:
2327+
>>> ds_model=DataScienceModel.from_id("ocid1.datasciencemodel.iad.xxyxz...")
2328+
>>> ds_model.create_defined_metadata_artifact(
2329+
... "README",
2330+
... artifact_path_or_content="oci://path/to/bucket/README.md",
2331+
... path_type=MetadataArtifactPathType.OSS
2332+
... )
2333+
23192334
Returns
23202335
-------
23212336
ModelMetadataArtifactDetails
@@ -2360,7 +2375,7 @@ def update_custom_metadata_artifact(
23602375
The name of the model custom metadata key
23612376
23622377
artifact_path_or_content: Union[str,bytes]
2363-
The model custom metadata artifact path to be upload. It can also be the actual content of the defined metadata
2378+
The model custom metadata artifact path to be uploaded. It can also be the actual content of the custom metadata
23642379
The type is string when it represents local path or oss path.
23652380
The type is bytes when it represents content itself
23662381
@@ -2413,7 +2428,7 @@ def update_defined_metadata_artifact(
24132428
The name of the model defined metadata key
24142429
24152430
artifact_path_or_content: Union[str,bytes]
2416-
The model defined metadata artifact path to be upload. It can also be the actual content of the defined metadata
2431+
The model defined metadata artifact path to be uploaded. It can also be the actual content of the defined metadata
24172432
The type is string when it represents local path or oss path.
24182433
The type is bytes when it represents content itself
24192434

0 commit comments

Comments
 (0)