Skip to content

Problem running Python/Pytorch on Windows #119

@johann-petrak

Description

@johann-petrak

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions