AlexKuhnle / ShapeWorld

MIT License
58 stars 18 forks source link

Minor fixes to ace functionality #5

Closed jayelm closed 6 years ago

jayelm commented 6 years ago

Fixes:

  1. When ace fails, forming the AssertionError message creates an unhelpful TypeError because stdout_data and stderr_data are lists, not strings
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    generated = dataset.generate(n=128, mode='train', include_model=True)
  File "/local/scratch/jlm95/ShapeWorld/shapeworld/dataset.py", line 995, in generate
    captions = self.caption_realizer.realize(captions=captions)
  File "/local/scratch/jlm95/ShapeWorld/shapeworld/realizers/dmrs/realizer.py", line 286, in
realize
    assert len(caption_strings) == len(captions), stdout_data + '\n' + stderr_data
TypeError: can only concatenate list (not "str") to list
  1. The ace created on first use is not executable by default, which results in PermissionError.
AlexKuhnle commented 6 years ago

Thanks, @jayelm !