Running Julia programs
Grid supports running Julia scripts
Julia scripts and hyper parameter sweeps can be run in Grid easily using CLI or the web UI. Both CPU and GPU instances are supported with all necessary system drivers pre-installed and set up, so you can take advantage of multiprocessing and compute acceleration hardware with no additional configuration.

Step 0 Prepare script

    Have the Julia script available on Github
    Make sure the Julia script is invocable via the command line. No changes to your code are required when running on Grid
    Julia scripts must be named with the suffix .jl
    If any dependencies are required, the git repo must contain a valid Project.toml file which has been generated by the Julia standard library pkg manager utility.
    Optionally, you can test by creating an Interactive Session in Grid and running your script there

Step 1 Run on Grid

    Start the Grid platform at platform.grid.ai
    In the Web UI, choose “New Run”
    Copy and paste the Github script or select the entry file in the dropdown menu
    Select Julia from the “framework” drop down option
    Add any script arguments
      If the script accepts command line arguments, you can submit a hyperparameter sweep in the same way you do for a python based run

Step 2 See results

    Any text sent to stdout from the Julia program will be available in the Stdout log
    Any artifacts written in the main program directory are automatically preserved
    If you are able to view Tensorboard logs then metrics are available in the Web UI as well as any artifacts
Could not load image
Note: The first time you run a Julia file, it will take a bit longer; you can track progress in Build logs

Step 3: Bonus CLI Examples

Script arguments: --num "[10,100,1000,10000]"
1
git clone https://github.com/rlizzo/julia_binder_test
2
cd julia_binder_test
3
grid run --instance_type t2.medium \
4
--framework julia \
5
--use_spot \
6
--cpus 1 \
7
demo.jl \
8
--num "[10,100,1000,10000]"
Copied!
Script arguments: --num_samples "[10,100,1000,10000]"
1
git clone https://github.com/rlizzo/TuringCLIExample
2
cd TuringCLIExample
3
grid run --instance_type t2.medium \
4
--framework julia \
5
--use_spot \
6
--cpus 1 \
7
fit.jl \
8
--num_samples 100
Copied!

Notes and limitations:

    Please be aware that following environment variables pertinent to the julia runtime configuration are set automatically before the script is invoked.
      JULIA_PROJECT="@." where the current working directory is the root of your cloned repository.
      JULIA_NUM_THREADS where the value is set to the number of CPUs you dedicate to each experiment.
The two environment variables above are equivalent to invoking a julia script with the following configuration options:
julia [email protected] --threads auto <YOUR JULIA SCRIPT NAME>.jl
    At this time, we only support the latest release of the Julia language (v1.6.1) please ensure that 1.6.1 is compatible with the Julia version specified in the [compat] section of the repository's Project.toml.
Last modified 1mo ago