Sumatra implementation for IPython magic function. Sumatra works with IPython interactively.
or which I have already tested:
- Download the zip file, then unzip
- Copy
cp sumatramagic.py ~/.ipython/profile_default/startup/
(recommended with specific profile) - Run
ipython
(oripython --profile=<profile_name>
)
- Use the magic key
%smt_run
with options:-m
select the main_file (neccessary)-r
enable sumatra recording-s
only save output data to file
- Important: The result of the script should be named as
data
and set to global.- Implement
global data
in the beginning of the script file
- Implement
- Run without recordings
%smt_run -m myscript.py default.param
- Run with recordings
%smt_run -m myscript.py default.param -r
- Run without recordings but save the data to file
%smt_run -m myscript.py default.param -s
- Run without recordings, change parameter set and then run with recording but use changed parameter set
%smt_run -m myscript.py default.param
parameters.update({'key':value})
%smt_run -m myscript.py default.param -r