Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Fail to train any agent with conell_movie dataset #3626

Closed
SYSU-lulc opened this issue Apr 28, 2021 · 1 comment · Fixed by #3627
Closed

Fail to train any agent with conell_movie dataset #3626

SYSU-lulc opened this issue Apr 28, 2021 · 1 comment · Fixed by #3627

Comments

@SYSU-lulc
Copy link

For example, when I train transformer/generator with cornell_movie dataset by command:
parlai train_model -t cornell_movie -m transformer/generator -mf ./data/models/transformer_generator/model_cornell_movie_lr1 -gpu 0 -bs 64 -eps 11 -sval True -veps 1 -lr 1

The following error occurred:
17:54:42 | Current ParlAI commit: 2426d74b93184689be5067bdbf99f1ba96748f7b 17:54:43 | creating task(s): cornell_movie 17:54:43 | loading fbdialog data: /data4/lulc/ben/util/ParlAI/data/CornellMovie/train.txt 17:54:44 | training... Traceback (most recent call last): File "/data4/lulc/anaconda3/envs/BEN/bin/parlai", line 33, in <module> sys.exit(load_entry_point('parlai', 'console_scripts', 'parlai')()) File "/data4/lulc/ben/util/ParlAI/parlai/__main__.py", line 14, in main superscript_main() File "/data4/lulc/ben/util/ParlAI/parlai/core/script.py", line 306, in superscript_main return SCRIPT_REGISTRY[cmd].klass._run_from_parser_and_opt(opt, parser) File "/data4/lulc/ben/util/ParlAI/parlai/core/script.py", line 89, in _run_from_parser_and_opt return script.run() File "/data4/lulc/ben/util/ParlAI/parlai/scripts/train_model.py", line 935, in run return self.train_loop.train() File "/data4/lulc/ben/util/ParlAI/parlai/scripts/train_model.py", line 899, in train for _train_log in self.train_steps(): File "/data4/lulc/ben/util/ParlAI/parlai/scripts/train_model.py", line 802, in train_steps world.parley() File "/data4/lulc/ben/util/ParlAI/parlai/core/worlds.py", line 865, in parley batch_act = self.batch_act(agent_idx, batch_observations[agent_idx]) File "/data4/lulc/ben/util/ParlAI/parlai/core/worlds.py", line 833, in batch_act batch_actions = a.batch_act(batch_observation) File "/data4/lulc/ben/util/ParlAI/parlai/core/torch_agent.py", line 2131, in batch_act batch = self.batchify(observations) File "/data4/lulc/ben/util/ParlAI/parlai/core/torch_generator_agent.py", line 658, in batchify batch = super().batchify(obs_batch, sort=sort) File "/data4/lulc/ben/util/ParlAI/parlai/core/torch_agent.py", line 1690, in batchify [ex.get('label_truncated_length') for ex in exs] TypeError: an integer is required (got type NoneType)

Actually, any attempts on command line parameters have failed, like '--truncate', '--text-truncate', or '--label-truncate'.
And any agents training with this dataset have failed either.
So, what is the correct way to train cornell_movie dataset?
Thanks~

@stephenroller
Copy link
Contributor

Thanks for reporting. #3627 is the patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants