@@ -1478,22 +1478,24 @@ def add_artifact(
1478
1478
"""
1479
1479
Adds information about objects in a specified bucket to the model description JSON.
1480
1480
1481
- Parameters:
1482
- - namespace (str): The namespace of the object storage.
1483
- - bucket (str): The name of the bucket containing the objects.
1484
- - prefix (str, optional): The prefix used to filter objects within the bucket. Defaults to None.
1485
- - files (list of str, optional): A list of file names to include in the model description.
1486
- If provided, only objects with matching file names will be included. Defaults to None.
1481
+ Parameters
1482
+ ----------
1483
+ uri (str): The URI representing the location of the artifact in OCI object storage.
1484
+ files (list of str, optional): A list of file names to include in the model description.
1485
+ If provided, only objects with matching file names will be included. Defaults to None.
1487
1486
1488
- Returns:
1489
- - None
1487
+ Returns
1488
+ -------
1489
+ None
1490
1490
1491
- Raises:
1492
- - ValueError: If no files are found to add to the model description.
1491
+ Raises
1492
+ ------
1493
+ ValueError: If no files are found to add to the model description.
1493
1494
1494
- Note:
1495
+ Note
1496
+ ----
1495
1497
- If `files` is not provided, it retrieves information about all objects in the bucket.
1496
- If `files` is provided, it only retrieves information about objects with matching file names.
1498
+ If `files` is provided, it only retrieves information about objects with matching file names.
1497
1499
- If no objects are found to add to the model description, a ValueError is raised.
1498
1500
"""
1499
1501
@@ -1590,20 +1592,17 @@ def remove_artifact(self, uri: str):
1590
1592
"""
1591
1593
Removes information about objects in a specified bucket from the model description JSON.
1592
1594
1593
- Parameters:
1594
- - namespace (str): The namespace of the object storage.
1595
- - bucket (str): The name of the bucket containing the objects.
1596
- - prefix (str, optional): The prefix used to filter objects within the bucket. Defaults to None.
1595
+ Parameters
1596
+ ----------
1597
+ uri (str): The URI representing the location of the artifact in OCI object storage.
1597
1598
1598
- Returns:
1599
- - None
1599
+ Returns
1600
+ -------
1601
+ None
1600
1602
1601
- Note:
1602
- - This method removes information about objects in the specified bucket from the
1603
- instance of the ModelDescription.
1604
- - If a matching model (with the specified namespace, bucket name, and prefix) is found
1605
- in the model description JSON, it is removed.
1606
- - If no matching model is found, the method returns without making any changes.
1603
+ Raises
1604
+ ------
1605
+ ValueError: If the model description JSON is None.
1607
1606
"""
1608
1607
1609
1608
bucket , namespace , prefix = self ._extract_oci_uri_components (uri )
0 commit comments