Package: escher-cli
🔥 💥Now ``Escher`` supports launching workers on AWS!🌟 ✨ ⚡️Where Am I? (for the developer himself)[ ]Need to add ``escher init``so that you have a standard way
to setup the scripts for a project.For Usage, jump to the next section already :)MotivationsWhen publishing deep-learning models, there are a lot of boilerplate
scripts for the training and inference. When there are twenty-plus
models in your work folder it gets increasingly difficult to maintain
copies of run scripts that has tight bindings with the particular server
you were using.It makes sense to use a single deep-learningclito minimalize these
copy-and-pasted scriptsWhen you work on a lot of deep-learning project, some of them playing
with other people’s code-block, some of then developing new ones, it really
makes sense to standard the structure of project and reduce boiler
plate. Here withescher-cli, we learn from the best packaging tools
on this planet, Rubygem, Javascriptnpm, and rustcrate. We
are particularly inspired bycreate-react-appand the good work that
you-know-who has offered thereactjscommunity, and some of the
lessons people have learned over-the-years from tools likegulp,bower,webpackand numerous others.You can think ofescher-clias thecreate-react-appfor
deep-learning. The reason why you want use this is because it offers a
boilerplate-free way tosetup new project,launch and manage aws,
azure, google compute engine servers,local and remote training.
Instead of writingMakefilesthat you have to copy paste in every
project, you installescher-cligloballyorin your particular
project virtual-env.In summary, our (what) contributions (you) are (get):A community-driven standard in deep-ML training, development and
(later) serving.cross-platformclitools that reduces the cognitive load of
running training locally and globallyNo copy-and-paste scripts in each project.IDE SupportWe will build a cli tool first. If this catches on, I’m sure JetBrains
will add integration in PyCharm:) And if you are not using PyCharm, you
should :-PInstall and UsagePyPI Page:https://pypi.python.org/pypi/escher-cliTodo and Milestones[ ] run locally[ ] build a worker daemon thatstart,halt,resume,reranjobs[x] finish graphQL schema[ ] build a master controller that[ ] does worker discovery (worker report on startup)[ ] maintains a list of jobs[ ] new[ ] running[ ] ran[ ] finish graphQL schemaDone[x] define job file and schema (.escher.run)Run Locally✓pipinstallescher-cli✗escherinit# this one creates the `.escher`✓escherrun# runs a default script
# outputs >> `escher run` <default> script works!✓escherrunscripts/load_electron.escher# escher script that "looks like" this.To run experiments on Remote Workers[ ] add remote worker support✓pipinstallescher-cli✗escherinit--aws-exampleescherd# this starts the local daemon✗eschermaster✗escherworker# now sit back and enjoy the showesherrun--worker=gpu-workerscripts/load_electrons.escherConfiguration for thegpu-workersits inside the.escherfile.
It specifies theawsimage id, security group etc.OverviewEscheris a command line utility for your experiments. It manages
concurrent runs, command line arguments and other stuff nicely for you!The things it manages include:generating run-specific variables, like{time}and{cwd}that
you can access as template keys in your string.maximum numbers of concurrent runs (via pythonmultiprocess.Pool)environment variables (env) such asDISPLAY=:1. You can also
passing a filedefault argumentsbatch argumentsfor multiple experimentspre-launchscripts that is ran only once for each batchat-launchscript that is run at the launch time of each
experimentpost-launchscript that is as soon as each experiment launchespost-runscripts that happens after each experiment is done.Escherworks with all of your current work flow and it doesn’t lock
you into a specific way of doing things. You still get to use bash
scripts or Makefile’s.Why do we use YAML (with JSON planned as well)? My bash script is just fine!Because YAML(and json) are humanandmachine readable whereas bash
arguments arenot. When is the last time you looked at a bash script
looking for hyper-parameters, only to realized that some key parameters
are missing? WithEscheryou won’t have this problem. You can save
all of the past and current runs as nicely readable YAML files(or json,
Hjson Cson if you speak coffee script, whatever).if you are writing a report, you can include these YAML/json/cson
files directly into markdown or latex.To see what you ran last night, you cangloball of the
configurations withruns/**/experiment.ymland make nice tables
in an instant.To run a full batch of experiments, you can typedefault_argsjust ones, and then only repeat the fields that is different between
each run.Most importantly,Escherwants to establish a standard command line
tool for machine learning work, and having a standardrun.config.ymlis just the first step!Why isEschernamed “Escher”?It used to be calledDave, after my adviser. I thought it would be
funny todave--config-file"load_electrons.yml". Now it is named toEscher(as for the module), andescher-clias the package name.There already exists a package calledescherwhich is why this
package isescher-cli. However I like the-clipostfix b/c it is
more clear.How shall I useEscher?First thing first, you couldaliasEscherwith whoever you want
to call to run your experiments 😀.After aliasing this after your favorite person, you can follow the
examples bellow :)Note that**batteries are
included**,
and your mileage will vary.Example UsageFirst install viapip(it’s that simple!!)pipinstalldaveSuppose you have the following folder structure├── your_thesis
└── MAML_tensorflow
    ├── README.md
    ├── experiment.yml
    ├── maml.py
    └── models
        ├── __init__.py
        └── mlp.pywhere the experiment.yml file looks like this:%YAML1.2---config:max_concurrent:10env:PYTHONPATH:test_directoryrun:|{env} python maml_bradly.py {args}default_args:npts:100num_epochs:70000num_tasks:10num_grad_steps:1num_points_sampled:10fix_amp:Falsebatch_args:# use good typing convention here-num_tasks:10num_grad_steps:1num_points_sampled:10-num_tasks:10num_grad_steps:4num_points_sampled:20tmp:-last_run:10Now under the project root, you can just rundave--config-file"escher.py"and it will automatically run the experiment twice, using the arguments
in thebatch_argsfield of the Yaml configuration file. ## To
Developfirst download from github. Then under project folder, run (you also
need to install the packages).makedevtestBucket List[ ] Allow extensions[ ] work on windows[ ] allow env files[ ] daemon modeHappy Doing Science!one-more-experiment