You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gridfm-graphkit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridfm-graphkit

Grid Foundation Model

0.0.3
pipPyPI
Maintainers
1

gridfm-graphkit

Docs

This library is brought to you by the GridFM team to train, finetune and interact with a foundation model for the electric power grid.

GridFM logo

Installation

You can install gridfm-graphkit directly from PyPI:

pip install gridfm-graphkit

To contribute or develop locally, clone the repository and install in editable mode:

git clone git@github.com:gridfm/gridfm-graphkit.git
cd gridfm-graphkit
python -m venv venv
source venv/bin/activate
pip install -e .

For documentation generation and unit testing, install with the optional dev and test extras:

pip install -e .[dev,test]

gridfm-graphkit CLI

An interface to train, fine-tune, and evaluate GridFM models using configurable YAML files and MLflow tracking.

gridfm_graphkit <command> [OPTIONS]

Available commands:

  • train – Train a new model
  • predict – Evaluate an existing model
  • finetune – Fine-tune a pre-trained model

Training Models

gridfm_graphkit train --config path/to/config.yaml

Arguments

ArgumentTypeDescriptionDefault
--configstrRequired for standard training. Path to base config YAML.None
--gridstrOptional. Path to grid search YAML. Not supported with -c.None
--expstrOptional. MLflow experiment name. Defaults to a timestamp.None
--data_pathstrOptional. Root dataset directory.data
-cflagOptional. Enable checkpoint mode.False
--model_exp_idstrRequired if -c is used. MLflow experiment ID.None
--model_run_idstrRequired if -c is used. MLflow run ID.None

Examples

Standard Training:

gridfm_graphkit train --config config/train.yaml --exp "run1"

Grid Search Training:

gridfm_graphkit train --config config/train.yaml --grid config/grid.yaml

Training from Checkpoint:

gridfm_graphkit train -c --model_exp_id 123 --model_run_id abc

Evaluating Models

gridfm_graphkit predict --model_path model.pth --config config/eval.yaml --eval_name run_eval

Arguments

ArgumentTypeDescriptionDefault
--model_pathstrOptional. Path to a model file.None
--model_exp_idstrRequired if --model_path is not used. MLflow experiment ID.None
--model_run_idstrRequired if --model_path is not used. MLflow run ID.None
--model_namestrOptional. Filename inside MLflow artifacts.best_model
--configstrRequired. Path to evaluation config.None
--eval_namestrRequired. Name of the evaluation run in MLflow.None
--data_pathstrOptional. Path to dataset directory.data

Examples

Evaluate a Logged MLflow Model:

gridfm_graphkit predict --config config/eval.yaml --eval_name run_eval --model_exp_id 1 --model_run_id abc

Fine-Tuning Models

gridfm_graphkit finetune --config path/to/config.yaml --model_path path/to/model.pth

Arguments

ArgumentTypeDescriptionDefault
--configstrRequired. Fine-tuning configuration file.None
--model_pathstrRequired. Path to a pre-trained model file.None
--expstrOptional. MLflow experiment name.None
--data_pathstrOptional. Root dataset directory.data

Keywords

electric power grid

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts