2021-06-20 22:00:16 +00:00
|
|
|
---
|
|
|
|
title: Tasks
|
|
|
|
---
|
|
|
|
|
2021-10-21 06:40:53 +00:00
|
|
|
Hyper-Datasets extend the **ClearML** [**Task**](../fundamentals/task.md) with [Dataviews](dataviews.md)
|
2021-06-20 22:00:16 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2021-10-21 06:40:53 +00:00
|
|
|
Hyper-Datasets are supported by the `allegroai` python package.
|
2021-06-20 22:00:16 +00:00
|
|
|
|
|
|
|
### Connecting Dataviews to a Task
|
|
|
|
|
|
|
|
Use [`Task.connect`](../references/sdk/task.md#connect) to connect a Dataview object to a Task:
|
|
|
|
|
|
|
|
```python
|
2021-12-02 17:53:37 +00:00
|
|
|
from allegroai import DataView, Task
|
2021-06-20 22:00:16 +00:00
|
|
|
|
2021-12-02 17:53:37 +00:00
|
|
|
task = Task.init(project_name='examples', task_name='my task')
|
2021-06-20 22:00:16 +00:00
|
|
|
dataview = DataView()
|
|
|
|
task.connect(dataview)
|
|
|
|
```
|
|
|
|
|
|
|
|
### Accessing a Task's Dataviews
|
|
|
|
|
2021-07-15 13:46:18 +00:00
|
|
|
Use the `Task.get_dataviews` method to access the Dataviews that are connected to a Task.
|
2021-06-20 22:00:16 +00:00
|
|
|
|
|
|
|
```python
|
2021-12-02 17:53:37 +00:00
|
|
|
task.get_dataviews()
|
2021-06-20 22:00:16 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
This returns a dictionary of Dataview objects and their names.
|
|
|
|
|