Open gmhhope opened 8 months ago
So tuples are partially specific to Python. If you change the input to a list instead of a tuple you should get a direct translation that's accurate. That conversion could be automated via adding a check for tuples here https://github.com/nteract/papermill/blob/main/papermill/translators.py#L99, but it needs to match a JSON type so on the Notebook side you'd get a list instead of a tuple (which is functionally identical from a reader perspective).
🐛 Tuple in the config dictionary changed to string when run a python notebook with papermill
I used the current config to run papermill with the following script
The config dictionary
THe script that was used to run papermill
if rerun_intersect: try: pm.execute_notebook( input_path=intersect_prep_config['input_notebook_path'], output_path=intersect_prep_config['output_notebook_path'], parameters=intersect_prep_config, kernel_name=py_kernel, cwd=os.getcwd() ) except: print(f"{exp} was not done!")
I have already noticed that if I run the R_kernel notebook, the list won't be able to convert to vector naturally. But that is adhering to data structure.
But I don't understand why tuple could become string after delivering the value to a python notebook?
Thanks for helping addressing this in advance. I will just use list instead in my application to fix the issue.
Best, Minghao Gong