Skip to content

Commit

Permalink
Fix ph_key issue with trec pipeline (#2363)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2363

Fix ph_key issue by:
1. make ph_key for TrainModelInput to be model_input.id_list_features["defalut"]
2. handles parsing in trec utils.

Reviewed By: malaybag

Differential Revision: D62160686

fbshipit-source-id: 5795926021e591fa72e23a32f8050c898da641fb
  • Loading branch information
Ruilin Chen authored and facebook-github-bot committed Sep 6, 2024
1 parent bc6957d commit 77e8b52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchrec/distributed/train_pipeline/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@ def _get_node_args_helper(
# pyre-ignore[16]
ph_key: str = child_node.ph_key
# example: ph_key = 'event_id_list_features_seqs[marketplace]'
ph_keys = ph_key.split("[")
ph_key = ph_key.replace("[", ".")
ph_keys = ph_key.split(".")
for key in ph_keys:
if "]" in key:
arg_info.input_attrs.append(key[:-1])
Expand Down

0 comments on commit 77e8b52

Please sign in to comment.