@@ -1478,22 +1478,24 @@ def add_artifact(
14781478 """
14791479 Adds information about objects in a specified bucket to the model description JSON.
14801480
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.
14871486
1488- Returns:
1489- - None
1487+ Returns
1488+ -------
1489+ None
14901490
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.
14931494
1494- Note:
1495+ Note
1496+ ----
14951497 - 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.
14971499 - If no objects are found to add to the model description, a ValueError is raised.
14981500 """
14991501
@@ -1590,20 +1592,17 @@ def remove_artifact(self, uri: str):
15901592 """
15911593 Removes information about objects in a specified bucket from the model description JSON.
15921594
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.
15971598
1598- Returns:
1599- - None
1599+ Returns
1600+ -------
1601+ None
16001602
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.
16071606 """
16081607
16091608 bucket , namespace , prefix = self ._extract_oci_uri_components (uri )
0 commit comments