I was able to reproduce the issue, but basically the tl;dr is we can not check if a dataframe is empty by if dataframe but instead do something like if not dataframe.empty
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/test-j/bin/create-compute-appendix", line 7, in <module>
exec(compile(f.read(), __file__, 'exec'))
File "/Users/jieruhu/workspace/experiment-impact-tracker/scripts/create-compute-appendix", line 429, in <module>
sys.exit(main(sys.argv[1:]))
File "/Users/jieruhu/workspace/experiment-impact-tracker/scripts/create-compute-appendix", line 425, in main
_recursive_create(all_log_dirs, args.output_dir, site_spec)
File "/Users/jieruhu/workspace/experiment-impact-tracker/scripts/create-compute-appendix", line 362, in _recursive_create
_recursive_create(filtered_dirs, new_output_dir,
File "/Users/jieruhu/workspace/experiment-impact-tracker/scripts/create-compute-appendix", line 362, in _recursive_create
_recursive_create(filtered_dirs, new_output_dir,
File "/Users/jieruhu/workspace/experiment-impact-tracker/scripts/create-compute-appendix", line 381, in _recursive_create
_create_leaf_page(output_directory, all_infos, experiment_set, values["description"],
File "/Users/jieruhu/workspace/experiment-impact-tracker/scripts/create-compute-appendix", line 284, in _create_leaf_page
if gpu_infos_all and gpu_infos_all[exp_set_name] and gpu_infos_all[exp_set_name][i]:
File "/usr/local/anaconda3/envs/test-j/lib/python3.8/site-packages/pandas/core/generic.py", line 1439, in __nonzero__
raise ValueError(
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
testing:
run the script on experiment results from ClimateChangeFromMachineLearningResearch and verify the doc is created correctly
Address https://github.com/Breakend/experiment-impact-tracker/issues/39
I was able to reproduce the issue, but basically the tl;dr is we can not check if a dataframe is empty by
if dataframe
but instead do something likeif not dataframe.empty
testing:
run the script on experiment results from
ClimateChangeFromMachineLearningResearch
and verify the doc is created correctly