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

Problem running Python/Pytorch on Windows #119

Open
johann-petrak opened this issue Nov 5, 2020 · 1 comment
Open

Problem running Python/Pytorch on Windows #119

johann-petrak opened this issue Nov 5, 2020 · 1 comment

Comments

@johann-petrak
Copy link
Collaborator

This happens when Python is installed in a non-standard way under Windows, is not on the path or the wrong environment is active when running GATE.

With LearningFramework versions 4.2 and 4.3-SNAPSHOT until 2020-11-04, the Windows script running the python command will terminate but the LearningFramework does not detect this and when training is run, everything looks fine on first glance. However, there will be no output from the Pytorch training which must be there if a model is trained successfully.

If Python is not on the path with the correct packages installed as described in https://gatenlp.github.io/gateplugin-LearningFramework/Installation it is possible to configure how to run python by doing this:

  • Create a file with the name "FileJsonPyTorch.yaml" in the model directory, i.e. the directory that contains the file info.yaml after trying to run train once
  • Edit the file FileJsonPyTorch.yaml and add a line that specifies the location of the python interpreter for the correct Python environment, e.g. something like:
PYTHON_BIN: C:\Users\someuser\anaconda3\envs\gatelf\python.exe

Note that if you want to enclose the path name in double quotes, the backslashes must be doubled like so:

PYTHON_BIN: "C:\\Users\\someuser\\anaconda3\\envs\\gatelf\\python.exe"
@johann-petrak
Copy link
Collaborator Author

Need to fix the problem of the LearningFramework not realizing that something went wrong.

For now added a check in version 4.3-SNAPSHOT which throws an exception.

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

1 participant