facebookresearch / ParlAI

A framework for training and evaluating AI models on a variety of openly available dialogue datasets.
https://parl.ai
MIT License
10.49k stars 2.1k forks source link

Display_data script does not work for dealnodeal #2474

Closed rramakrishnan-asapp closed 4 years ago

rramakrishnan-asapp commented 4 years ago

Bug description When running python examples/display_data.py -t dealnodeal, an error occurs, but it works for other datasets like twitter and babi.

Reproduction steps I installed ParlAI, ran the suggested "python examples/display_data.py -t twitter", which worked! I want to work with the Deal or No Deal dataset, which led to an error about the 'TeacherMetrics' object having no attribute 'update'. Logs included below.

Expected behavior For the twitter and babi datasets, I saw a few examples of the data and expected a similar output for the Deal or No Deal dataset.

Logs /persist/anaconda3/lib/python3.7/site-packages/sklearn/feature_extraction/text.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working from collections import Mapping, defaultdict [ optional arguments: ] [ display_ignore_fields: agent_reply ] [ max_display_len: 1000 ] [ num_examples: 10 ] [ Main ParlAI Arguments: ] [ batchsize: 1 ] [ datapath: /persist/ParlAI/data ] [ datatype: train:stream ] [ download_path: /persist/ParlAI/downloads ] [ dynamic_batching: None ] [ hide_labels: False ] [ image_mode: raw ] [ init_opt: None ] [ multitask_weights: [1] ] [ numthreads: 1 ] [ show_advanced_args: False ] [ task: dealnodeal ] [ ParlAI Model Arguments: ] [ dict_class: None ] [ init_model: None ] [ model: None ] [ model_file: None ] [ ParlAI Image Preprocessing Arguments: ] [ image_cropsize: 224 ] [ image_size: 256 ] [ Current ParlAI commit: b1a1f16ba9b1197d3ddfdb3bc3cec7917042ce03 ] [creating task(s): dealnodeal] loading: /persist/ParlAI/data/negotiation/end-to-end-negotiator-master/src/data/negotiate/train.txt Traceback (most recent call last): File "/persist/ParlAI/examples/display_data.py", line 23, in display_data(opt) File "/persist/ParlAI/parlai/scripts/display_data.py", line 46, in display_data world.parley() File "/persist/ParlAI/parlai/core/worlds.py", line 343, in parley agents[0].observe(validate(acts[1])) File "/persist/ParlAI/parlai/tasks/dealnodeal/agents.py", line 111, in observe self.metrics.update(observation, self.expected_reponse) AttributeError: 'TeacherMetrics' object has no attribute 'update'

Additional context Add any other context about the problem here. (like proxy settings, network setup, overall goals, etc.)

stephenroller commented 4 years ago

Thanks for filing!