Skip to content

Commit

Permalink
Fix applying seq_ids to start/stop cols
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Oct 31, 2024
1 parent e09deac commit 7b5f54a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/log_parsing/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ def _postprocess(self, msg: ControlMessage):
src_index = src_df.index.to_pandas()

seq_ids = msg.tensors().get_tensor('seq_ids').get()
infer_pdf = pd.DataFrame({"doc": src_index, "start": seq_ids[:, 1], "stop": seq_ids[:, 2]})

infer_pdf = pd.DataFrame({"doc": src_index, "start": seq_ids[:, 0], "stop": seq_ids[:, 1]})
infer_pdf.columns = ["doc", "start", "stop"]
infer_pdf["confidences"] = msg.tensors().get_tensor('confidences').tolist()
infer_pdf["labels"] = msg.tensors().get_tensor('labels').tolist()
infer_pdf["token_ids"] = msg.tensors().get_tensor('input_ids').tolist()
Expand Down

0 comments on commit 7b5f54a

Please sign in to comment.