Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: not enough values to unpack (expected 2, got 0) #3

Closed
cmj12345 opened this issue Dec 3, 2024 · 4 comments
Closed

ValueError: not enough values to unpack (expected 2, got 0) #3

cmj12345 opened this issue Dec 3, 2024 · 4 comments

Comments

@cmj12345
Copy link

cmj12345 commented Dec 3, 2024

Hello, when I run "bash scripts/train_bunny_real.sh", after I close the picture in Open3D, then when trainning, it reported an error.

Traceback (most recent call last):
File "/home/chengmj/anaconda3/envs/touch-gs/bin/ns-train", line 8, in
sys.exit(entrypoint())
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/nerfstudio/scripts/train.py", line 263, in entrypoint
tyro.cli(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_cli.py", line 169, in cli
output = _cli_impl(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_cli.py", line 373, in _cli_impl
parser_spec = _parsers.ParserSpecification.from_callable_or_type(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_parsers.py", line 125, in from_callable_or_type
field_out = handle_field(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_parsers.py", line 368, in handle_field
subparsers_attempt = SubparsersSpecification.from_field(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_parsers.py", line 578, in from_field
subparser = ParserSpecification.from_callable_or_type(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_parsers.py", line 125, in from_callable_or_type
field_out = handle_field(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_parsers.py", line 385, in handle_field
if force_primitive == "struct" or _fields.is_struct_type(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_unsafe_cache.py", line 33, in wrapped_f
out = f(*args, **kwargs)
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_fields.py", line 208, in is_struct_type
list_or_error = field_list_from_type_or_callable(
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/_fields.py", line 245, in field_list_from_type_or_callable
registry.get_primitive_spec(PrimitiveTypeInfo.make(f, set()))
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/constructors/_registry.py", line 146, in get_primitive_spec
maybe_spec = spec_factory(type_info)
File "/home/chengmj/anaconda3/envs/touch-gs/lib/python3.8/site-packages/tyro/constructors/_primitive_spec.py", line 472, in dict_rule
key_type, val_type = get_args(type_info.type)

ValueError: not enough values to unpack (expected 2, got 0)

And in addition, I wonder if "bash scripts/train_bunny_blender.sh" can run successfully, because I see that there is already relevant code, but it is still written in ReadMe as ' (processing to a unified format in progress)'.

Thank you very much!!!!

@peasant98
Copy link
Collaborator

peasant98 commented Dec 3, 2024

Hi @cmj12345 , thanks for checking out our work!

This is an interesting issue that I haven't seen before, but it seems to come down to an issue in the ns-train command.

ns-train depth-gaussian-splatting --data bunny_blender_data/ --viewer.quit-on-train-completion True --pipeline.model.depth-loss-mult 0.5 --pipeline.model.depth-loss-type SIMPLE_LOSS nerfstudio-data --train-split-fraction 0.13

Two thoughts I have:

  1. Are you using our forked version of nerfstudio in this repo? It is a bit older than the current version available on Github.

  2. Maybe there is a version issue for tyro.

Let me know how it goes!

@cmj12345
Copy link
Author

cmj12345 commented Dec 4, 2024

Yes, I use your forked version of nerfstudio in this repo.

And I found a warning before training. Perhaps it's an abnormal situation?

Fusing vision and touch...
utils/fuse_touch_vision.py:117: RuntimeWarning: divide by zero encountered in divide
  uncertainty_touch_valid_reciprocal = 1 / uncertainty_touch_valid
utils/fuse_touch_vision.py:142: RuntimeWarning: invalid value encountered in divide
  mu_touch_var_weighted = mu_touch_valid / uncertainty_touch_valid

And if it's normal, can you provide recommended version for tyro?

Thanks a lot!

@peasant98
Copy link
Collaborator

Hmm...

So tyro should be at a version greater than 0.5.10.

ns-train depth-gaussian-splatting --data bunny_blender_data/ --viewer.quit-on-train-completion True --pipeline.model.depth-loss-mult 0.5 --pipeline.model.depth-loss-type SIMPLE_LOSS nerfstudio-data --train-split-fraction 0.13

What is the output of this as well?

I also notice this, do you think it could be related?

@cmj12345
Copy link
Author

I solved it. It's a version issue of tyro. I downgraded it.
Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants