Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with directory structure #9

Open
ranamihir opened this issue Feb 10, 2019 · 3 comments
Open

Issue with directory structure #9

ranamihir opened this issue Feb 10, 2019 · 3 comments

Comments

@ranamihir
Copy link

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 ranamihir changed the title Broken codebase Issue with directory structure Feb 10, 2019
@rowanz
Copy link
Owner

rowanz commented Feb 14, 2019

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 😄

@ranamihir
Copy link
Author

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!

@HYPJUDY
Copy link

HYPJUDY commented Feb 26, 2019

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

with open(os.path.join(os.path.dirname(VCR_ANNOTS_DIR), 'dataloaders', 'cocoontology.json'), 'r') as f:

to
with open(os.path.join(os.path.dirname(__file__), 'cocoontology.json'), 'r') as f:
is more reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants