Predictedasset

Properties

  • connexion deprecated


  • 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: (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: (list[tuple[int, int, int, int, Label]]|None) = None,
   polygons: (list[tuple[list[list[int]], Label]]|None) = None,
   classifications: (list[Label]|None) = None, lines: (list[tuple[list[list[int]],
   Label]]|None) = None, points: (list[tuple[list[int], Label]]|None) = 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.

This method allowed string as label names, it's not longer the case

Examples

labels = deployment.list_labels()
one_annotation.overwrite(rectangles=[(10, 20, 30, 40, labels[0]), (50, 60, 20, 30, labels[1])])

Arguments

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

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

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

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

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


get_champion_prediction

get_champion_prediction()

Description

This will return a dict with data representing champion prediction of this asset


get_shadow_prediction

get_shadow_prediction()

Description

This will return a dict with data representing shadow prediction of this asset


get_review

get_review()

Description

This will return a dict with data representing the last review created on this asset