I want to pass on all the parameters in one variable. To make this happen, I am passing a dictionary in my Python client for Papermill using:
params = {"aviral":"srivastava"}
pm.execute_notebook( 'path/to/input.ipynb', 'path/to/output.ipynb', parameters = params )
Now, I want to do run the corresponding command from bash. In the document it states:
papermill local/input.ipynb s3://bkt/output.ipynb -p alpha 0.6 -p l1_ratio 0.1
But nowhere is given how to pass on a dictionary.
I tried many permutations and combinations like:
papermill test_params.ipynb params_output.ipynb -p params {"aviral":"srivastava"}
papermill test_params.ipynb params_output.ipynb -p params '{"aviral":"srivastava"}'
I also read to pass a dict
in the format: '{"aviral":"srivastava"}'
and then json.loads would do the work. But I am not having the liberty for converting the input. It has to be used right away in the script.
Just a minimal script to actually check the type of the variable passed:
params = {} # I tag this with `parameter`
print(type(params))
print(params)
Yes, I see the params variable got changed when running with papermill but the value passed is a complete string.