Skip to content

Commit 44278ea

Browse files
authored
[Feature Enhancement] Add 'dynamic' metadata to graph_net.json (#101)
* [Feature Enhancement] Add 'dynamic' metadata to graph_net.json * add a example
1 parent b06881a commit 44278ea

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

graph_net/torch/extractor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def try_rename_placeholder(node):
6666
"framework": "torch",
6767
"num_devices_required": 1,
6868
"num_nodes_required": 1,
69+
"dynamic": bool(dynamic),
6970
}
7071
with open(os.path.join(model_path, "graph_net.json"), "w") as f:
7172
json.dump(metadata, f, indent=4)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"framework": "torch",
33
"num_devices_required": 1,
4-
"num_nodes_required": 1
4+
"num_nodes_required": 1,
5+
"dynamic": false
56
}

0 commit comments

Comments
 (0)