cmusatyalab / mega-nerf

MIT License
458 stars 54 forks source link

ValueError: invalid literal for int() with base 10: 'hparams.txt' #91

Open SSXXSSXX opened 6 months ago

SSXXSSXX commented 6 months ago
          > 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 ?

image

Could you please help me solve this problem? Thanks a lot.

Originally posted by @Kikihqq in https://github.com/cmusatyalab/mega-nerf/issues/31#issuecomment-1501807577

shibjeuiwuyi commented 6 months ago

ValueError: invalid literal for int() with base 10: 'hparams.txt',How did you solve this problem, can you share?

ghazalehgholinejad commented 5 months ago

please share the response of this problem. we really got stuck in this problem and I don't have any idea for solving it.