r2c icon indicating copy to clipboard operation
r2c copied to clipboard

Issue with directory structure

Open ranamihir opened this issue 6 years ago • 3 comments
trafficstars

Hi,

I think the main directory is missing a setup.py file to install this code as a module, which should probably look something like this:

from setuptools import setup, find_packages

setup(
    name='r2c',
    version='0.1',
    packages=find_packages()
)

Also, when I downloaded the data, train.jsonl lies in the vcr1/vcr1annots/ folder, and cocoontology.json lies in the dataloaders folder, but this line and this line indicate that dataloaders should be inside the vcr1/vcr1annots/ folder, but the instructions on the website say that we can have a separate folder where the data has been downloaded. Can you please help clarify the confusion?

Thanks!

ranamihir avatar Feb 10 '19 22:02 ranamihir

Hi Mihir,

thanks for the note! yeah, I don't support running this repo as a module right now, since i tend to run individual subcomponents. If you think that would help other people, though, I'd be happy to merge a PR for running it as a module though.

So I moved train.jsonl out of the vcr1/vcr1annots/ folder and into the data/ folder (a symlink also works). However, I'm open to any other organization schemes though 😄

rowanz avatar Feb 14 '19 15:02 rowanz

Hi Rowan,

Thanks for the clarification! I'll try it with the new structure for now and also try to create a PR when I work out the best solution. Thanks!

ranamihir avatar Feb 17 '19 03:02 ranamihir

Hi, There's a little problem to run with the provided command in this README like python train.py -params multiatt/default.json -folder saves/flagship_answer in the current directory structure. Simple modification can work:

  1. move r2c/models/train.py to r2c/train.py.
  2. run with python train.py -params models/multiatt/default.json -folder models/saves/flagship_answer

Files in r2c/models/ like eval_q2ar.py have the similar issue.

And since cocoontology.json is provided along with this repo and I download all other data into a seperate folder which can be specified in config.py. I found changing the following line https://github.com/rowanz/r2c/blob/654356863daf92994c08222ad441b04bf9e4dc81/dataloaders/vcr.py#L134 to with open(os.path.join(os.path.dirname(__file__), 'cocoontology.json'), 'r') as f: is more reasonable.

HYPJUDY avatar Feb 26 '19 06:02 HYPJUDY