Closed AtheerAlgherairy closed 1 year ago
what is the version of datasets
?
what is the version of
datasets
?
It is a normalized version of sgd: normalized_sgd First, I normalized the domains and slots names of the original version of sgd. Second, I converted it to Convlab unified format using the preprocess.py (under sgd dataset folder). I already used this normalized_sgd version with JointBert and now I am trying to use T5, the training done and I have the model but I was trying to run the evaluation code..
I mean the python package datasets
version. Is the training process successful?
I mean the python package
datasets
version. Is the training process successful?
I mean the python package
datasets
version. Is the training process successful?
I tried to repeat the training process on speaker=user but I got the same error..
Name: datasets Version: 2.7.1
I deleted "spec" in main_mod_name = getattr(main_module.spec, "name", None) (From anaconda3\lib\site-packages\multiprocess\spawn.py file).
but I got another error when testing ( --do_predict ):
I tried to repeat the training process on speaker=user but I got the same error..
I think one possible reason is your environment changed after your first training. Recently I trained a T5NLU model using the following setting:
I think you can re-installed the package with these versions. ConvLabSeq2SeqTrainer
inherits from Hugging Face Transformers Trainer
. So the version of Transformers
may matter
I installed the following packages:
But still I cant do the evaluation for T5, I got the error: AttributeError: 'ConvLabSeq2SeqTrainer' object has no attribute '_max_length'
Can I set the max_length to 512 manually in the code to avoid this error?
That's really weird. In the source code of Seq2SeqTrainer
[link], the self._max_length
is assigned in evaluate
and predict
functions. In run_seq2seq.py
, trainer.predict
is called, so when prediction_step
is called, the self._max_length
should be assigned already.
May you paste the full error message?
Can I set the max_length to 512 manually in the code to avoid this error?
You can. But I think the problem you meet is so special, and finding out the real reason is better.
The following are framework versions for the trained model in my output:
This is the full error message when I do the evaluation:
The error also occurs for (_num_beams) attribute.
The reason is the version of Transformers 4.25.1
changes the functions of Seq2SeqTrainer
, see https://github.com/huggingface/transformers/blob/main/src/transformers/trainer_seq2seq.py#L30
You can downgrade transformers version to be aligned with mine. In setup.py
, we require 'transformers>=4.17.0,<=4.24.0',
So I need to downgrade transformers version and repeat the training process?
I think if your previous training is success, you don't need to repeat
Are you using colab all the time? I think that will cause a unstable environment since it need to re-install package every time re-start
No. Jupyter notebook.
I downgraded the transformers to 4.20.1 and run the evaluation. I got the prediction results now and also the following error:
That doesn't matter. The function trainer.create_model_card
is used to create a README.md
automatically as a model card in the hugging face hub. The error raises from unrecognized model_name_or_path
in hugging face hub (in your case, the output_dir
is not a valid one)
Many thanks..
You are welcome!
I did train (t5-small) model on a dataset in Convlab unified format. But when comes to test ( --do_predict ) I got the following error:
(