SEAL Task-Net v0
This repository contains a custom PyTorch checkpoint for the Shared Energy SEAL-style task-net:
g_psi(T, c) -> d0
The model maps a power-converter topology graph T and target specification
c to an initial continuous duty-cycle prediction d0.
This is not a Transformers checkpoint. Load it with this project's
shared_energy.seal_models.GTNTaskNet class and the checkpoint's
model_state_dict.
Files
seal_tasknet_model.pt: PyTorch checkpoint withmodel_state_dict,model_config, training config, and best validation metadata.manifest.json: Training and evaluation summary.training_history.jsonl: Per-epoch training and validation metrics, included when uploaded with--include-eval-artifacts.
Training Objective
The task-net was trained to predict the GTN dense-search best duty while also being guided by a frozen SEAL loss-net energy term:
L_task = lambda_sup * L_sup(d0, d_best) + lambda_energy * E_omega(T, d0, c)
For this run, lambda_sup=1.0 and lambda_energy=0.2.
Metrics
- Best epoch:
9 - Epochs:
200
Sample counts:
{
"test": 148,
"train": 689,
"val": 148
}
Final validation metrics:
{
"count": 148.0,
"duty_mae": 0.212996697103655,
"energy_loss": 0.995880257438969,
"sup_loss": 0.032279046554420446,
"total_loss": 0.23145510296563845
}
Final test metrics:
{
"count": 148.0,
"duty_mae": 0.23800100829150225,
"energy_loss": 0.9947394277598407,
"sup_loss": 0.039557718344636866,
"total_loss": 0.2385056047020732
}
Usage
from huggingface_hub import hf_hub_download
import torch
from shared_energy.seal_models import GTNTaskNet
repo_id = "tjwjdgns011119/seal-tasknet-v0"
checkpoint_path = hf_hub_download(repo_id=repo_id, filename="seal_tasknet_model.pt")
payload = torch.load(checkpoint_path, map_location="cpu")
model = GTNTaskNet(**payload["model_config"])
model.load_state_dict(payload["model_state_dict"])
model.eval()
# duty = model(
# node_features=node_features,
# neighbor_mask=neighbor_mask,
# loop_membership=loop_membership,
# node_mask=node_mask,
# spec=spec,
# )
The project code must be available in the Python environment, for example with
pip install -e . from the repository root.
Notes
The checkpoint is intended for research workflows in this repository. The predicted duty is an initialization or proposal, not a direct SPICE-verified optimum.