app.gui module

File: app/gui.py Project: 22HLT01 QUMPHY Contact: oskar.pfeffer@ptb.de Gitlab: https://gitlab.com/qumphy Description: Graphical user interface for training the models.

Cross-platform Tk GUI that:
  • lets the user pick (or create) a Python environment to run in:
    • current Python interpreter,

    • an existing conda environment,

    • an existing virtualenv / venv directory,

    • a new venv created from requirements.txt,

    • a new conda env created from requirements.txt;

  • lets the user pick a YAML config from app/configs (or browse the filesystem) and runs:

    <env-python> train.py –config <CONFIG_FILE>

Standard-library only — runs on Windows, macOS and Linux.

class app.gui.TrainGUI(root)[source]

Bases: object

Tk train-launcher window.

Wraps the full launcher workflow: pick (or create) a Python environment, pick or edit a YAML config from app/configs, and run app.train against the selected config in a background subprocess whose output is streamed back into the GUI.

Parameters:

root (tkinter.Tk) – Top-level Tk window the GUI is attached to.

app.gui.list_conda_envs()[source]

Return conda environment names. Empty list if conda is unavailable.

Return type:

list[str]

app.gui.main()[source]

Launch the train GUI and run the Tk main loop until the window closes.

Return type:

int

Returns:

Process exit code (always 0 from the launcher itself).

Return type:

int

app.gui.venv_python(venv_path)[source]

Return the python executable inside a venv directory.

Return type:

Path