cosmotech.coal.cosmotech_api¶
cosmotech.coal.cosmotech_api.apis.DatasetApi
¶
Bases: DatasetApi, Connection
flowchart TD
cosmotech.coal.cosmotech_api.apis.DatasetApi[DatasetApi]
cosmotech.coal.cosmotech_api.objects.connection.Connection[Connection]
cosmotech.coal.cosmotech_api.objects.connection.Connection --> cosmotech.coal.cosmotech_api.apis.DatasetApi
click cosmotech.coal.cosmotech_api.apis.DatasetApi href "" "cosmotech.coal.cosmotech_api.apis.DatasetApi"
click cosmotech.coal.cosmotech_api.objects.connection.Connection href "" "cosmotech.coal.cosmotech_api.objects.connection.Connection"
Methods:
| Name | Description |
|---|---|
download_dataset |
|
download_parameter |
|
path_to_parts |
|
upload_dataset |
Upload a new dataset with optional tags and additional data. |
upload_dataset_parts |
Upload parts to an existing dataset. |
download_dataset(dataset_id)
¶
download_parameter(dataset_id)
¶
path_to_parts(_path, part_type)
staticmethod
¶
upload_dataset(dataset_name, as_files=(), as_db=(), tags=None, additional_data=None)
¶
Upload a new dataset with optional tags and additional data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_name
|
str
|
The name of the dataset to create |
required |
as_files
|
Optional[list[Union[Path, str]]]
|
List of file paths to upload as FILE type parts |
()
|
as_db
|
Optional[list[Union[Path, str]]]
|
List of file paths to upload as DB type parts |
()
|
tags
|
Optional[list[str]]
|
Optional list of tags to associate with the dataset |
None
|
additional_data
|
Optional[dict]
|
Optional dictionary of additional metadata |
None
|
Returns:
| Type | Description |
|---|---|
Dataset
|
The created Dataset object |
upload_dataset_parts(dataset_id, as_files=(), as_db=(), replace_existing=False)
¶
Upload parts to an existing dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
The ID of the existing dataset |
required |
as_files
|
Optional[list[Union[Path, str]]]
|
List of file paths to upload as FILE type parts |
()
|
as_db
|
Optional[list[Union[Path, str]]]
|
List of file paths to upload as DB type parts |
()
|
replace_existing
|
bool
|
If True, replace existing parts with same name |
False
|
Returns:
| Type | Description |
|---|---|
Dataset
|
The updated Dataset object |
cosmotech.coal.cosmotech_api.apis.RunApi
¶
Bases: RunApi, Connection
flowchart TD
cosmotech.coal.cosmotech_api.apis.RunApi[RunApi]
cosmotech.coal.cosmotech_api.objects.connection.Connection[Connection]
cosmotech.coal.cosmotech_api.objects.connection.Connection --> cosmotech.coal.cosmotech_api.apis.RunApi
click cosmotech.coal.cosmotech_api.apis.RunApi href "" "cosmotech.coal.cosmotech_api.apis.RunApi"
click cosmotech.coal.cosmotech_api.objects.connection.Connection href "" "cosmotech.coal.cosmotech_api.objects.connection.Connection"
Methods:
| Name | Description |
|---|---|
get_run_metadata |
|
get_run_metadata(organization_id, workspace_id, runner_id, run_id, include=None, exclude=None)
¶
cosmotech.coal.cosmotech_api.apis.RunnerApi
¶
Bases: RunnerApi, Connection
flowchart TD
cosmotech.coal.cosmotech_api.apis.RunnerApi[RunnerApi]
cosmotech.coal.cosmotech_api.objects.connection.Connection[Connection]
cosmotech.coal.cosmotech_api.objects.connection.Connection --> cosmotech.coal.cosmotech_api.apis.RunnerApi
click cosmotech.coal.cosmotech_api.apis.RunnerApi href "" "cosmotech.coal.cosmotech_api.apis.RunnerApi"
click cosmotech.coal.cosmotech_api.objects.connection.Connection href "" "cosmotech.coal.cosmotech_api.objects.connection.Connection"
Methods:
| Name | Description |
|---|---|
get_runner_metadata |
|
download_runner_data |
|
cosmotech.coal.cosmotech_api.apis.WorkspaceApi
¶
Bases: WorkspaceApi, Connection
flowchart TD
cosmotech.coal.cosmotech_api.apis.WorkspaceApi[WorkspaceApi]
cosmotech.coal.cosmotech_api.objects.connection.Connection[Connection]
cosmotech.coal.cosmotech_api.objects.connection.Connection --> cosmotech.coal.cosmotech_api.apis.WorkspaceApi
click cosmotech.coal.cosmotech_api.apis.WorkspaceApi href "" "cosmotech.coal.cosmotech_api.apis.WorkspaceApi"
click cosmotech.coal.cosmotech_api.objects.connection.Connection href "" "cosmotech.coal.cosmotech_api.objects.connection.Connection"
Methods:
| Name | Description |
|---|---|
list_filtered_workspace_files |
|
download_workspace_file |
|
upload_workspace_file |
|
cosmotech.coal.cosmotech_api.objects.Connection
¶
cosmotech.coal.cosmotech_api.objects.Parameters
¶
Methods:
| Name | Description |
|---|---|
format_parameters_list |
Format parameters from runner data as a list of dictionaries. |
write_parameters_to_json |
|
write_parameters_to_csv |
|
write_parameters |
|
format_parameters_list(runner_data)
staticmethod
¶
Format parameters from runner data as a list of dictionaries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runner_data
|
Any
|
Runner data object |
required |
Returns:
| Type | Description |
|---|---|
List[Dict[str, Any]]
|
List of parameter dictionaries |