clearml-docs/docs/getting_started/ds/ds_first_steps.md

61 lines
1.9 KiB
Markdown
Raw Normal View History

2021-05-13 23:48:51 +00:00
---
title: First Steps
---
## Install ClearML
2021-09-09 10:17:46 +00:00
2021-05-13 23:48:51 +00:00
First, [sign up for free](https://app.community.clear.ml)
Install the clearml python package:
```bash
pip install clearml
```
Connect your computer to the server by [creating credentials](https://app.community.clear.ml/profile), then run the below and follow the setup instructions:
```bash
clearml-init
```
2021-09-09 10:17:46 +00:00
## Auto-log Experiment
2021-05-13 23:48:51 +00:00
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.
2021-08-30 05:55:47 +00:00
At the beginning of your code, import the clearml package
2021-05-13 23:48:51 +00:00
```python
2021-08-09 10:18:11 +00:00
from clearml import Task
2021-05-13 23:48:51 +00:00
```
:::note
To ensure full automatic logging it is recommended to import the ClearML package at the top of your entry script.
:::
Then initialize the Task object in your `main()` function, or the beginning of the script.
```python
2021-10-04 09:20:50 +00:00
task = Task.init(project_name='great project', task_name='best experiment')
2021-05-13 23:48:51 +00:00
```
Task name is not unique, it's possible to have multiple experiments with the same name.
If the project does not already exist, a new one will be created automatically.
The console should return the following output:
```
ClearML Task: created new task id=1ca59ef1f86d44bd81cb517d529d9e5a
2021-07-25 13:59:09
ClearML results page: https://community/projects/4043a1657f374e9298649c6ba72ad233/experiments/1ca59ef1f86d44bd81cb517d529d9e5a/output/log
2021-07-25 13:59:16
```
2021-05-13 23:48:51 +00:00
**Thats it!** You are done integrating ClearML with your code :)
Now, [command-line arguments](../../fundamentals/hyperparameters.md#argument-parser), [console output](../../fundamentals/logger#types-of-logged-results) as well as Tensorboard and Matplotlib will automatically be logged in the UI under the created Task.
<br/>
Sit back, relax, and watch your models converge :) or continue to see what else can be done with ClearML [here](ds_second_steps.md).