Add task progress indication (#250)

This commit is contained in:
pollfly 2022-05-11 10:44:39 +03:00 committed by GitHub
parent 2db95bbf3f
commit 26db382df9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 1 deletions

View File

@ -205,6 +205,33 @@ task = Task.create(
See [`Task.create`](../references/sdk/task.md#taskcreate) in the Python SDK reference.
### Tracking Task Progress
Track a tasks progress by setting the task progress property using the [`Task.set_progress`](../references/sdk/task.md#set_progress) method.
Set a tasks progress to a numeric value between 0 - 100. Access the tasks current progress, using the
[`Task.get_progress`](../references/sdk/task.md#get_progress) method.
```python
task = Task.init(project_name="examples", task_name="Track experiment progress")
task.set_progress(0)
# task doing stuff
task.set_progress(50)
print(task.get_progress())
# task doing more stuff
task.set_progress(100)
```
While the task is running, the WebApp will show the tasks progress indication in the experiment table, next to the
tasks status. If a task failed or was aborted, you can view how much progress it had made.
<div class="max-w-50">
![Experiment table progress indication](../img/fundamentals_task_progress.png)
</div>
Additionally, you can view a tasks progress in its [INFO](../webapp/webapp_exp_track_visual.md#general-information) tab
in the WebApp.
### Accessing Tasks
A Task can be identified by its project and name, and by a unique identifier (UUID string). The name and project of
a Task can be changed after an experiment has been executed, but its ID can't be changed.

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@ -28,7 +28,7 @@ The experiments table default and customizable columns are described in the foll
| **TYPE** | Type of experiment. ClearML supports multiple [task types](../fundamentals/task.md#task-types) for experimentation, and a variety of workflows and use cases. | Default |
| **NAME** | Experiment name. | Default |
| **TAGS** | Descriptive, user-defined, color-coded tags assigned to experiments. Use tags to classify experiments, and filter the list. See [tagging experiments](webapp_exp_track_visual.md#tagging-experiments). | Default |
| **STATUS** | Experiment state (status). See a list of the [task states and state transitions](../fundamentals/task.md#task-states). | Default |
| **STATUS** | Experiment state (status). See a list of the [task states and state transitions](../fundamentals/task.md#task-states). If you programmatically set task progress values, you will also see a progress indicator for Running, Failed, and Aborted tasks. See [here](../fundamentals/task.md#tracking-task-progress). | Default |
| **PROJECT** | Name of experiment's project. | Default |
| **USER** | User who created or cloned the experiment. | Default (hidden) |
| **STARTED** | Elapsed time since the experiment started. To view the date and time of start, hover over the elapsed time. | Default |

View File

@ -231,6 +231,8 @@ General experiment details appear in the **INFO** tab. This includes information
* Host name
* Processor
* Python version
* Experiment Progress
![Info tab](../img/webapp_tracking_31.png)