Skip to content

Commit f08a20f

Browse files
authored
Merge branch 'main' into fmiralles-release-cycle
2 parents 619a26a + e2d9299 commit f08a20f

4 files changed

Lines changed: 140 additions & 0 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '18 12 * * 6'
14+
push:
15+
branches: [ "main" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
25+
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
26+
permissions:
27+
# Needed to upload the results to code-scanning dashboard.
28+
security-events: write
29+
# Needed to publish results and get a badge (see publish_results below).
30+
id-token: write
31+
# Uncomment the permissions below if installing in a private repository.
32+
# contents: read
33+
# actions: read
34+
35+
steps:
36+
- name: "Checkout code"
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
with:
39+
persist-credentials: false
40+
41+
- name: "Run analysis"
42+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
43+
with:
44+
results_file: results.sarif
45+
results_format: sarif
46+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
47+
# - you want to enable the Branch-Protection check on a *public* repository, or
48+
# - you are installing Scorecard on a *private* repository
49+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
50+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
51+
52+
# Public repositories:
53+
# - Publish results to OpenSSF REST API for easy access by consumers
54+
# - Allows the repository to include the Scorecard badge.
55+
# - See https://github.com/ossf/scorecard-action#publishing-results.
56+
# For private repositories:
57+
# - `publish_results` will always be set to `false`, regardless
58+
# of the value entered here.
59+
publish_results: true
60+
61+
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
62+
# file_mode: git
63+
64+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
65+
# format to the repository Actions tab.
66+
- name: "Upload artifact"
67+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
68+
with:
69+
name: SARIF file
70+
path: results.sarif
71+
retention-days: 5
72+
73+
# Upload the results to GitHub's code scanning dashboard (optional).
74+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
75+
- name: "Upload to code-scanning"
76+
uses: github/codeql-action/upload-sarif@v3
77+
with:
78+
sarif_file: results.sarif

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@ mlruns
2121
*data_out*
2222
site*
2323
.venv
24+
mlflow_alban/
25+
to_del/
26+
scripts/
27+
mlflow_opf_datakit/
2428
to_del/
2529
b12b6627956a448588674ce7cbc08cb4/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
[![DOI](https://zenodo.org/badge/1007159095.svg)](https://doi.org/10.5281/zenodo.17016737)
1212
[![Docs](https://img.shields.io/badge/docs-available-brightgreen)](https://gridfm.github.io/gridfm-graphkit/)
1313
![Coverage](https://img.shields.io/badge/coverage-83%25-yellowgreen)
14+
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/12802/badge)](https://www.bestpractices.dev/projects/12802)
15+
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/gridfm/gridfm-graphkit/badge)](https://scorecard.dev/viewer/?uri=github.com/gridfm/gridfm-graphkit)
1416
![Python](https://img.shields.io/badge/python-3.10%20%E2%80%93%203.12-blue)
1517
![License](https://img.shields.io/badge/license-Apache%202.0-blue)
1618

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
task:
2+
task_name: OptimalPowerFlow
3+
data:
4+
baseMVA: 100
5+
mask_value: 0.0
6+
normalization: HeteroDataMVANormalizer
7+
networks:
8+
- case30_ieee
9+
scenarios:
10+
- 300000
11+
workers: 32
12+
split_by_load_scenario_idx: false
13+
split_from_existing_files: "/dccstor/gridfm/march_opf_exp/opfdata_olay_splits/"
14+
model:
15+
attention_head: 8
16+
edge_dim: 10
17+
hidden_size: 48
18+
input_bus_dim: 15
19+
input_gen_dim: 6
20+
output_bus_dim: 2
21+
output_gen_dim: 1
22+
num_layers: 12
23+
type: GNS_heterogeneous
24+
optimizer:
25+
beta1: 0.9
26+
beta2: 0.999
27+
learning_rate: 0.0005
28+
lr_decay: 0.7
29+
lr_patience: 5
30+
training:
31+
batch_size: 64
32+
epochs: 200
33+
loss_weights:
34+
- 0.1
35+
- 0.1
36+
- 0.75
37+
- 0.001
38+
losses:
39+
- LayeredWeightedPhysics
40+
- MaskedGenMSE
41+
- MaskedBusMSE
42+
- QgViolationPenalty
43+
44+
loss_args:
45+
- base_weight: 0.5
46+
- {}
47+
- {}
48+
- {}
49+
accelerator: auto
50+
devices: auto
51+
strategy: auto
52+
seed: 0
53+
verbose: true
54+
callbacks:
55+
patience: 100
56+
tol: 0

0 commit comments

Comments
 (0)