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

Errors when using reusing relative paths in output section #252

Closed
desilinguist opened this issue Aug 26, 2015 · 2 comments
Closed

Errors when using reusing relative paths in output section #252

desilinguist opened this issue Aug 26, 2015 · 2 comments
Assignees
Milestone

Comments

@desilinguist
Copy link
Member

How to reproduce:

  1. You want to put logs, models, predictions etc. in the same directory and so you use the same relative path to that directory in the config file.
  2. You run the command run_experiment <config_file> from outside the directory where the config file lives.

You will get the error:

Traceback (most recent call last):
  File "/Users/nmadnani/anaconda/envs/garbage/bin/run_experiment", line 6, in <module>
    sys.exit(main())
  File "/Users/nmadnani/anaconda/envs/garbage/lib/python3.4/site-packages/skll/utilities/run_experiment.py", line 108, in main
    ablation=ablation, resume=args.resume)
  File "/Users/nmadnani/anaconda/envs/garbage/lib/python3.4/site-packages/skll/experiments.py", line 697, in run_configuration
    custom_learner_path) = _parse_config_file(config_file)
  File "/Users/nmadnani/anaconda/envs/garbage/lib/python3.4/site-packages/skll/config.py", line 448, in _parse_config_file
    os.makedirs(prediction_dir)
  File "/Users/nmadnani/anaconda/envs/garbage/lib/python3.4/os.py", line 237, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/Users/nmadnani/work/caaspp-wer-garbage-detection/skll/output'

This happens because when checking whether to create the directories in _parse_config_file() in config.py, we check the relative path version instead of the properly located version relative to the config file.

@desilinguist desilinguist added this to the 1.2 milestone Aug 26, 2015
@desilinguist desilinguist self-assigned this Aug 26, 2015
@desilinguist desilinguist removed this from the 1.2 milestone Aug 26, 2015
@dan-blanchard
Copy link
Contributor

Linking to #213, since it was a very similar issue.

@desilinguist desilinguist added this to the 1.2 milestone Jan 26, 2016
@desilinguist desilinguist assigned mulhod and unassigned desilinguist Feb 8, 2016
@desilinguist
Copy link
Member Author

Addressed by #287.

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