salesforce / decaNLP

The Natural Language Decathlon: A Multitask Challenge for NLP
BSD 3-Clause "New" or "Revised" License
2.34k stars 474 forks source link

Exception while processing wikisql dataset #27

Closed cristipp closed 6 years ago

cristipp commented 6 years ago
$ nvidia-docker run -it --rm -v `pwd`:/decaNLP/ -u $(id -u):$(id -g) decanlp bash -c "python /decaNLP/train.py --train_tasks wikisql --gpu 0"

process_main - Adding wikisql to training datasets
Traceback (most recent call last):
  File "/decaNLP/train.py", line 366, in <module>
    main()
  File "/decaNLP/train.py", line 353, in main
    field, train_sets, val_sets = prepare_data(args, field, logger)
  File "/decaNLP/train.py", line 67, in prepare_data
    split = get_splits(args, task, FIELD, **kwargs)[0]
  File "/decaNLP/util.py", line 129, in get_splits
    fields=FIELD, root=args.data, **kwargs)
  File "/decaNLP/text/torchtext/datasets/generic.py", line 568, in splits
    os.path.join(path, train), fields, **kwargs)
  File "/decaNLP/text/torchtext/datasets/generic.py", line 540, in __init__
    ex = data.Example.fromlist([context, question, answer, CONTEXT_SPECIAL, QUESTION_SPECIAL, context_question, idx], fields)
  File "/decaNLP/text/torchtext/data/example.py", line 62, in fromlist
    setattr(ex, name, [sys.intern(x) for x in field.preprocess(val)])
TypeError: 'int' object is not iterable
bmccann commented 6 years ago

Should be the same issue as https://github.com/salesforce/decaNLP/issues/26

847a9dd should fix this, but I'm looking at https://github.com/salesforce/decaNLP/pull/28/commits/6b3ddd56eae6e688cd4a60f33a4af7e0f49a1d48

cristipp commented 6 years ago

847a9dd fixed it. Thanks!