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

Experiment manager bug fix #154

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Conradcon
Copy link

Reviewed the experiment manager issue #135 it seems that the issue was in the execute_runs() function in the experiment_manager.py file.

The function is trying to call ponyge.py as an executable string in the subprocess call, but can't find it as it's not in the current working directory.

 exec_str = executable + " ponyge.py " \
               "--random_seed " + str(seed) + " " + " ".join(sys.argv[1:])

    call(exec_str, shell=True)

I added a call in the experiment_manager.py main() function to change the directory to the parent dir chdir("..") that allowed ponyge.py to run and resolved some file path issues for grammars and datasets.

I also added the parent directory to the path with pathlib as only the current working directory scripts got added when experiment_manager.py is run.

from pathlib import Path
path.append(str(Path().resolve().parents[0]))

I also updated some module imports that didn't work with the new directory structure.

I ran the example problems as tests with experiment_manager.py and with the standard ponyge.py on a Macbook running Python 3.8.5 with no issues.

Added parent dir to path list,
Updated module imports,
Add a command to change the dir to that ponyge.py can run in the excute_run() function
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

Successfully merging this pull request may close these issues.

1 participant