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

Feature seg truth hotfix #225

Merged
merged 3 commits into from
May 14, 2024
Merged

Feature seg truth hotfix #225

merged 3 commits into from
May 14, 2024

Conversation

YifanC
Copy link
Collaborator

@YifanC YifanC commented May 8, 2024

No description provided.

@YifanC YifanC requested review from mjkramer and krwood May 9, 2024 00:04
Copy link
Member

@krwood krwood left a comment

Choose a reason for hiding this comment

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

Do you have any validations you can show? Reading through by eye, it's very difficult to follow that various *tracks datasets, as things seem to have gotten rather disorganized. I don't love the fact that we are drifting and quenching and swap_coordinates different *tracks datasets multiple times in different places. There are nested statements that could rewrite one to be the other in under certain conditions... it's gotten very difficult to follow the code and I worry this makes us prone to introducing bugs, especially as we rely on bringing in new developers. I can get more specific and turn this into an issue, but for this PR it would be nice to at least see some validations that the complicated logic is being handled properly for our current configs.

Copy link
Member

@mjkramer mjkramer left a comment

Choose a reason for hiding this comment

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

I agree with Kevin's general sentiment, but this hotfix seems pretty safe to me. It just adds missing info (n_electrons, t_start, etc.) to the segments dataset that we write to disk. A "why do we do this" comment in the code would be nice, though.

@YifanC
Copy link
Collaborator Author

YifanC commented May 9, 2024

@mjkramer @krwood As Matt suggested, I added comments on why we need the hotfix and why it is a hotfix.
It is a fairly isolated change. all_mod_tracks are passed in the module loop as tracks which have the truth information updated, but not all_mod_tracks, we are patching all_mod_tracks here because the unsolved flow issue.
The code is tested to a degree that it verifies the output contains the updated segments.

@YifanC
Copy link
Collaborator Author

YifanC commented May 9, 2024

Oh btw I updated the Git Issue #216 @krwood

Copy link
Member

@krwood krwood left a comment

Choose a reason for hiding this comment

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

I will begrudgingly approve the PR, but I’m still not comfortable with the way the code is laid out. Specific to this PR, I really don’t think it’s great that we simulate the quenching and drifting on one segment dataset, and then simulate the pixel responses, and then re-simulate the quenching and drifting in another segment dataset for “back tracking”. We should backtrack to the exact input to the pixel response simulation (especially with the outstanding reproducibility issues). I wouldn’t be surprised if we find the backtracking bugs you and Kazu are encountering in the ml reco training work are related to this.

@YifanC
Copy link
Collaborator Author

YifanC commented May 14, 2024

I will begrudgingly approve the PR, but I’m still not comfortable with the way the code is laid out. Specific to this PR, I really don’t think it’s great that we simulate the quenching and drifting on one segment dataset, and then simulate the pixel responses, and then re-simulate the quenching and drifting in another segment dataset for “back tracking”. We should backtrack to the exact input to the pixel response simulation (especially with the outstanding reproducibility issues). I wouldn’t be surprised if we find the backtracking bugs you and Kazu are encountering in the ml reco training work are related to this.

Relate this comment to Kevin's Git Issue #228

@YifanC YifanC merged commit 32cce5d into develop May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants