Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug in infer method #1340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def infer(self) -> List[Inference]:
operator = self.get_operator(inference)
if not operator:
continue
infs = operator.infer(inferences)
infs = operator.infer([inference])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samplise have a look

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation will be more accurate in some cases. For example, we have observed two problems a and b during training. We want to identify the root causes for problem a. However, the final results may differ for only observed a from observed a and b together. Therefore we have all problems as the input for more accurate analysis.

Copy link
Contributor Author

@jlsong01 jlsong01 Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments.

  1. I agree having all problems is better for more accurate analysis.

  2. the further question is, instead of passing all problems in a list, maybe it's better to separate the current problem with the other problems. Because the current operator cares more about the current problem than the others. If we pass them all in one list, the above information will be lost

  3. Currently some infer() implementation ALWAYS refer to problems list[0] only, this isn't what we expected, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samplise how about the comment?

if len(infs) > 0:
has_new_inference = True
new_infs = combine_inferences(new_infs, infs)
Expand Down
Loading