nikvaessen / w2v2-speaker

Research code for the paper "Fine-tuning wav2vec2 for speaker recognition" found at https://arxiv.org/abs/2109.15053
MIT License
143 stars 14 forks source link

strange error: isinstance() arg 2 must be a type or tuple of types #10

Open Arthurwyf opened 1 year ago

Arthurwyf commented 1 year ago

MKL_NUM_THREADS=1 CUDA_VISIBLE_DEVICES=1 python run.py +experiment=speaker_ecapa_tdnn tune_model=True data/module=dogbark trainer.auto_lr_find=auto_lr_find tune_iterations=5000 /home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/pytorch_lightning/core/decorators.py:65: LightningDeprecationWarning: The @auto_move_data decorator is deprecated in v1.3 and will be removed in v1.5. Please use trainer.predict instead for inference. The decorator was applied to forward rank_zero_deprecation( /home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/pytorch_lightning/core/decorators.py:65: LightningDeprecationWarning: The @auto_move_data decorator is deprecated in v1.3 and will be removed in v1.5. Please use trainer.predict instead for inference. The decorator was applied to forward rank_zero_deprecation( data_folder: ${oc.env:DATA_FOLDER} temp_folder: ${oc.env:TEMP_FOLDER} log_folder: ${oc.env:LOG_FOLDER} seed: 42133724 tune_model: true tune_iterations: 5000 verify_model: false fit_model: true eval_model: true load_network_from_checkpoint: null use_cometml: ${oc.decode:${oc.env:USE_COMET_ML}} gpus: ${oc.decode:${oc.env:NUM_GPUS}} project_name: ecapa-tdnn experiment_name: ${random_uuid:} tag: ${now:%Y-%m-%d} callbacks: to_add:

3.9.0 pytorch_lightning.version='1.4.5' torch.version='1.8.2+cu102' [2023-03-27 20:54:04,608][pytorch_lightning.utilities.seed][INFO] - Global seed set to 42133724 Error executing job with overrides: ['+experiment=speaker_ecapa_tdnn', 'tune_model=True', 'data/module=dogbark', 'trainer.auto_lr_find=auto_lr_find', 'tune_iterations=5000'] Traceback (most recent call last): File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(*args, **kwargs) File "", line 33, in init File "/home/arthur/dog_verification/w2v2-speaker-master/src/config_util.py", line 26, in __post_init__ post_init_type_cast(self) File "/home/arthur/dog_verification/w2v2-speaker-master/src/config_util.py", line 41, in post_init_type_cast elif isinstance(value, typehint_cls): TypeError: isinstance() arg 2 must be a type or tuple of types

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/utils.py", line 211, in run_and_report return func() File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/utils.py", line 368, in lambda: hydra.run( File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/internal/hydra.py", line 110, in run = ret.return_value File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/core/utils.py", line 233, in return_value raise self._return_value File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/core/utils.py", line 160, in run_job ret.return_value = task_function(task_cfg) File "run.py", line 38, in run return run_train_eval_script(cfg) File "/home/arthur/dog_verification/w2v2-speaker-master/src/main.py", line 429, in run_train_eval_script dm = construct_data_module(cfg) File "/home/arthur/dog_verification/w2v2-speaker-master/src/main.py", line 127, in construct_data_module dm_cfg = hydra.utils.instantiate(cfg.data.module) File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 180, in instantiate return instantiate_node(config, args, recursive=recursive, convert=convert) File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 249, in instantiate_node return _call_target(target, args, *kwargs) File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 64, in _call_target raise type(e)( File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 62, in _call_target return target(args, **kwargs) File "", line 33, in init File "/home/arthur/dog_verification/w2v2-speaker-master/src/config_util.py", line 26, in __post_init__ post_init_type_cast(self) File "/home/arthur/dog_verification/w2v2-speaker-master/src/config_util.py", line 41, in post_init_type_cast elif isinstance(value, typehint_cls): TypeError: Error instantiating 'src.data.modules.speaker.voxceleb.VoxCelebDataModuleConfig' : isinstance() arg 2 must be a type or tuple of types

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "run.py", line 48, in run() File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/main.py", line 49, in decorated_main _run_hydra( File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/utils.py", line 367, in _run_hydra run_and_report( File "/home/arthur/.conda/envs/w2v2/lib/python3.8/site-packages/hydra/_internal/utils.py", line 251, in run_and_report assert mdl is not None AssertionError