Grid Foundation Model
Project description
gridfm-graphkit
This library is brought to you by the GridFM team to train, finetune and interact with a foundation model for the electric power grid.
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]
CLI commands
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 from scrathcfinetune– Fine-tune an existing pre-trained modelevaluate– Evaluate model performance on a datasetpredict– Run inference and save predictions
Training Models
gridfm_graphkit train --config path/to/config.yaml
Arguments
| Argument | Type | Description | Default |
|---|---|---|---|
--config |
str |
Required. Path to the training configuration YAML file. | None |
--exp_name |
str |
Optional. MLflow experiment name. | timestamp |
--run_name |
str |
Optional. MLflow run name. | run |
--log_dir |
str |
Optional. MLflow logging directory. | mlruns |
--data_path |
str |
Optional. Root dataset directory. | data |
Examples
Standard Training:
gridfm_graphkit train --config examples/config/case30_ieee_base.yaml --data_path examples/data
Fine-Tuning Models
gridfm_graphkit finetune --config path/to/config.yaml --model_path path/to/model.pth
Arguments
| Argument | Type | Description | Default |
|---|---|---|---|
--config |
str |
Required. Fine-tuning configuration file. | None |
--model_path |
str |
Required. Path to a pre-trained model file. | None |
--exp_name |
str |
MLflow experiment name. | timestamp |
--run_name |
str |
MLflow run name. | run |
--log_dir |
str |
MLflow logging directory. | mlruns |
--data_path |
str |
Root dataset directory. | data |
Evaluating Models
gridfm_graphkit evaluate --config path/to/eval.yaml --model_path path/to/model.pth
Arguments
| Argument | Type | Description | Default |
|---|---|---|---|
--config |
str |
Required. Path to evaluation config. | None |
--model_path |
str |
Path to the trained model file. | None |
--exp_name |
str |
MLflow experiment name. | timestamp |
--run_name |
str |
MLflow run name. | run |
--log_dir |
str |
MLflow logging directory. | mlruns |
--data_path |
str |
Dataset directory. | data |
Running Predictions
gridfm_graphkit predict --config path/to/config.yaml --model_path path/to/model.pth
Arguments
| Argument | Type | Description | Default |
|---|---|---|---|
--config |
str |
Required. Path to prediction config file. | None |
--model_path |
str |
Path to the trained model file. | None |
--exp_name |
str |
MLflow experiment name. | timestamp |
--run_name |
str |
MLflow run name. | run |
--log_dir |
str |
MLflow logging directory. | mlruns |
--data_path |
str |
Dataset directory. | data |
--output_path |
str |
Directory where predictions are saved. | data |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gridfm_graphkit-0.0.6.tar.gz.
File metadata
- Download URL: gridfm_graphkit-0.0.6.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aba94a9c1c2b3d0e82789772add63906b9f8c011dded13c76e2bbaca0dc400d
|
|
| MD5 |
5268fa5c2e311dc4df9916367712dac2
|
|
| BLAKE2b-256 |
67ff962c1d09bb721497a9ffd05d0c2e7a52e0af9df51bca61884ea993747c8f
|
Provenance
The following attestation bundles were made for gridfm_graphkit-0.0.6.tar.gz:
Publisher:
release.yaml on gridfm/gridfm-graphkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gridfm_graphkit-0.0.6.tar.gz -
Subject digest:
7aba94a9c1c2b3d0e82789772add63906b9f8c011dded13c76e2bbaca0dc400d - Sigstore transparency entry: 463698494
- Sigstore integration time:
-
Permalink:
gridfm/gridfm-graphkit@e1a6b765af37bcafce6f0fb3e68a99972b3f1737 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/gridfm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e1a6b765af37bcafce6f0fb3e68a99972b3f1737 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gridfm_graphkit-0.0.6-py3-none-any.whl.
File metadata
- Download URL: gridfm_graphkit-0.0.6-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6198e92b6dc87bc404736ae8ea396f704ad743854706d9900680ced9c71e621
|
|
| MD5 |
8ddd3e890cd8f08109965eb6a812960f
|
|
| BLAKE2b-256 |
1fcbf9a2735c57a2cfb9a8ead8d8823a38bcffeff3779b161ae2b158806b8184
|
Provenance
The following attestation bundles were made for gridfm_graphkit-0.0.6-py3-none-any.whl:
Publisher:
release.yaml on gridfm/gridfm-graphkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gridfm_graphkit-0.0.6-py3-none-any.whl -
Subject digest:
e6198e92b6dc87bc404736ae8ea396f704ad743854706d9900680ced9c71e621 - Sigstore transparency entry: 463698531
- Sigstore integration time:
-
Permalink:
gridfm/gridfm-graphkit@e1a6b765af37bcafce6f0fb3e68a99972b3f1737 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/gridfm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@e1a6b765af37bcafce6f0fb3e68a99972b3f1737 -
Trigger Event:
release
-
Statement type: