Small edits (#753)

This commit is contained in:
pollfly 2024-01-10 14:40:19 +02:00 committed by GitHub
parent c2a128a9b4
commit 0212637cec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 41 additions and 6 deletions

View File

@ -80,7 +80,7 @@ errors in identifying the correct default branch.
</div>
## Usage
These commands demonstrate a few useful use cases for `clearml-task`
These commands demonstrate a few useful use cases for `clearml-task`.
### Executing Code from a Remote Repository

View File

@ -799,9 +799,11 @@ APIClient. The body of the call must contain the ``queue-id`` and the tags to ad
For example, force workers on for a queue using the APIClient:
from clearml.backend_api.session.client import APIClient
client = APIClient()
client.queues.update(queue="<queue_id>", tags=["force_workers:on"]
```python
from clearml.backend_api.session.client import APIClient
client = APIClient()
client.queues.update(queue="<queue_id>", tags=["force_workers:on"])
```
Or, force workers on for a queue using the REST API:

View File

@ -335,6 +335,7 @@ You can enable offline mode in one of the following ways:
```python
from clearml import Dataset
# Use the set_offline class method before creating a Dataset
Dataset.set_offline(offline_mode=True)
# Create a dataset

View File

@ -25,6 +25,7 @@ in your workspace. The following code uses APIClient to retrieve a list of all p
```python
from clearml.backend_api.session.client import APIClient
# Create an instance of APIClient
client = APIClient()
project_list = client.projects.get_all(name="example*")

View File

@ -560,6 +560,7 @@ the `offline_mode` argument to `True`
```python
from clearml import Task
# Use the set_offline class method before initializing a Task
Task.set_offline(offline_mode=True)
# Initialize a Task
@ -594,6 +595,7 @@ Upload the execution data that the Task captured offline to the ClearML Server u
* [`Task.import_offline_session`](../references/sdk/task.md#taskimport_offline_session) class method
```python
from clearml import Task
Task.import_offline_session(session_folder_zip="path/to/session/.clearml/cache/offline/b786845decb14eecadf2be24affc7418.zip")
```

View File

@ -1136,6 +1136,7 @@ in your workspace. The following code uses APIClient to retrieve a list of all p
```python
from clearml.backend_api.session.client import APIClient
# Create an instance of APIClient
client = APIClient()
project_list = client.projects.get_all(name="example*")

View File

@ -97,6 +97,7 @@ All Tasks in the system can be accessed through their unique Task ID, or based o
method. For example:
```python
from clearml import Task
executed_task = Task.get_task(task_id='aabbcc')
```
@ -130,6 +131,7 @@ Users can programmatically change cloned experiments' parameters.
For example:
```python
from clearml import Task
cloned_task = Task.clone(task_id='aabbcc')
cloned_task.set_parameter(name='internal/magic', value=42)
```
@ -141,6 +143,7 @@ objects and files to a task anywhere from code.
```python
import numpy as np
from clearml import Task
Task.current_task().upload_artifact(name='a_file', artifact_object='local_file.bin')
Task.current_task().upload_artifact(name='numpy', artifact_object=np.ones(4,4))
```
@ -150,6 +153,7 @@ by accessing the Task that created them. These artifacts can be modified and upl
```python
from clearml import Task
executed_task = Task.get_task(task_id='aabbcc')
# artifact as a file
local_file = executed_task.artifacts['file'].get_local_copy()
@ -173,6 +177,7 @@ improves the visibility of your processes progress.
```python
from clearml import Logger
Logger.current_logger().report_scalar(
graph='metric',
series='variant',
@ -184,6 +189,7 @@ Logger.current_logger().report_scalar(
You can also retrieve reported scalars for programmatic analysis:
```python
from clearml import Task
executed_task = Task.get_task(task_id='aabbcc')
# get a summary of the min/max/last value of all reported scalars
min_max_values = executed_task.get_last_scalar_metrics()
@ -193,10 +199,11 @@ full_scalars = executed_task.get_reported_scalars()
#### Query Experiments
You can also search and query Tasks in the system. Use the [`Task.get_tasks`](../../references/sdk/task.md#taskget_tasks)
method to retrieve Task objects and filter based on the specific values of the Task - status, parameters, metrics and more!
class method to retrieve Task objects and filter based on the specific values of the Task - status, parameters, metrics and more!
```python
from clearml import Task
tasks = Task.get_tasks(
project_name='examples',
task_name='partial_name_match',

View File

@ -35,7 +35,7 @@ script.
This ID will be used in the following section.
## Building and Launching a Containerized Task
1. Execute the following command to build the container. Input the ID of the task created above.
1. Execute the following command to build the container. Input the ID of the task created above:
```console
clearml-agent build --id <TASK_ID> --docker --target new-docker --entry-point clone_task
```

View File

@ -14,6 +14,7 @@ the `offline_mode` argument to `True`
```python
from clearml import Task
# Use the set_offline class method before initializing a Task
Task.set_offline(offline_mode=True)
# Initialize a Task

View File

@ -13,6 +13,7 @@ All you have to do is simply add two lines of code to your AutoKeras script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -13,6 +13,7 @@ All you have to do is simply add two lines of code to your CatBoost script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -14,6 +14,7 @@ All you have to do is add two lines of code:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -13,6 +13,7 @@ All you have to do is simply add two lines of code to your `fastai` script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -16,6 +16,7 @@ All you have to do is add two lines of code:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -20,6 +20,7 @@ All you have to do is add two lines of code to your script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -14,6 +14,7 @@ All you have to do is simply add two lines of code to your Keras script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -14,6 +14,7 @@ All you have to do is simply add two lines of code to your LightGBM script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -13,6 +13,7 @@ All you have to do is simply add two lines of code to your MegEngine script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -9,6 +9,7 @@ All you have to do is add two lines of code:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -13,6 +13,7 @@ All you have to do is simply add two lines of code to your PyTorch script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -15,6 +15,7 @@ All you have to do is simply add two lines of code to your PyTorch Lightning scr
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -14,6 +14,7 @@ All you have to do is simply add two lines of code to your scikit-learn script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -13,6 +13,7 @@ lines of code to your script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -12,6 +12,7 @@ lines of code to your script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -13,6 +13,7 @@ to do is add two lines of code to your script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -14,6 +14,7 @@ All you have to do is simply add two lines of code to your TensorFlow script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -14,6 +14,7 @@ All you have to do is simply add two lines of code to your XGBoost script:
```python
from clearml import Task
task = Task.init(task_name="<task_name>", project_name="<project_name>")
```

View File

@ -58,6 +58,7 @@ names that start with `final`.
```python
from clearml import Task
task = Task.init(
project_name="My Project",
task_name="My Task",

View File

@ -8,6 +8,7 @@ Create the [PipelineController](../references/sdk/automation_controller_pipeline
the pipeline's execution logic:
```python
from clearml import PipelineController
pipe = PipelineController(
name="Pipeline Controller", project="Pipeline example", version="1.0.0"
)