Package: milatools
milatoolsThe milatools package provides themilacommand, which is meant to help with connecting to and interacting with the Mila cluster.WarningThemilacommand is meant to be used on your local machine. Trying to run it on the cluster will fail with an errorInstallRequires Python >= 3.8pipinstallmilatoolsOr, for bleeding edge version:pipinstallgit+https://github.com/mila-iqia/milatools.gitAfter installingmilatools, start withmila init:milainitCommandsmila initSet up your access to the mila cluster interactively. Have your username and password ready!Set up your SSH config for easy connection withssh milaSet up your public key if you don't already have themCopy your public key over to the cluster for passwordless authSet up a public key on the login node to enable ssh into compute nodesnew: Add a special SSH config for direct connection to acompute nodewithssh mila-cpumila docs/intranetUsemila docs <search terms>to search the Mila technical documentationUsemila intranet <search terms>to search the Mila intranetBoth commands open a browser window. If no search terms are given you are taken to the home page.mila codeConnect a VSCode instance to a compute node.mila codefirst allocates a compute node using slurm (you can pass slurm options as well using--alloc), and then calls thecodecommand with the appropriate options to start a remote coding session on the allocated node.You can simply Ctrl+C the process to end the session.usage: mila code [-h] [--alloc ...] [--job VALUE] [--node VALUE] PATH

positional arguments:
  PATH          Path to open on the remote machine

optional arguments:
  -h, --help    show this help message and exit
  --alloc ...   Extra options to pass to slurm
  --job VALUE   Job ID to connect to
  --node VALUE  Node to connect toFor example:milacodepath/to/my/experimentThe--allocoption may be used to pass extra arguments tosallocwhen allocating a node (for example,--alloc --gres=cpu:8to allocate 8 CPUs).--allocshould be at the end, because it will take all of the arguments that come after it.If you already have an allocation on a compute node, you may use the--node NODENAMEor--job JOBIDoptions to connect to that node.mila serveThe purpose ofmila serveis to make it easier to start notebooks, logging servers, etc. on the compute nodes and connect to them.usage: mila serve [-h] {connect,kill,list,lab,notebook,tensorboard,mlflow,aim} ...

positional arguments:
  {connect,kill,list,lab,notebook,tensorboard,mlflow,aim}
    connect             Reconnect to a persistent server.
    kill                Kill a persistent server.
    list                List active servers.
    lab                 Start a Jupyterlab server.
    notebook            Start a Jupyter Notebook server.
    tensorboard         Start a Tensorboard server.
    mlflow              Start an MLFlow server.
    aim                 Start an AIM server.

optional arguments:
  -h, --help            show this help message and exitFor example, to start jupyterlab with one GPU, you may write:milaservelab--alloc--gresgpu:1You can of course write any SLURM arguments after--alloc.Ending the connection will end the server, but the--persistflag can be used to prevent that. In that case you would be able to writemila serve connect jupyter-labin order to reconnect to your running instance. Usemila serve listandmila serve killto view and manage any running instances.