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

error on running first example #48

Closed puneetjindal closed 7 years ago

puneetjindal commented 7 years ago

python3 examples/display_data.py -t babi:task1k:1

[numthreads:1] [task:babi:task1k:1] [datatype:train] [batchsize:1] [num_examples:10] [datapath:/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/data/] [download_path:/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/downloads/] [Agent initializing.] [creating task(s): babi:task1k:1] [building data: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/data//bAbI/] sh: wget: command not found Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/agents.py", line 218, in _create_task_agents create_agent = getattr(my_module, 'create_agents') AttributeError: 'module' object has no attribute 'create_agents'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "examples/display_data.py", line 42, in main() File "examples/display_data.py", line 30, in main world = create_task(opt, agent) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/worlds.py", line 673, in create_task world = create_task_world(opt, user_agents) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/worlds.py", line 648, in create_task_world world_class, task_agents = _get_task_world(opt) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/worlds.py", line 643, in _get_task_world task_agents = _create_task_agents(opt) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/agents.py", line 222, in _create_task_agents return create_task_agent_from_taskname(opt) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/agents.py", line 186, in create_task_agent_from_taskname task_agents = teacher_class(opt) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/tasks/babi/agents.py", line 28, in init opt['datafile'] = _path('', task.split(':')[2], opt) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/tasks/babi/agents.py", line 15, in _path build(opt) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/tasks/babi/build.py", line 23, in build build_data.download(dpath, url) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/parlai/core/build_data.py", line 19, in download raise RuntimeError('failed: ' + s) RuntimeError: failed: cd "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/parlai-0.1.0-py3.4.egg/data//bAbI/"; wget https://s3.amazonaws.com/fair-data/parlai/babi/babi.tar.gz

`

Solution is to install wget first. It doesn't automatically provides wget as in the requirements file pip3 install wget also upgrade pip if not done

alexholdenmiller commented 7 years ago

We were requiring the operating system wget (via os.execute('cd {path}; wget {url}')), #47 should fix this by using the python wget package which is now included in the requirements file. Thanks for the report!

alexholdenmiller commented 7 years ago

should be resolved, let me know if you experience any further issues!

puneetjindal commented 7 years ago

Even after doing "pip3 install -r requirements.txt" I was still experiencing this error on my Mac machine. brew install wget finally resolved the issue