matthew-z / R-net

R-net in PyTorch, with ELMo
MIT License
199 stars 43 forks source link

ImportError: cannot import name 'main' from 'allennlp.commands.subcommand' #17

Closed VinACE closed 5 years ago

VinACE commented 5 years ago

Traceback (most recent call last): File "main.py", line 5, in from allennlp.commands.subcommand import main, Subcommand ImportError: cannot import name 'main' from 'allennlp.commands.subcommand' (/demo-mount/qanet/lib/python3.7/site-packages/allennlp/commands/subcommand.py) [INFO/MainProcess] process shutting down (qanet) ofsdms@t01:/demo-mount/R-net$ (qanet) ofsdms@san-qanet01:/demo-mount/R-net$ (qanet) ofsdms@san-qanet01:/demo-mount/R-net$ python Python 3.7.2 (default, May 8 2019, 11:07:39) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information.

import allennlp allennlp.version '0.7.2'

VinACE commented 5 years ago

from allennlp.commands.subcommand import Subcommand from allennlp.commands import main # https://github.com/allenai/allennlp/blob/master/allennlp/run.py

changed to above in code