Welcome to Graph Dataset Repo
Installation
Use following commands to install
pip install gridai
Available commands
Use following command to see available commands.
gridai --help
You will see something like this.
Usage: gridai [OPTIONS] COMMAND [ARGS]...
Entry point
Options:
--help Show this message and exit.
Commands:
generate-dataset Command line function to generate geojsons from...
generate-stats Function to dump stats around the dataset.
How to create a dataset ?
The command generate-dataset can convert all opendss models available in the parent folder by recursively searching for all valid opendss models.
gridai generate-dataset -j <system-json-path>
This will create a sqlite db file stroing all training data in pytorch.data.Data format.
How to use the dataset ?
>>> from torch_geometric.data import SQLiteDatabase
>>> db = SQLiteDatabase(path="dataset.sqlite",name="data_table")
>>> len(db)
51
>>> db[0]
Data(x=[3], edge_index=[2, 2], edge_attr=[2])
Getting NodeObject and EdgeObject
You can use following snippet to convert node attributes back to an instance of
DistNodeAttrs and edge attributes back to an DistEdgeAttrs.
>>> from torch_geometric.data import SQLiteDatabase
>>> from gridai.interfaces import DistNodeAttrs, DistEdgeAttrs
>>> from rich import print
>>> db = SQLiteDatabase(path="dataset.sqlite",name="data_table")
>>> print(DistNodeAttrs.from_array(db[0].x[0]))
DistNodeAttrs(
node_type=<NodeType.LOAD: 2>,
active_demand_kw=5.726587772369385,
reactive_demand_kw=1.691259503364563,
active_generation_kw=0.0,
reactive_generation_kw=0.0,
phase_type=<PhaseType.NS1S2: 11>,
kv_level=0.1200888529419899
)
>>> print(DistEdgeAttrs.from_array(db[0].edge_attr[0]))
DistEdgeAttrs(
capacity_kva=25.0,
edge_type=<DistEdgeType.TRANSFORMER: 1>,
length_miles=0.0
)
Plotting the dataset
You can use following command to plot the dataset.
>>> from gridai.plot_dataset import plot_dataset
>>> from torch_geometric.data import SQLiteDatabase
>>> db = SQLiteDatabase(path="dataset.sqlite",name="data_table")
>>> plot_dataset(db[0])
Metadata
Release files for gridai 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gridai-1.1.0.tar.gz | 347.2 kB | With provenance | Details for gridai-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gridai-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for gridai-1.1.0-py3-none-any.whl |
Total release size: 360.7 kB
Release files / gridai-1.1.0.tar.gz
| Download URL | gridai-1.1.0.tar.gz |
|---|---|
| Size | 347.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dd8767435d4e30b2d36b706fd41ad8d6c6881a0c40ce8275bf02a97ee94e35e
|
|
BLAKE2b-256 checksum How to use checksums |
ba79227f8b5068a55b989ea4c0ad133cd23f15ae4f359e26ab2793b63b6f6a8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2024.
Transparency logRelease files / gridai-1.1.0-py3-none-any.whl
| Download URL | gridai-1.1.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6d3305a67a61fd681d8bb451add88c5cc5aeb50a2f05476d45bef17d8cf3b94
|
|
BLAKE2b-256 checksum How to use checksums |
7c03807b91922814a17d2fff856884dfbc9ed5f20bb42028b1a27a3e3165f751
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2024.
Transparency logSecurity for gridai 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gridai-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2024.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.