8000 pre_word_vecs_enc attribute is not defined in the TrainConfig model · Issue #107 · eole-nlp/eole · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pre_word_vecs_enc attribute is not defined in the TrainConfig model #107

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

Open
HURIMOZ opened this issue Sep 19, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@HURIMOZ
Copy link
HURIMOZ commented Sep 19, 2024

Hi all, Iʻm using pre-trained embeddings and I get this error:

(TY-EN) ubuntu@ip-172-31-2-199:~/TY-EN/eole/recipes/wmt17$ eole train --config wmt17_enty.yaml
[2024-09-19 04:42:34,864 INFO] Get special vocabs from Transforms: {'src': [], 'tgt': []}.
[2024-09-19 04:42:34,930 INFO] Reading encoder embeddings from data/en.wiki.bpe.vs25000.d300.w2v-256.txt
[2024-09-19 04:42:37,129 INFO]  Found 25000 total vectors in file.
[2024-09-19 04:42:37,129 INFO] After filtering to vectors in vocab:
[2024-09-19 04:42:37,135 INFO]  * enc: 16041 match, 7 missing, (99.96%)
[2024-09-19 04:42:37,135 INFO]
Saving encoder embeddings as:
        * enc: processed_data/.enc_embeddings.pt
Traceback (most recent call last):
  File "/home/ubuntu/TY-EN/TY-EN/bin/eole", line 33, in <module>
    sys.exit(load_entry_point('eole', 'console_scripts', 'eole')())
  File "/home/ubuntu/TY-EN/eole/eole/bin/main.py", line 39, in main
    bin_cls.run(args)
  File "/home/ubuntu/TY-EN/eole/eole/bin/run/train.py", line 69, in run
    train(config)
  File "/home/ubuntu/TY-EN/eole/eole/bin/run/train.py", line 56, in train
    train_process(config, device_id=0)
  File "/home/ubuntu/TY-EN/eole/eole/train_single.py", line 141, in main
    checkpoint, vocabs, transforms, config = _init_train(config)
  File "/home/ubuntu/TY-EN/eole/eole/train_single.py", line 96, in _init_train
    vocabs, transforms = prepare_transforms_vocabs(config, transforms_cls)
  File "/home/ubuntu/TY-EN/eole/eole/train_single.py", line 38, in prepare_transforms_vocabs
    prepare_pretrained_embeddings(config, vocabs)
  File "/home/ubuntu/TY-EN/eole/eole/modules/embeddings.py", line 331, in prepare_pretrained_embeddings
    config.pre_word_vecs_enc = enc_output_file
  File "/home/ubuntu/TY-EN/TY-EN/lib/python3.10/site-packages/pydantic/main.py", line 853, in __setattr__
    self.__pydantic_validator__.validate_assignment(self, name, value)
pydantic_core._pydantic_core.ValidationError: 1 validation error for TrainConfig
pre_word_vecs_enc
  Object has no attribute 'pre_word_vecs_enc' [type=no_such_attribute, input_value='processed_data/.enc_embeddings.pt', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/no_such_attribute

The code is attempting to assign a value to pre_word_vecs_enc which does not exist as a field in the TrainConfig model.

@francoishernandez
Copy link
Member

Duplicate of #94, where my reply still stands -- #94 (comment)
Do not hesitate to PR the fix, should be relatively straightforward.

@francoishernandez francoishernandez added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0