<p align="center">
<img src="https://raw.githubusercontent.com/gridfm/gridfm-graphkit/refs/heads/main/docs/figs/KIT.png" alt="GridFM logo" style="width: 40%; height: auto;"/>
<br/>
</p>
<p align="center" style="font-size: 25px;">
<b>gridfm-graphkit</b>
</p>
[](https://doi.org/10.5281/zenodo.17016737)
[](https://gridfm.github.io/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:
```bash
pip install gridfm-graphkit
```
To contribute or develop locally, clone the repository and install in editable mode:
```bash
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:
```bash
pip install -e .[dev,test]
```
# CLI commands
An interface to train, fine-tune, and evaluate GridFM models using configurable YAML files and MLflow tracking.
```bash
gridfm_graphkit <command> [OPTIONS]
```
Available commands:
* `train` – Train a new model from scrathc
* `finetune` – Fine-tune an existing pre-trained model
* `evaluate` – Evaluate model performance on a dataset
* `predict` – Run inference and save predictions
---
## Training Models
```bash
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:**
```bash
gridfm_graphkit train --config examples/config/case30_ieee_base.yaml --data_path examples/data
```
---
## Fine-Tuning Models
```bash
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
```bash
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
```bash
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` |
---
Raw data
{
"_id": null,
"home_page": null,
"name": "gridfm-graphkit",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.10",
"maintainer_email": "Matteo Mazzonelli <matteo.mazzonelli1@ibm.com>",
"keywords": "electric power grid, foundational model, graph neural networks",
"author": null,
"author_email": "Matteo Mazzonelli <matteo.mazzonelli1@ibm.com>, Alban Puech <apuech@seas.harvard.edu>, Tamara Govindasamy <tamara.govindasamy@ibm.com>, Mangaliso Mngomezulu <mngomezulum@ibm.com>, Etienne Vos <etienne.vos@ibm.com>, Celia Cintas <celia.cintas@ibm.com>, Jonas Weiss <jwe@zurich.ibm.com>",
"download_url": "https://files.pythonhosted.org/packages/67/ff/962c1d09bb721497a9ffd05d0c2e7a52e0af9df51bca61884ea993747c8f/gridfm_graphkit-0.0.6.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/gridfm/gridfm-graphkit/refs/heads/main/docs/figs/KIT.png\" alt=\"GridFM logo\" style=\"width: 40%; height: auto;\"/>\n <br/>\n</p>\n\n<p align=\"center\" style=\"font-size: 25px;\">\n <b>gridfm-graphkit</b>\n</p>\n\n\n[](https://doi.org/10.5281/zenodo.17016737)\n[](https://gridfm.github.io/gridfm-graphkit/)\n\n\n\n\nThis library is brought to you by the GridFM team to train, finetune and interact with a foundation model for the electric power grid.\n\n---\n\n# Installation\n\nYou can install `gridfm-graphkit` directly from PyPI:\n\n```bash\npip install gridfm-graphkit\n```\n\nTo contribute or develop locally, clone the repository and install in editable mode:\n\n```bash\ngit clone git@github.com:gridfm/gridfm-graphkit.git\ncd gridfm-graphkit\npython -m venv venv\nsource venv/bin/activate\npip install -e .\n```\n\nFor documentation generation and unit testing, install with the optional `dev` and `test` extras:\n\n```bash\npip install -e .[dev,test]\n```\n\n\n# CLI commands\n\nAn interface to train, fine-tune, and evaluate GridFM models using configurable YAML files and MLflow tracking.\n\n```bash\ngridfm_graphkit <command> [OPTIONS]\n```\n\nAvailable commands:\n\n* `train` \u2013 Train a new model from scrathc\n* `finetune` \u2013 Fine-tune an existing pre-trained model\n* `evaluate` \u2013 Evaluate model performance on a dataset\n* `predict` \u2013 Run inference and save predictions\n\n---\n\n## Training Models\n\n```bash\ngridfm_graphkit train --config path/to/config.yaml\n```\n\n### Arguments\n\n| Argument | Type | Description | Default |\n| ---------------- | ------ | ---------------------------------------------------------------- | ------- |\n| `--config` | `str` | **Required**. Path to the training configuration YAML file. | `None` |\n| `--exp_name` | `str` | **Optional**. MLflow experiment name. | `timestamp` |\n| `--run_name` | `str` | **Optional**. MLflow run name. | `run` |\n| `--log_dir ` | `str` | **Optional**. MLflow logging directory. | `mlruns` |\n| `--data_path` | `str` | **Optional**. Root dataset directory. | `data` |\n\n### Examples\n\n**Standard Training:**\n\n```bash\ngridfm_graphkit train --config examples/config/case30_ieee_base.yaml --data_path examples/data\n```\n\n---\n\n## Fine-Tuning Models\n\n```bash\ngridfm_graphkit finetune --config path/to/config.yaml --model_path path/to/model.pth\n```\n\n### Arguments\n\n| Argument | Type | Description | Default |\n| -------------- | ----- | ----------------------------------------------- | --------- |\n| `--config` | `str` | **Required**. Fine-tuning configuration file. | `None` |\n| `--model_path` | `str` | **Required**. Path to a pre-trained model file. | `None` |\n| `--exp_name` | `str` | MLflow experiment name. | timestamp |\n| `--run_name` | `str` | MLflow run name. | `run` |\n| `--log_dir` | `str` | MLflow logging directory. | `mlruns` |\n| `--data_path` | `str` | Root dataset directory. | `data` |\n\n\n---\n\n## Evaluating Models\n\n```bash\ngridfm_graphkit evaluate --config path/to/eval.yaml --model_path path/to/model.pth\n```\n\n### Arguments\n\n| Argument | Type | Description | Default |\n| -------------- | ----- | ---------------------------------------- | --------- |\n| `--config` | `str` | **Required**. Path to evaluation config. | `None` |\n| `--model_path` | `str` | Path to the trained model file. | `None` |\n| `--exp_name` | `str` | MLflow experiment name. | timestamp |\n| `--run_name` | `str` | MLflow run name. | `run` |\n| `--log_dir` | `str` | MLflow logging directory. | `mlruns` |\n| `--data_path` | `str` | Dataset directory. | `data` |\n\n---\n\n## Running Predictions\n\n```bash\ngridfm_graphkit predict --config path/to/config.yaml --model_path path/to/model.pth\n```\n\n### Arguments\n\n| Argument | Type | Description | Default |\n| --------------- | ----- | --------------------------------------------- | --------- |\n| `--config` | `str` | **Required**. Path to prediction config file. | `None` |\n| `--model_path` | `str` | Path to the trained model file. | `None` |\n| `--exp_name` | `str` | MLflow experiment name. | timestamp |\n| `--run_name` | `str` | MLflow run name. | `run` |\n| `--log_dir` | `str` | MLflow logging directory. | `mlruns` |\n| `--data_path` | `str` | Dataset directory. | `data` |\n| `--output_path` | `str` | Directory where predictions are saved. | `data` |\n\n---\n",
"bugtrack_url": null,
"license": null,
"summary": "Grid Foundation Model",
"version": "0.0.6",
"project_urls": null,
"split_keywords": [
"electric power grid",
" foundational model",
" graph neural networks"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1fcbf9a2735c57a2cfb9a8ead8d8823a38bcffeff3779b161ae2b158806b8184",
"md5": "8ddd3e890cd8f08109965eb6a812960f",
"sha256": "e6198e92b6dc87bc404736ae8ea396f704ad743854706d9900680ced9c71e621"
},
"downloads": -1,
"filename": "gridfm_graphkit-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8ddd3e890cd8f08109965eb6a812960f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.10",
"size": 38707,
"upload_time": "2025-09-03T11:36:07",
"upload_time_iso_8601": "2025-09-03T11:36:07.842440Z",
"url": "https://files.pythonhosted.org/packages/1f/cb/f9a2735c57a2cfb9a8ead8d8823a38bcffeff3779b161ae2b158806b8184/gridfm_graphkit-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "67ff962c1d09bb721497a9ffd05d0c2e7a52e0af9df51bca61884ea993747c8f",
"md5": "5268fa5c2e311dc4df9916367712dac2",
"sha256": "7aba94a9c1c2b3d0e82789772add63906b9f8c011dded13c76e2bbaca0dc400d"
},
"downloads": -1,
"filename": "gridfm_graphkit-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "5268fa5c2e311dc4df9916367712dac2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.10",
"size": 35994,
"upload_time": "2025-09-03T11:36:09",
"upload_time_iso_8601": "2025-09-03T11:36:09.961372Z",
"url": "https://files.pythonhosted.org/packages/67/ff/962c1d09bb721497a9ffd05d0c2e7a52e0af9df51bca61884ea993747c8f/gridfm_graphkit-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-03 11:36:09",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "gridfm-graphkit"
}