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

NameError: name 'plutil' is not defined #19

Open
yhJang94 opened this issue Jan 23, 2024 · 1 comment
Open

NameError: name 'plutil' is not defined #19

yhJang94 opened this issue Jan 23, 2024 · 1 comment

Comments

@yhJang94
Copy link

yhJang94 commented Jan 23, 2024

how can i solve this problem?

python -m shapeformer.trainer --opts configs/demo/demo_vqdif.yaml --gpu 0 --mode "run"
**** INFO **** Choosing GPUS: [0]
**** INFO **** Resetting GPUS ids to: [0]
**** INFO **** Running single opt file
Global seed set to 314
Traceback (most recent call last):
File "/.conda/envs/shapeformer/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/.conda/envs/shapeformer/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/ShapeFormer/shapeformer/trainer.py", line 353, in
trainer = Trainer(parsed.opts[0], mode='train', gpus=gpus)
File "/ShapeFormer/shapeformer/trainer.py", line 61, in init
self.load_model()
File "/ShapeFormer/shapeformer/trainer.py", line 124, in load_model
self.model = sysutil.instantiate_from_opt(self.opt.pl_model_opt)
File "/ShapeFormer/xgutils/sysutil.py", line 279, in instantiate_from_opt
return load_object(opt["class"])(**opt.get("kwargs", dict()))
File "/ShapeFormer/xgutils/sysutil.py", line 273, in load_object
return load_module_object(module_path, object_name)
File "/ShapeFormer/xgutils/sysutil.py", line 255, in load_module_object
modulelib = importlib.import_module(module_path)
File "/.conda/envs/shapeformer/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/ShapeFormer/shapeformer/models/vqdif/vqdif.py", line 170, in
class VisRecon3D(plutil.VisCallback):
NameError: name 'plutil' is not defined

@QhelDIV
Copy link
Owner

QhelDIV commented Jan 24, 2024

It turns out this is due to the fact you are using a newer version of the xgutils library, where you can not import the utils by just from xgutils import *.

To resolve this problem, you can simply using the xgutils at version b549310, (which is also the commit number of branch 'shapeformer').
I have updated this repo, when you git clone --recursive git@github.com:QhelDIV/ShapeFormer.git you should automatically get the right version of xgutils.

Hope this method works for you. If not so, feel free to put more information here.

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