Skip to content

Commit e7dcacf

Browse files
committed
Move copy/download use cases to bottom
1 parent 1f2798f commit e7dcacf

File tree

1 file changed

+82
-79
lines changed

1 file changed

+82
-79
lines changed

README.md

Lines changed: 82 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -32,101 +32,38 @@ cometx --api-key="YOUR-COMET-API-KEY" --url-override="https://your-companys-come
3232

3333
## Usage
3434

35-
`cometx` is composed of a series of subcommands that are useful
35+
`cometx` is composed of a series of commands that are useful
3636
independently, and can be used together to create sophisticated tools
3737
for ML management.
3838

39-
This section will examine some common uses, followed by a more
40-
detailed exploration of each subcommand.
39+
### Commands
4140

42-
### Use Cases
43-
44-
In this section we'll explore some common scenarios.
45-
46-
1. Copy a specific project from one Comet installation to another
47-
2. Copy all projects in workspace to a new workspace
48-
3. Copy specific experiments in a project to new experiments
49-
50-
## 1. Copy a specific project from one comet installation to another
51-
52-
A useful idiom is to set your Comet environment variables on the line
53-
of a subcommand. In this manner, you can set the `COMET_URL_OVERRIDE`
54-
and `COMET_API_KEY` for different installations.
55-
56-
Of course, you don't have to set the environment variables if you are
57-
copying experiments on the same Comet installation.
58-
59-
Here is how you one could download the experiments in
60-
WORKSPACE/PROJECT from http://comet.a.com:
61-
62-
```shell
63-
cometx --api-key=A-KEY download WORKSPACE/PROJECT
64-
```
65-
66-
The `cometx download` subcommand downloads all of the Comet experiment
67-
data into local files. Note that WORKSPACE/PROJECT refers to a
68-
workspace and project on http://comet.a.com.
69-
70-
One could then copy the downloaded experiment data with a similar command:
71-
72-
```shell
73-
cometx --api-key=B-KEY copy WORKSPACE/PROJECT NEW-WORKSPACE/NEW-PROJECT
74-
```
75-
76-
Note that WORKSPACE/PROJECT now refers to a directory, and
77-
NEW-WORKSPACE/NEW-PROJECT refers to a workspace and project on
78-
http://comet.b.com.
79-
80-
## 2. Copy all projects in workspace to a new workspace
81-
82-
Similarly, one can copy all of the projects by first downloading them:
83-
84-
```shell
85-
cometx --api-key=A-KEY download WORKSPACE
86-
```
87-
88-
and then copying them:
89-
90-
```shell
91-
cometx --api-key=B-KEY copy WORKSPACE NEW-WORKSPACE
92-
```
93-
94-
## 3. Copy specific experiments in a project to new experiments
95-
96-
Similarly, one can copy a single experiment first downloading it:
97-
98-
```shell
99-
cometx --api-key=A-KEY download WORKSPACE/PROJECT/EXPERIMENT-NAME-OR-ID
100-
```
101-
102-
and then copying it:
103-
104-
```shell
105-
cometx --api-key=B-KEY copy WORKSPACE/PROJECT/EXPERIMENT-NAME-OR-ID NEW-WORKSPACE/NEW-PROJECT
106-
```
107-
108-
### Subcommands
109-
110-
* [cometx list](#cometx-list)
111-
* [cometx download](#cometx-download)
41+
* [cometx admin](#cometx-admin)
42+
* [cometx config](#cometx-config)
11243
* [cometx copy](#cometx-copy)
44+
* [cometx delete-assets](#cometx-delete-assets)
45+
* [cometx download](#cometx-download)
46+
* [cometx list](#cometx-list)
11347
* [cometx log](#cometx-log)
11448
* [cometx reproduce](#cometx-reproduce)
115-
* [cometx delete-assets](#cometx-delete-assets)
116-
* [cometx config](#cometx-config)
117-
* [cometx update](#cometx-update)
118-
* [cometx admin](#cometx-admin)
11949
* [cometx smoke-test](#cometx-smoke-test)
50+
* [cometx update](#cometx-update)
12051

121-
For all subcommands, use the `--help` flag to get additional information.
52+
For all commands, use the `--help` flag to get additional information.
12253

12354
## Global Options
12455

125-
All commands support these global options:
56+
These flags are availble before a command:
12657

12758
* `--api-key API_KEY` - Set the COMET_API_KEY
12859
* `--url-override URL_OVERRIDE` - Set the COMET_URL_OVERRIDE
60+
61+
This command shows the cometx version:
62+
12963
* `--version` - Display comet_ml version
64+
65+
This command can be used globally, or for individual commands:
66+
13067
* `-h, --help` - Show help message
13168

13269
## cometx list
@@ -501,6 +438,72 @@ Items to include or exclude:
501438

502439
For more information, `cometx smoke-test --help`
503440

441+
## Copy/Download Use Cases
442+
443+
In this section we'll explore some common scenarios.
444+
445+
1. Copy a specific project from one Comet installation to another
446+
2. Copy all projects in workspace to a new workspace
447+
3. Copy specific experiments in a project to new experiments
448+
449+
### 1. Copy a specific project from one comet installation to another
450+
451+
A useful idiom is to set your Comet environment variables on the line
452+
of a command. In this manner, you can set the `COMET_URL_OVERRIDE`
453+
and `COMET_API_KEY` for different installations.
454+
455+
Of course, you don't have to set the environment variables if you are
456+
copying experiments on the same Comet installation.
457+
458+
Here is how you one could download the experiments in
459+
WORKSPACE/PROJECT from http://comet.a.com:
460+
461+
```shell
462+
cometx --api-key=A-KEY download WORKSPACE/PROJECT
463+
```
464+
465+
The `cometx download` command downloads all of the Comet experiment
466+
data into local files. Note that WORKSPACE/PROJECT refers to a
467+
workspace and project on http://comet.a.com.
468+
469+
One could then copy the downloaded experiment data with a similar command:
470+
471+
```shell
472+
cometx --api-key=B-KEY copy WORKSPACE/PROJECT NEW-WORKSPACE/NEW-PROJECT
473+
```
474+
475+
Note that WORKSPACE/PROJECT now refers to a directory, and
476+
NEW-WORKSPACE/NEW-PROJECT refers to a workspace and project on
477+
http://comet.b.com.
478+
479+
### 2. Copy all projects in workspace to a new workspace
480+
481+
Similarly, one can copy all of the projects by first downloading them:
482+
483+
```shell
484+
cometx --api-key=A-KEY download WORKSPACE
485+
```
486+
487+
and then copying them:
488+
489+
```shell
490+
cometx --api-key=B-KEY copy WORKSPACE NEW-WORKSPACE
491+
```
492+
493+
### 3. Copy specific experiments in a project to new experiments
494+
495+
Similarly, one can copy a single experiment first downloading it:
496+
497+
```shell
498+
cometx --api-key=A-KEY download WORKSPACE/PROJECT/EXPERIMENT-NAME-OR-ID
499+
```
500+
501+
and then copying it:
502+
503+
```shell
504+
cometx --api-key=B-KEY copy WORKSPACE/PROJECT/EXPERIMENT-NAME-OR-ID NEW-WORKSPACE/NEW-PROJECT
505+
```
506+
504507
## Running Tests
505508

506509
WARNING: Running the tests will create experiments, models, assets, etc.

0 commit comments

Comments
 (0)