Giter VIP home page Giter VIP logo

luna.jl-jupyterdispatch's Introduction

Luna: parallel scans from notebook.

For running Luna.jl jobs/scans in parallel from Jupyter/IJulia notebooks.

UPDATE NOV 2023

The issue with running Luna scans directly from Jupyter/IJulia can be fixed with the workaround from LupoLab/Luna.jl#317 - see the demo notebook demo/luna_scan_demo_271123.ipynb for a basic working example.

In general, the solution should just need the following prior to scan creation:

# Clear ARGS if running in Jupyter/IJulia
if isdefined(Main, :IJulia) && Main.IJulia.inited
    [pop!(ARGS) for _ in eachindex(ARGS)]
end

What and why

Jupyter is great, and I like to do everything in/from a notebook... but dispatching Luna.jl jobs/scans in parallel from a notebook was buggy and inconsistent when I tried it. (UPDATE: it seems that the issue is due to the way IJulia wraps system calls, for more discussion see Luna.jl #317.)

Instead of running jobs directly, this template writes a job file, then dispatches that to a parallel Julia pool via a shell script. Each set of results is put in a separate dir, along with output figures, for later inspection.

Notes

  • To function, this requires a working IJulia installation, and Luna.jl - these can be installed via using Pkg; Pkg.add("IJulia"); Pkg.add("Luna"). For the final image display cell, you may also need import Pkg; Pkg.add("Images"); Pkg.add("FileIO").
  • The job template is lifted more-or-less directly from the Luna.jl parameter scan docs, except with the addition of multi-mode handling (per Luna.jl #316).
  • The parallel jobs are detached from the notebook, so should persist until completed, even at notebook close/disconnect.
  • Tested in Julia v1.8.5, IJulia v1.24.0, Luna v0.2.0.
  • Additional notes in notebook.
  • For Docker builds, see Open Photoionization Docker Stacks.

Instructions

See the scan_parallel_Luna_template.ipynb notebook.

luna.jl-jupyterdispatch's People

Contributors

phockett avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.