Skip to content

Commit

Permalink
Python 3 migration fixes (#1356)
Browse files Browse the repository at this point in the history
* call venv3.6 venv

* reorder statements

* sort to make order deterministic
  • Loading branch information
percyliang authored Sep 6, 2019
1 parent 4c6d899 commit 251d708
Show file tree
Hide file tree
Showing 5 changed files with 404 additions and 404 deletions.
74 changes: 37 additions & 37 deletions docs/CLI-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ This file is auto-generated from the output of `cl help -v` and provides the lis
-p, --pack If path is an archive file (e.g., zip, tar.gz), keep it packed.
-z, --force-compression Always use compression (this may speed up single-file uploads over a slow network).
-w, --worksheet-spec Upload to this worksheet ([(<alias>|<address>)::](<uuid>|<name>)).
--source-url URL corresponding to the original source of this bundle.
--tags Space-separated list of tags used for search (e.g., machine-learning).
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$.
--license The license under which this program/dataset is released.
-d, --description Full description of the bundle.
--tags Space-separated list of tags used for search (e.g., machine-learning).
--license The license under which this program/dataset is released.
--source-url URL corresponding to the original source of this bundle.
-e, --edit Show an editor to allow editing of the bundle metadata.

make:
Expand All @@ -35,10 +35,10 @@ This file is auto-generated from the output of `cl help -v` and provides the lis
Arguments:
target_spec [<key>:][[(<alias>|<address>)::](<uuid>|<name>)//](<uuid>|<name>|^<index>)[/<subpath within bundle>]
-w, --worksheet-spec Operate on this worksheet ([(<alias>|<address>)::](<uuid>|<name>)).
--allow-failed-dependencies Whether to allow this bundle to have failed or killed dependencies.
--tags Space-separated list of tags used for search (e.g., machine-learning).
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$.
-d, --description Full description of the bundle.
--tags Space-separated list of tags used for search (e.g., machine-learning).
--allow-failed-dependencies Whether to allow this bundle to have failed or killed dependencies.
-e, --edit Show an editor to allow editing of the bundle metadata.

run:
Expand All @@ -47,19 +47,19 @@ This file is auto-generated from the output of `cl help -v` and provides the lis
target_spec [<key>]:[[(<alias>|<address>)::](<uuid>|<name>)//](<uuid>|<name>|^<index>)[/<subpath within bundle>]
command Arbitrary Linux command to execute.
-w, --worksheet-spec Operate on this worksheet ([(<alias>|<address>)::](<uuid>|<name>)).
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$.
-d, --description Full description of the bundle.
--tags Space-separated list of tags used for search (e.g., machine-learning).
--allow-failed-dependencies Whether to allow this bundle to have failed or killed dependencies.
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use.
--request-time Amount of time (e.g., 3, 3m, 3h, 3d) allowed for this run. Defaults to user time quota left.
--tags Space-separated list of tags used for search (e.g., machine-learning).
--request-memory Amount of memory (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run.
-d, --description Full description of the bundle.
--request-network Whether to allow network access.
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use.
--request-queue Submit run to this job queue.
--request-cpus Number of CPUs allowed for this run.
--request-disk Amount of disk space (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run. Defaults to user disk quota left.
--request-priority Job priority (higher is more important).
--request-cpus Number of CPUs allowed for this run.
--request-gpus Number of GPUs allowed for this run.
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$.
--request-queue Submit run to this job queue.
--request-priority Job priority (higher is more important).
--request-network Whether to allow network access.
-e, --edit Show an editor to allow editing of the bundle metadata.
-W, --wait Wait until run finishes.
-t, --tail Wait until run finishes, displaying stdout/stderr.
Expand All @@ -71,19 +71,19 @@ This file is auto-generated from the output of `cl help -v` and provides the lis
target_spec [<key>]:[[(<alias>|<address>)::](<uuid>|<name>)//](<uuid>|<name>|^<index>)[/<subpath within bundle>]
command Arbitrary Linux command to execute.
-w, --worksheet-spec Operate on this worksheet ([(<alias>|<address>)::](<uuid>|<name>)).
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$.
-d, --description Full description of the bundle.
--tags Space-separated list of tags used for search (e.g., machine-learning).
--allow-failed-dependencies Whether to allow this bundle to have failed or killed dependencies.
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use.
--request-time Amount of time (e.g., 3, 3m, 3h, 3d) allowed for this run. Defaults to user time quota left.
--tags Space-separated list of tags used for search (e.g., machine-learning).
--request-memory Amount of memory (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run.
-d, --description Full description of the bundle.
--request-network Whether to allow network access.
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use.
--request-queue Submit run to this job queue.
--request-cpus Number of CPUs allowed for this run.
--request-disk Amount of disk space (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run. Defaults to user disk quota left.
--request-priority Job priority (higher is more important).
--request-cpus Number of CPUs allowed for this run.
--request-gpus Number of GPUs allowed for this run.
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$.
--request-queue Submit run to this job queue.
--request-priority Job priority (higher is more important).
--request-network Whether to allow network access.
-e, --edit Show an editor to allow editing of the bundle metadata.
-W, --wait Wait until run finishes.
-t, --tail Wait until run finishes, displaying stdout/stderr.
Expand Down Expand Up @@ -186,19 +186,19 @@ This file is auto-generated from the output of `cl help -v` and provides the lis
Any provided metadata arguments will override the original metadata in mimicked bundles.
Arguments:
bundles Bundles: old_input_1 ... old_input_n old_output new_input_1 ... new_input_n ([[(<alias>|<address>)::](<uuid>|<name>)//](<uuid>|<name>|^<index>)).
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$. (for makes and runs)
-d, --description Full description of the bundle. (for makes and runs)
--tags Space-separated list of tags used for search (e.g., machine-learning). (for makes and runs)
--allow-failed-dependencies Whether to allow this bundle to have failed or killed dependencies. (for makes and runs)
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use. (for runs)
--request-time Amount of time (e.g., 3, 3m, 3h, 3d) allowed for this run. Defaults to user time quota left. (for runs)
--tags Space-separated list of tags used for search (e.g., machine-learning). (for makes and runs)
--request-memory Amount of memory (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run. (for runs)
-d, --description Full description of the bundle. (for makes and runs)
--request-network Whether to allow network access. (for runs)
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use. (for runs)
--request-queue Submit run to this job queue. (for runs)
--request-cpus Number of CPUs allowed for this run. (for runs)
--request-disk Amount of disk space (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run. Defaults to user disk quota left. (for runs)
--request-priority Job priority (higher is more important). (for runs)
--request-cpus Number of CPUs allowed for this run. (for runs)
--request-gpus Number of GPUs allowed for this run. (for runs)
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$. (for makes and runs)
--request-queue Submit run to this job queue. (for runs)
--request-priority Job priority (higher is more important). (for runs)
--request-network Whether to allow network access. (for runs)
--depth Number of parents to look back from the old output in search of the old input.
-s, --shadow Add the newly created bundles right after the old bundles that are being mimicked.
-i, --dry-run Perform a dry run (just show what will be done without doing it)
Expand All @@ -213,19 +213,19 @@ This file is auto-generated from the output of `cl help -v` and provides the lis
Arguments:
macro_name Name of the macro (look for <macro_name>-in1, <macro_name>-in-<name>, ..., and <macro_name>-out bundles).
bundles Bundles: new_input_1 ... new_input_n named_input_name:named_input_bundle other_named_input_name:other_named_input_bundle ([[(<alias>|<address>)::](<uuid>|<name>)//](<uuid>|<name>|^<index>))
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$. (for makes and runs)
-d, --description Full description of the bundle. (for makes and runs)
--tags Space-separated list of tags used for search (e.g., machine-learning). (for makes and runs)
--allow-failed-dependencies Whether to allow this bundle to have failed or killed dependencies. (for makes and runs)
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use. (for runs)
--request-time Amount of time (e.g., 3, 3m, 3h, 3d) allowed for this run. Defaults to user time quota left. (for runs)
--tags Space-separated list of tags used for search (e.g., machine-learning). (for makes and runs)
--request-memory Amount of memory (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run. (for runs)
-d, --description Full description of the bundle. (for makes and runs)
--request-network Whether to allow network access. (for runs)
--request-docker-image Which docker image (either tag or digest, e.g., codalab/default-cpu:latest) we wish to use. (for runs)
--request-queue Submit run to this job queue. (for runs)
--request-cpus Number of CPUs allowed for this run. (for runs)
--request-disk Amount of disk space (e.g., 3, 3k, 3m, 3g, 3t) allowed for this run. Defaults to user disk quota left. (for runs)
--request-priority Job priority (higher is more important). (for runs)
--request-cpus Number of CPUs allowed for this run. (for runs)
--request-gpus Number of GPUs allowed for this run. (for runs)
-n, --name Short variable name (not necessarily unique); must conform to ^[a-zA-Z_][a-zA-Z0-9_\.\-]*$. (for makes and runs)
--request-queue Submit run to this job queue. (for runs)
--request-priority Job priority (higher is more important). (for runs)
--request-network Whether to allow network access. (for runs)
--depth Number of parents to look back from the old output in search of the old input.
-s, --shadow Add the newly created bundles right after the old bundles that are being mimicked.
-i, --dry-run Perform a dry run (just show what will be done without doing it)
Expand Down
8 changes: 4 additions & 4 deletions docs/Competitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ Checkout the CodaLab Worksheets repository (in the future, this should be availa
Install all the dependencies:

cd codalab-worksheets
virtualenv -p python2.7 venv2.7
venv2.7/bin/pip install -e .
virtualenv -p python3.6 venv
venv/bin/pip install -e .

Now when you run the competition script with the help flag `-h`, you should see something like this:

venv2.7/bin/python scripts/competitiond.py -h
venv/bin/python scripts/competitiond.py -h

usage: competitiond.py [-h] [-l] [-d] [-v] config_file output_path

Expand Down Expand Up @@ -121,7 +121,7 @@ There are many ways you could choose to set up the competition. The recommended
Running the competition script in daemon mode will start a long-running process that periodically checks for new submissions, runs them, then updates the leaderboard file.
venv2.7/bin/python scripts/competitiond.py -d ~/competition-config.yml /var/www/leaderboard.json
venv/bin/python scripts/competitiond.py -d ~/competition-config.yml /var/www/leaderboard.json
## Submitting a model (as a participant)
Expand Down
Loading

0 comments on commit 251d708

Please sign in to comment.