Views
No views yet
f_theta(topology, duty) -> [efficiency, vout]1[
2 "efficiency",
3 "vout"
4]shared_energy.gtn_surrogate.GTNSurrogateModel class and the checkpoint's
model_state_dict.gtn_surrogate_model.pt: PyTorch checkpoint with model_state_dict,
model_config, target names, training config, split summary, and best
validation metadata.manifest.json: Training and evaluation summary.training_history.jsonl: Per-epoch training and validation metrics, uploaded
when using --include-eval-artifacts.validation_predictions.jsonl and test_predictions.jsonl: Prediction
samples from validation/test splits, uploaded when using
--include-eval-artifacts.surrogate_examples.jsonl: Optional example copy, uploaded only when using
--include-examples.paper_gtn_surrogate_trainingrse450451670700 / 7000.080753929913043981{
2 "sample_count": 381,
3 "split_mode": "random",
4 "test_row_count": 38,
5 "train_row_count": 305,
6 "val_row_count": 38
7}1{
2 "efficiency": 0.037103720009326935,
3 "vout": 0.12440413981676102
4}1{
2 "efficiency": 0.2964269816875458,
3 "vout": 0.25747445225715637
4}1from huggingface_hub import hf_hub_download
2import torch
3
4from shared_energy.gtn_surrogate import GTNSurrogateModel
5
6repo_id = "tjwjdgns011119/gtn_surrogate_pretrained_5comp_highreward"
7checkpoint_path = hf_hub_download(repo_id=repo_id, filename="gtn_surrogate_model.pt")
8
9payload = torch.load(checkpoint_path, map_location="cpu")
10model = GTNSurrogateModel(**payload["model_config"])
11model.load_state_dict(payload["model_state_dict"])
12model.eval()
13
14# prediction = model(
15# node_features=node_features,
16# neighbor_mask=neighbor_mask,
17# loop_membership=loop_membership,
18# node_mask=node_mask,
19# )
20# print(dict(zip(payload["target_names"], prediction[0].tolist())))pip install -e . from the repository root.