mirror of
https://github.com/clearml/clearml-docs
synced 2025-06-26 18:17:44 +00:00
Small edits (#865)
This commit is contained in:
@@ -16,8 +16,8 @@ The script does the following:
|
||||
* Hyperparameters - Hyperparameters created in each subprocess Task are added to the main Task's hyperparameters.
|
||||
|
||||
|
||||
Each Task in a subprocess references the main Task by calling [`Task.current_task()`](../../../references/sdk/task.md#taskcurrent_task),
|
||||
which always returns the main Task.
|
||||
Each Task in a subprocess references the main Task by calling [`Task.current_task()`](../../../references/sdk/task.md#taskcurrent_task),
|
||||
which always returns the main Task.
|
||||
|
||||
1. When the script runs, it creates an experiment named `test torch distributed` in the `examples` project in the **ClearML Web UI**.
|
||||
|
||||
|
||||
@@ -25,23 +25,23 @@ Integrate ClearML with the following steps:
|
||||
1. Create a `ClearMLLogger` object. When the code runs, it connects to the ClearML backend, and creates a task in ClearML
|
||||
(see ClearMLLogger's parameters [below](#parameters)).
|
||||
|
||||
```python
|
||||
from ignite.contrib.handlers.clearml_logger import ClearMLLogger
|
||||
```python
|
||||
from ignite.contrib.handlers.clearml_logger import ClearMLLogger
|
||||
|
||||
clearml_logger = ClearMLLogger(project_name="examples", task_name="ignite")
|
||||
```
|
||||
clearml_logger = ClearMLLogger(project_name="examples", task_name="ignite")
|
||||
```
|
||||
|
||||
1. Attach helper handlers to the `ClearMLLogger` object.
|
||||
|
||||
For example, attach the `OutputHandler` to log training loss at each iteration:
|
||||
```python
|
||||
clearml_logger.attach(
|
||||
trainer,
|
||||
log_handler=OutputHandler(tag="training",
|
||||
output_transform=lambda loss: {"loss": loss}),
|
||||
event_name=Events.ITERATION_COMPLETED
|
||||
)
|
||||
```
|
||||
For example, attach the `OutputHandler` to log training loss at each iteration:
|
||||
```python
|
||||
clearml_logger.attach(
|
||||
trainer,
|
||||
log_handler=OutputHandler(tag="training",
|
||||
output_transform=lambda loss: {"loss": loss}),
|
||||
event_name=Events.ITERATION_COMPLETED
|
||||
)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
The following are the `ClearMLLogger` parameters:
|
||||
|
||||
Reference in New Issue
Block a user