You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to play a bit with ScorePerformer to understand it better. I installed all requirements in a new environment, and I did not change anything in the code. When trying to execute the train.py script, I'm getting an error from dataclasses:
$ python scoreperformer/train.py
Traceback (most recent call last):
File "/home/user/ScorePerformer/scoreperformer/train.py", line 5, in<module>
from scoreperformer.experiments import Trainer
File "/home/user/ScorePerformer/scoreperformer/experiments/__init__.py", line 1, in<module>
from .trainer import Trainer
File "/home/user/ScorePerformer/scoreperformer/experiments/trainer.py", line 22, in<module>
from scoreperformer.models.base import Model
File "/home/user/ScorePerformer/scoreperformer/models/__init__.py", line 2, in<module>
from .scoreperformer import (
File "/home/user/ScorePerformer/scoreperformer/models/scoreperformer/__init__.py", line 1, in<module>
from .embeddings import TupleTokenEmbeddings, TupleTokenLMHead, TupleTokenTiedLMHead
File "/home/user/ScorePerformer/scoreperformer/models/scoreperformer/embeddings.py", line 12, in<module>
from scoreperformer.modules.transformer import DiscreteContinuousEmbedding, DiscreteDenseContinuousEmbedding
File "/home/user/ScorePerformer/scoreperformer/modules/transformer/__init__.py", line 21, in<module>
from .transformer import (
File "/home/user/ScorePerformer/scoreperformer/modules/transformer/transformer.py", line 34, in<module>
@dataclass
^^^^^^^^^
File "/home/user/miniconda3/envs/ScorePerformer/lib/python3.11/dataclasses.py", line 1232, in dataclass
return wrap(cls)
^^^^^^^^^
File "/home/user/miniconda3/envs/ScorePerformer/lib/python3.11/dataclasses.py", line 1222, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/ScorePerformer/lib/python3.11/dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/miniconda3/envs/ScorePerformer/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'scoreperformer.modules.transformer.attention.AttentionConfig'>for field attention is not allowed: use default_factory
I know that I should probably pass some parameters to the script (e.g. data location), but I assume that the script should error due to missing parameters rather than this one.
By the way, having an example of a training command would be very valuable!
The text was updated successfully, but these errors were encountered:
I'm trying to play a bit with ScorePerformer to understand it better. I installed all requirements in a new environment, and I did not change anything in the code. When trying to execute the
train.py
script, I'm getting an error from dataclasses:I know that I should probably pass some parameters to the script (e.g. data location), but I assume that the script should error due to missing parameters rather than this one.
By the way, having an example of a training command would be very valuable!
The text was updated successfully, but these errors were encountered: