src.routers.datasets module#

Endpoint to handle datasets

async src.routers.datasets.create_dataset(file: UploadFile = File(Ellipsis), dataset_name: str = Form(Ellipsis), project_name: str = Form(Ellipsis), connector: Connector = Form(Ellipsis), output_url: Optional[str] = Form(None)) DatasetModel[source]#

Create a new dataset, based on a dataset file uploaded to it

Parameters:
  • file (UploadFile, optional) – Archived dataset (e.g zip). Defaults to File(…).

  • dataset_name (str, optional) – Name of dataset. Defaults to Form(…).

  • project_name (str, optional) – Name of project to uplaod to. Defaults to Form(…).

  • connector (Connector) – Data connector to use.

  • output_url (Optional[str], optional) – Remote URL to upload file to. Defaults to Form(default=None).

Raises:
  • HTTPException – 413 Request Entity Too Large if dataset size is too large

  • HTTPException – 415 Unsupported Media Type if wrong file type

  • HTTPException – 500 Internal Server Error if any IOErrors

Returns:

Created dataset

Return type:

DatasetModel

async src.routers.datasets.get_dataset_by_id(dataset_id: str, connector: Connector = Query(Ellipsis)) DatasetModel[source]#

Get a dataset from it’s ID

Parameters:
  • dataset_id (str) – ID of dataset (e.g ClearML Dataset ID)

  • connector (Connector) – Data connector type

Raises:

HTTPException – 404 Not Found if dataset not found

Returns:

Dataset with that ID

Return type:

DatasetModel

src.routers.datasets.search_datasets(query: FindDatasetModel, connectors: Optional[List[Connector]] = Query(None)) List[Dict][source]#

Search endpoint for any datasets stored in the current data connector

Parameters:
Returns:

List of dataset metadata

Return type:

List[Dict]