Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RunTools.jl

Tools for running simulations at scale

  • Hyper Parameter Sweeping
  • Interaction with Slurm

Usage

  • Define a Params
module MyModule
using Random

mutable struct Params
  niterations::Int
  verbose::Bool
end

function f(rng)
  rand(rng)
end
  • Define a simulation function which takes a paramter value as its single argument

Example:

function simulate(p)
  total = 0
  for i = 1:p.niterations
    total += rand()
  end
end

end # end module
  • Then write a file, by convention hyper.jl. I often put this in MyPackage.jl/scripts
using RunTools
using MyModule

# Run from cmdline with: julia -L hyper.jl -E 'hyper(; params = Params(tags = [:leak]))' -- --queue
function hyper(; params = Params(), n = 10)
  params_ = merge(p(), params)
  paramsamples = rand(params_, n)
  display.(paramsamples)
  control(infer, paramsamples)
end

About

Run Tools

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages