fairseq
fairseq copied to clipboard
ImportError: cannot import name 'hyperparam' from 'sweep' ...
❓ Questions and Help
Before asking:
- search the issues.
- search the docs.
What is your question?
Hi, I can not run fine-tuning with NLLB200 setting.
Code
What have you tried?
I am trying to fine-tune with NLLB200 setting
DROP=0.1
python examples/nllb/modeling/train/train_script.py \
cfg=nllb200_dense3.3B_finetune_on_fbseed \
cfg/dataset=fbseed_chat.yaml \
cfg.dataset.lang_pairs="eng_Latn-hye_Armn" \
cfg.fairseq_root=$(pwd) \
cfg.output_dir=output \
cfg.dropout=$DROP \
cfg.warmup=10 \
cfg.finetune_from_model=fairseq/model/nllb200dense3bcheckpoint
But I am getting error:
ImportError: cannot import name 'hyperparam' from 'sweep' (/home/arm2/.local/lib/python3.10/site-packages/sweep/init.py)
I am trying to find any note about "from sweep import hyperparam", which is used in examples/nllb/modeling/sweet/sweet_mmt.py, but yet it is not successful.
What's your environment?
- fairseq Version: 0.12.2:
- PyTorch Version: 2.1.1
- OS (e.g., Linux): Ubuntu 22.04
- How you installed fairseq: pip:
- Build command you used: no
- Python version: 3.10
- CUDA/cuDNN version: 12.3
- GPU models and configuration:
- Any other relevant information:
Could you please advise me? Thank you in advance!
The sweep package of pip (https://pypi.org/project/sweep/) has no 'hyperparam' function. It is a biological module! I could not find similar package with 'hyperparam' function. Is there a mistake of fairseq developers or something else?
The Facebook team did a lot of effort to write this instruction: https://github.com/facebookresearch/fairseq/tree/nllb/examples/nllb/modeling But it is not working because of trivial mistakes. Why? Why you did such useless job? Is it not a big corporation reputation issue?
@ican24 did you find a solution?
Yes, we used recommendations from this page: https://huggingface.co/learn/nlp-course/chapter7/4?fw=tf If you'll meet trouble, I'll send you ready script as template by email.