Skip to content

Commit

Permalink
Update train config for papers100M to include features, make missing …
Browse files Browse the repository at this point in the history
…feature message more descriptive. (#1151)

*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
thvasilo authored Jan 31, 2025
1 parent f03a0b8 commit 9bf9f35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/graphstorm/dataloading/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,11 @@ def _check_node_feats(self, node_feat_field):
"or a dictionary of list of strings, " \
f"but get {node_feat_field}")
for feat_name in feat_names:
assert feat_name in g.nodes[ntype].data, \
f"Warning. The feature \"{feat_name}\" " \
f"does not exists for the node type \"{ntype}\"."
assert feat_name in g.nodes[ntype].data, (
f"The feature \"{feat_name}\" "
f"does not exist for the node type \"{ntype}\"."
f"Data available for \"{ntype}\": {g.nodes[ntype].data.keys()}"
)

def has_node_feats(self, ntype):
""" Test if the specified node type has features.
Expand Down
2 changes: 2 additions & 0 deletions training_scripts/gsgnn_np/papers100M_nc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ gsf:
label_field: "label"
multilabel: false
num_classes: 172
node_feat_name:
- "paper:paper_feat,paper_year"

0 comments on commit 9bf9f35

Please sign in to comment.