Small edits (#865)

This commit is contained in:
pollfly
2024-07-01 10:07:19 +03:00
committed by GitHub
parent f4457456dd
commit d7a713d0be
16 changed files with 258 additions and 220 deletions

View File

@@ -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**.

View File

@@ -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: