athn-nik / teach

Official PyTorch implementation of the paper "TEACH: Temporal Action Compositions for 3D Humans"
https://teach.is.tue.mpg.de
Other
384 stars 40 forks source link

A problem when using sample_seq.py with pre-trained ckpts. #20

Closed by2101 closed 1 year ago

by2101 commented 1 year ago

Hi, author, Thank you for your nice work! I encountered a problem when I used the pre-trained model (downloaded from the project website). The module cannot be imported. The log is as follows:

` (MMHuman3d) root:/teach-master# bash sample.sh [08/11/22 19:42:41][main][INFO] - Sample script. The outputs will be stored in: [08/11/22 19:42:41][main][INFO] - /home/baiye03/VirtualHuman/teach-master/exp/teach/samples_slerp_aligned_pairs/checkpoint-last/val Global seed set to 1234 [08/11/22 19:42:41][main][INFO] - Loading data module Error executing job with overrides: ['folder=exp/teach/', 'align=full', 'slerp_ws=8'] Traceback (most recent call last): File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/site-packages/hydra/_internal/utils.py", line 570, in _locate module = import_module(mod) File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1011, in _gcd_import File "", line 950, in _sanity_check ValueError: Empty module name

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "sample_seq.py", line 37, in _sample return sample(cfg) File "sample_seq.py", line 118, in sample data_module = instantiate(cfg.data) File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate return instantiate_node(config, *args, recursive=recursive, convert=convert) File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 245, in instantiate_node value = instantiate_node( File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 240, in instantiate_node target = _resolve_target(node.get(_Keys.TARGET)) File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 104, in _resolve_target return _locate(target) File "/opt/miniconda3/envs/MMHuman3d/lib/python3.8/site-packages/hydra/_internal/utils.py", line 573, in _locate raise ImportError(f"Error loading module '{path}'") from e ImportError: Error loading module 'teachg.data.sampling.FrameSampler'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace. `

How to fix this error?

Regards, by2101

athn-nik commented 1 year ago

Can you try downloading the most recent checkpoints and configuration from the website? I think this should be fixed on those. Otherwise, let me know

by2101 commented 1 year ago

Can you try downloading the most recent checkpoints and configuration from the website? I think this should be fixed on those. Otherwise, let me know

Hi, Thank you for your reply!

I found that the error is caused by the config: https://github.com/athn-nik/teach/blob/49c1f157a63bed6b0ae81a70eeb006f7cb85fc0d/configs/sampler/all_conseq.yaml#L1

target: teachg.data.sampling.FrameSampler

"g\" should be removed.

Best, by2101

athn-nik commented 1 year ago

Thanks sorry for the late reply, pushing the fix rn.