Antonino -
That is a good solution to the problem. My immediate need is to execute 
only a single run, but I will also find value in iterating over parameter 
values as you describe.

You give a good description of the problem nbrun is intended to solve on 
github.

Thanks for sharing.

Adam

On Wednesday, October 12, 2016 at 3:26:23 AM UTC+1, Antonino Ingargiola 
wrote:
>
> Hi Adam,
>
> to run notebook passing parameters you can use nbrun:
>
> https://github.com/tritemio/nbrun
>
> The parameters are inserted as the second cell (so that the first can have 
> default values).
>
> Antonio
>
> On Monday, October 10, 2016 at 5:37:42 AM UTC-7, [email protected] 
> wrote:
>>
>> I would like to be able to maintain a series of notebooks as reusable 
>> templates and to execute these for a set of run-time parameters, keeping 
>> the results for each. The point is to be able to avoid forking the code; 
>> the effect I am looking for would be equivalent to having multiple copies 
>> of the same notebook differing only by a cell containing a handful of 
>> variable initialisations. The reusable code is subject to change and 
>> extension, and I would still like to be able to explore the state after 
>> executing the "reusable" notebook, by adding cells into the notebook which 
>> executes it.
>>
>> I currently use the %run magic, passing it a *.ipynb file. This works 
>> insomuch as the stdout and stderr and inline plots come through into the 
>> calling notebook.
>> The limitation of this is that I loose any headings and notes and have to 
>> resort to extensive print "...." to create headings. This makes the output 
>> much less presentable to stakeholders.
>>
>> As far as I can tell, nbconvert does not allow me to pass in variables. 
>> It could be used to automate the process by writing a file of runtime 
>> parameters to a consistent location before nb-converting the "reusable" and 
>> saving, but this feels rather inelegant.
>>
>> Anyone got any good ideas??
>>
>> Cheers, Adam
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/70a19419-bf9c-4ffc-bb0b-06531e6c37b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to