Add info about turning off auto-logging (#84)

This commit is contained in:
pollfly 2021-10-11 09:52:14 +03:00 committed by GitHub
parent ac7f0bdb74
commit 1d43794c17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 7 deletions

View File

@ -378,12 +378,30 @@ After thirty minutes, it remains unchanged.
**Can I control what ClearML automatically logs?** <a id="controlling_logging"></a>
Yes! ClearML allows you to control automatic logging for `stdout`, `stderr`, and frameworks.
Yes! ClearML allows you to control automatic logging for `stdout`, `stderr`, and frameworks when initializing a Task
by calling the [`Task.init`](references/sdk/task.md#taskinit) method.
When initializing a Task by calling the `Task.init` method, provide the `auto_connect_frameworks` parameter to control
framework logging, and the `auto_connect_streams` parameter to control `stdout`, `stderr`, and standard logging. The
values are `True`, `False`, and a dictionary for fine-grain control. See [Task.init](references/sdk/task.md#classmethod-initproject_namenone-task_namenone-task_typetasktypestraining-training-tagsnone-reuse_last_task_idtrue-continue_last_taskfalse-output_urinone-auto_connect_arg_parsertrue-auto_connect_frameworkstrue-auto_resource_monitoringtrue-auto_connect_streamstrue).
To control a Task's framework logging, use the `auto_connect_framworks`. Turn off all automatic logging by setting the
parameter to `False`. For finer grained control of logged frameworks, input a dictionary, with framework-boolean pairs.
For example:
```python
auto_connect_frameworks={
'matplotlib': True, 'tensorflow': False, 'tensorboard': False, 'pytorch': True,
'xgboost': False, 'scikit': True, 'fastai': True, 'lightgbm': False,
'hydra': True, 'detect_repository': True, 'tfdefines': True, 'joblib': True,
}
```
To control the `stdout`, `stderr`, and standard logging, use the `auto_connect_streams` parameter.
To disable logging all three, set the parameter to `False`. For finer grained control, input a dictionary, where the keys are `stout`, `stderr`,
and `logging`, and the values are booleans. For example:
```python
auto_connect_streams={'stdout': True, 'stderr': True, 'logging': False}
```
See [`Task.init`](references/sdk/task.md#taskinit).
<br/>

View File

@ -154,6 +154,9 @@ task = Task.init(
)
```
When a Task is initialized, it automatically captures parameters and outputs from supported frameworks. To control what ClearML
automatically logs, see this [FAQ](../faq.md#controlling_logging).
Once a Task is created, the Task object can be accessed from anywhere in the code by calling [`Task.current_task`](../references/sdk/task.md#taskcurrent_task).
If multiple Tasks need to be created in the same process (for example, for logging multiple manual runs),

View File

@ -23,14 +23,16 @@ clearml-init
In ClearML, experiments are organized as [Tasks](../../fundamentals/task).
ClearML will automatically log your experiment and code once you integrate the ClearML [SDK](../../clearml_sdk.md) with your code.
At the beginning of your code, import the clearml package
ClearML will automatically log your experiment and code, including outputs and parameters from popular ML frameworks,
once you integrate the ClearML [SDK](../../clearml_sdk.md) with your code. To control what ClearML automatically logs, see this [FAQ](../../faq.md#controlling_logging).
At the beginning of your code, import the `clearml` package
```python
from clearml import Task
```
:::note
:::note Full Automatic Logging
To ensure full automatic logging it is recommended to import the ClearML package at the top of your entry script.
:::