mk-minchul / dcface

137 stars 17 forks source link

Hydra error #5

Open gebaltso opened 1 year ago

gebaltso commented 1 year ago

Hello! When I run the "python synthesis.py --id_images_root sample_images/id_images/sample_57.png --style_images_root sample_images/style_images/woman" I get the following:

Traceback (most recent call last): File "/home/gebaltso/dcface/dcface/src/synthesis.py", line 21, in import hydra File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/init.py", line 5, in from hydra import utils File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/utils.py", line 8, in import hydra._internal.instantiate._instantiate2 File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 12, in from hydra._internal.utils import _locate File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/_internal/utils.py", line 18, in from hydra.core.utils import get_valid_filename, validate_config_path File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/core/utils.py", line 20, in from hydra.core.hydra_config import HydraConfig File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/core/hydra_config.py", line 6, in from hydra.conf import HydraConf File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/conf/init.py", line 46, in class JobConf: File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/site-packages/hydra/conf/init.py", line 75, in JobConf @dataclass ^^^^^^^^^ File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/dataclasses.py", line 1223, in dataclass return wrap(cls) ^^^^^^^^^ File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/dataclasses.py", line 1213, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/dataclasses.py", line 958, in _process_class cls_fields.append(_get_field(cls, name, type, kw_only)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/gebaltso/anaconda3/envs/dcface/lib/python3.11/dataclasses.py", line 815, in _get_field raise ValueError(f'mutable default {type(f.default)} for field ' ValueError: mutable default <class 'hydra.conf.JobConf.JobConfig.OverrideDirname'> for field override_dirname is not allowed: use default_factory

What may be the cause and how to fix it? Thanks in advance.

abhishektandon commented 1 year ago

could you fix this error? please let me know how, if you did.

gebaltso commented 1 year ago

could you fix this error? please let me know how, if you did.

No unfortunately I didn't. If someone could help it would be nice.

xht5555 commented 8 months ago

I also have the same error, but some people have successfully repeated it, so please support us

youngunghan commented 7 months ago

What is your version of Python? I got this error with 3.11 and I downgraded it to 3.8, so this error was fixed