mirror of
https://github.com/clearml/clearml-docs
synced 2025-02-07 13:21:46 +00:00
Edit clearml-task code snippets (#176)
This commit is contained in:
parent
a10ef71a65
commit
1667d6b64e
@ -84,7 +84,7 @@ These commands demonstrate a few useful use cases for `clearml-task`
|
||||
### Executing Code from a Remote Repository
|
||||
|
||||
```bash
|
||||
clearml-task --project examples --name remote_test --repo https://github.com/allegroai/events.git --script /webinar-0620/keras_mnist.py --args batch_size=64 epochs=1 --queue default
|
||||
clearml-task --project examples --name remote_test --repo https://github.com/allegroai/events.git --branch master --script /webinar-0620/keras_mnist.py --args batch_size=64 epochs=1 --queue default
|
||||
```
|
||||
|
||||
The `keras_mnist.py` script from the [events](https://github.com/allegroai/events) GitHub repository is imported as a
|
||||
@ -95,7 +95,7 @@ are set, and the task is enqueued for execution on the `default` queue.
|
||||
Using `clearml-task` to execute a local script is very similar to using it with a [remote repo](#executing-code-from-a-remote-repository).
|
||||
|
||||
```bash
|
||||
clearml-task --project examples --name local_test --script keras_mnist.py --requirements requirements.txt --args epochs=1 --queue default
|
||||
clearml-task --project examples --name local_test --script keras_mnist.py --branch master --requirements requirements.txt --args epochs=1 --queue default
|
||||
```
|
||||
|
||||
The `keras_mnist.py` script on the user's local machine is imported as a ClearML task named `local_test` in the `examples` project.
|
||||
@ -108,7 +108,7 @@ The task is enqueued for execution on the `default` queue.
|
||||
### Pushing a Script to the Server
|
||||
|
||||
```bash
|
||||
clearml-task --project examples --name no_execute --script keras_mnist.py --requirements requirements.txt --args epochs=1
|
||||
clearml-task --project examples --name no_execute --script keras_mnist.py --branch master --requirements requirements.txt --args epochs=1
|
||||
```
|
||||
|
||||
The `keras_mnist.py` script on the user's local machine is imported as a ClearML task named `no_execute` in the `examples` project.
|
||||
|
@ -14,7 +14,7 @@ on a remote or local machine, from a remote repository and your local machine.
|
||||
### Executing Code from a Remote Repository
|
||||
|
||||
``` bash
|
||||
clearml-task --project keras_examples --name remote_test --repo https://github.com/allegroai/events.git --script /webinar-0620/keras_mnist.py --args batch_size=64 epochs=1 --queue default
|
||||
clearml-task --project keras_examples --name remote_test --repo https://github.com/allegroai/events.git --branch master --script /webinar-0620/keras_mnist.py --args batch_size=64 epochs=1 --queue default
|
||||
```
|
||||
|
||||
This sets the following arguments:
|
||||
@ -22,6 +22,7 @@ This sets the following arguments:
|
||||
* `--project keras_examples --name remote_test` - The project and experiment names
|
||||
* `--repo https://github.com/allegroai/events.git` - The repository's URL. By default, `clearml-task` uses the latest
|
||||
commit from the master branch
|
||||
* `--branch master` - The repository branch
|
||||
* `--script /webinar-0620/keras_mnist.py` - The script to be executed
|
||||
* `--args batch_size=64 epochs=1` - Arguments passed to the script. This uses the `argparse` object to get CLI parameters
|
||||
* `--queue default` - Selected queue to send the experiment to
|
||||
@ -54,7 +55,7 @@ For this example, use a local version of [this script](https://github.com/allegr
|
||||
1. Run the following command:
|
||||
|
||||
```bash
|
||||
clearml-task --project keras --name local_test --script webinar-0620/keras_mnist.py --requirements webinar-0620/requirements.txt --args epochs=1 --queue default
|
||||
clearml-task --project keras --name local_test --script webinar-0620/keras_mnist.py --branch master --requirements webinar-0620/requirements.txt --args epochs=1 --queue default
|
||||
```
|
||||
|
||||
This sets the following arguments:
|
||||
|
Loading…
Reference in New Issue
Block a user