GateNLP / gateplugin-LearningFramework

A plugin for the GATE language technology framework for training and using machine learning models. Currently supports Mallet (MaxEnt, NaiveBayes, CRF and others), LibSVM, Scikit-Learn, Weka, and DNNs through Pytorch and Keras.
https://gatenlp.github.io/gateplugin-LearningFramework/
GNU Lesser General Public License v2.1
26 stars 6 forks source link

Problem running Python/Pytorch on Windows #119

Open johann-petrak opened 3 years ago

johann-petrak commented 3 years ago

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:

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 commented 3 years ago

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.