Predictedasset

Properties


  • url Url
    This is generated by backend and expires after 1 hour. So this property might be out of date.
    Calling sync() method will retrieve a new url when expired.

  • id Id

  • object_name Object name

  • filename Filename



Methods

reset_url

reset_url()

Description

Reset url of this object


download

download(
   target_path: Union[str, Path] = './', force_replace: bool = False,
   use_id: bool = False
)

Description

Download this object into given target_path

Examples

data = clt.get_datalake().list_data(limit=1)
data.download('./data/')

Arguments

  • target_path (str, optional) : Target path where data will be downloaded. Defaults to './'.

  • force_replace (bool, optional) : Replace an existing file if exists. Defaults to False.

  • use_id (bool, optional) : If true, will download file with id and extension as file name. Defaults to False.


reset_url

reset_url()

Description

Reset url property of this Asset by calling platform.

Returns

A url as str of this Asset.


get_data

get_data()

Description

Retrieve data of this asset

data = asset.get_data()
assert data.id == asset.data_id
assert data.filename == asset.filename

Returns

A Data object


delete

delete()

Description

Delete this predicted asset from its deployment

⚠️ DANGER ZONE: Be very careful here!

Remove this predicted asset

Examples

one_asset.delete()

add_review

add_review(
   rectangles: Optional[list[tuple[int, int, int, int, str]]] = None,
   polygons: Optional[list[tuple[list[list[int]], str]]] = None,
   classifications: Optional[list[str]] = None
)

Description

Add a review to your predicted-asset.
It will then be used along the prediction for the monitoring.

⚠️ DANGER ZONE: You will not be able to change it afterward and
the monitoring metrics will not be able to be computed again with another review.

Examples

one_annotation.overwrite(rectangles=[(10, 20, 30, 40, label_cat), (50, 60, 20, 30, label_dog)])

Arguments

  • rectangles (list[tuple[int, int, int, int, str]], optional) : List of rectangles of this review. Defaults to None.

  • polygons (list[tuple[list[list[int]], str]], optional) : List of polygons of this review. Defaults to None.

  • classifications (list[str], optional) : List of classifications of this review. Defaults to None.