mirror of
https://github.com/clearml/clearml-docs
synced 2025-06-26 18:17:44 +00:00
Small edits (#668)
This commit is contained in:
@@ -38,7 +38,7 @@ The example calls Matplotlib methods to log debug sample images. They appear in
|
||||
## Hyperparameters
|
||||
|
||||
ClearML automatically logs TensorFlow Definitions. A parameter dictionary is logged by connecting it to the Task, by
|
||||
calling the [`Task.connect`](../../../references/sdk/task.md#connect) method.
|
||||
calling [`Task.connect()`](../../../references/sdk/task.md#connect).
|
||||
|
||||
```python
|
||||
task_params = {'num_scatter_samples': 60, 'sin_max_value': 20, 'sin_steps': 30}
|
||||
|
||||
@@ -53,12 +53,11 @@ Text printed to the console for training progress, as well as all other console
|
||||
|
||||
## Configuration Objects
|
||||
|
||||
In the experiment code, a configuration dictionary is connected to the Task by calling the [`Task.connect`](../../../references/sdk/task.md#connect)
|
||||
method.
|
||||
In the experiment code, a configuration dictionary is connected to the Task by calling [`Task.connect()`](../../../references/sdk/task.md#connect).
|
||||
|
||||
```python
|
||||
task.connect_configuration(
|
||||
name="MyConfig"
|
||||
name="MyConfig",
|
||||
configuration={'test': 1337, 'nested': {'key': 'value', 'number': 1}}
|
||||
)
|
||||
```
|
||||
|
||||
@@ -30,7 +30,7 @@ By doubling clicking a thumbnail, you can view a spectrogram plot in the image v
|
||||
## Hyperparameters
|
||||
|
||||
ClearML automatically logs TensorFlow Definitions. A parameter dictionary is logged by connecting it to the Task using
|
||||
a call to the [Task.connect](../../../../../references/sdk/task.md#connect) method.
|
||||
[`Task.connect()`](../../../../../references/sdk/task.md#connect).
|
||||
|
||||
configuration_dict = {'number_of_epochs': 3, 'batch_size': 4, 'dropout': 0.25, 'base_lr': 0.001}
|
||||
configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml
|
||||
|
||||
@@ -14,15 +14,14 @@ The example code preprocesses the downloaded data using Pandas DataFrames, and s
|
||||
* `Outcome dictionary` - Label enumeration for training.
|
||||
* `Processed data` - A dictionary containing the paths of the training and validation data.
|
||||
|
||||
Each artifact is uploaded by calling the [Task.upload_artifact](../../../../../references/sdk/task.md#upload_artifact)
|
||||
method. Artifacts appear in the **ARTIFACTS** tab.
|
||||
Each artifact is uploaded by calling [`Task.upload_artifact()`](../../../../../references/sdk/task.md#upload_artifact).
|
||||
Artifacts appear in the **ARTIFACTS** tab.
|
||||
|
||||

|
||||
|
||||
## Plots (tables)
|
||||
|
||||
The example code explicitly reports the data in Pandas DataFrames by calling the [Logger.report_table](../../../../../references/sdk/logger.md#report_table)
|
||||
method.
|
||||
The example code explicitly reports the data in Pandas DataFrames by calling [`Logger.report_table()`](../../../../../references/sdk/logger.md#report_table).
|
||||
|
||||
For example, the raw data is read into a Pandas DataFrame named `train_set`, and the `head` of the DataFrame is reported.
|
||||
|
||||
@@ -39,8 +38,7 @@ The tables appear in **PLOTS**.
|
||||
|
||||
## Hyperparameters
|
||||
|
||||
A parameter dictionary is logged by connecting it to the Task using a call to the [`Task.connect`](../../../../../references/sdk/task.md#connect)
|
||||
method.
|
||||
A parameter dictionary is logged by connecting it to the Task using [`Task.connect()`](../../../../../references/sdk/task.md#connect).
|
||||
|
||||
```python
|
||||
logger = task.get_logger()
|
||||
|
||||
@@ -15,8 +15,7 @@ Accuracy, learning rate, and training loss appear in **SCALARS**, along with the
|
||||
## Hyperparameters
|
||||
|
||||
ClearML automatically logs the command line options, because the example code uses `argparse`. A parameter dictionary
|
||||
is logged by connecting it to the Task using a call to the [Task.connect](../../../../../references/sdk/task.md#connect)
|
||||
method.
|
||||
is logged by connecting it to the Task using [`Task.connect()`](../../../../../references/sdk/task.md#connect).
|
||||
|
||||
```python
|
||||
configuration_dict = {
|
||||
|
||||
@@ -10,8 +10,7 @@ The example script does the following:
|
||||
dataset
|
||||
* Creates an experiment named `pytorch mnist train with abseil` in the `examples` project
|
||||
* ClearML automatically logs the absl.flags, and the models (and their snapshots) created by PyTorch
|
||||
* Additional metrics are logged by calling the [Logger.report_scalar](../../../references/sdk/logger.md#report_scalar)
|
||||
method
|
||||
* Additional metrics are logged by calling [`Logger.report_scalar()`](../../../references/sdk/logger.md#report_scalar)
|
||||
|
||||
## Scalars
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@ 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),
|
||||
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**.
|
||||
|
||||
### Artifacts
|
||||
|
||||
The example uploads a dictionary as an artifact in the main Task by calling the [Task.upload_artifact](../../../references/sdk/task.md#upload_artifact)
|
||||
method on `Task.current_task` (the main Task). The dictionary contains the `dist.rank` of the subprocess, making each unique.
|
||||
The example uploads a dictionary as an artifact in the main Task by calling [`Task.upload_artifact()`](../../../references/sdk/task.md#upload_artifact)
|
||||
on `Task.current_task` (the main Task). The dictionary contains the `dist.rank` of the subprocess, making each unique.
|
||||
|
||||
Task.current_task().upload_artifact(
|
||||
'temp {:02d}'.format(dist.get_rank()), artifact_object={'worker_rank': dist.get_rank()})
|
||||
@@ -35,7 +35,7 @@ All of these artifacts appear in the main Task, **ARTIFACTS** **>** **OTHER**.
|
||||
|
||||
## Scalars
|
||||
|
||||
Report loss to the main Task by calling the [Logger.report_scalar](../../../references/sdk/logger.md#report_scalar) method
|
||||
Report loss to the main Task by calling [`Logger.report_scalar()`](../../../references/sdk/logger.md#report_scalar)
|
||||
on `Task.current_task().get_logger`, which is the logger for the main Task. Since `Logger.report_scalar` is called with the
|
||||
same title (`loss`), but a different series name (containing the subprocess' `rank`), all loss scalar series are logged together.
|
||||
|
||||
@@ -50,8 +50,7 @@ The single scalar plot for loss appears in **SCALARS**.
|
||||
|
||||
ClearML automatically logs the command line options defined using `argparse`.
|
||||
|
||||
A parameter dictionary is logged by connecting it to the Task using a call to the [`Task.connect`](../../../references/sdk/task.md#connect)
|
||||
method.
|
||||
A parameter dictionary is logged by connecting it to the Task using [`Task.connect()`](../../../references/sdk/task.md#connect).
|
||||
|
||||
```python
|
||||
param = {'worker_{}_stuff'.format(dist.get_rank()): 'some stuff ' + str(randint(0, 100))}
|
||||
|
||||
@@ -10,7 +10,7 @@ The example script does the following:
|
||||
dataset.
|
||||
* Creates an experiment named `pytorch mnist train` in the `examples` project.
|
||||
* ClearML automatically logs `argparse` command line options, and models (and their snapshots) created by PyTorch
|
||||
* Additional metrics are logged by calling the [Logger.report_scalar](../../../references/sdk/logger.md#report_scalar) method.
|
||||
* Additional metrics are logged by calling [`Logger.report_scalar()`](../../../references/sdk/logger.md#report_scalar).
|
||||
|
||||
## Scalars
|
||||
|
||||
|
||||
Reference in New Issue
Block a user