ValueError: invalid literal for int() with base 10: 'hparams.txt'
SSXXSSXX opened this issue · comments
SSXX commented
> 1. assuming your individual submodules were trained with a checkpoint directory such as "/foo/submodule-0", /foo/submodule-1", etc, you'd pass in "/foo/submodule-" as the prefix and the merging script will iterate through all of the trained submodule directories.
https://github.com/cmusatyalab/mega-nerf/blob/main/scripts/merge_submodules.py#L34
I find it has some errors in this step:
My input checkpoint directory is "--ckpt_prefix logs/exp/ex-", but the root seems error:
Traceback (most recent call last):
File "/home/paper/Desktop/meganerf/scripts/merge_submodules.py", line 113, in <module>
main(_get_merge_opts())
File "/home/paper/anaconda3/envs/mega-nerf/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "/home/paper/Desktop/meganerf/scripts/merge_submodules.py", line 51, in main
version_dirs = sorted([int(x.name) for x in list(centroid_path.iterdir())], reverse=True)
File "/home/paper/Desktop/meganerf/scripts/merge_submodules.py", line 51, in <listcomp>
version_dirs = sorted([int(x.name) for x in list(centroid_path.iterdir())], reverse=True)
ValueError: invalid literal for int() with base 10: 'hparams.txt'
what the meaning of version_dirs
?
Could you please help me solve this problem? Thanks a lot.
Originally posted by @Kikihqq in #31 (comment)
shibjeuiwuyi commented
ValueError: invalid literal for int() with base 10: 'hparams.txt',How did you solve this problem, can you share?
ghazaleh commented
please share the response of this problem. we really got stuck in this problem and I don't have any idea for solving it.