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

Fixing the grouping and the thcovmat flag #1588

Merged
merged 4 commits into from
Aug 25, 2022
Merged

Fixing the grouping and the thcovmat flag #1588

merged 4 commits into from
Aug 25, 2022

Conversation

andreab1997
Copy link
Contributor

The grouping used in the thcovmat fit is broken because groups_dataset_inputs_loaded_cd_with_cuts does not use group_dataset_inputs_by_fitting_group and therefore is not grouped as the thcovmat (even if the groupings are similar so sometimes it happens to be correct by chance).

Moreover, the thcovmat group is used also when both use_thcovmat_in_sampling and use_thcovmat_in_fitting are false.

@andreab1997
Copy link
Contributor Author

@scarlehoff as you can see I have only changed group_dataset_inputs_by_metadata for group_dataset_inputs_by_fitting_group in the collect of groups_dataset_inputs_loaded_cd_with_cuts. This was enough to solve our problem. However there a lot of other places in which group_dataset_inputs_by_metadata is used. I wonder if would be better to change them all. What do you think?

@scarlehoff
Copy link
Member

I wonder if would be better to change them all.

We only want to order by fitting group when we are fitting. I'm not sure this is a good solution actually, I think the "metadata group" should be equal to the "fitting group" during a fit. Is there a reason why they should be different?

@andreab1997
Copy link
Contributor Author

I wonder if would be better to change them all.

We only want to order by fitting group when we are fitting. I'm not sure this is a good solution actually, I think the "metadata group" should be equal to the "fitting group" during a fit. Is there a reason why they should be different?

The point is that by default metadata group groups by experiment. So if we use fitting_group for the covmat and metadata_group for the groups_dataset_inputs_loaded_cd_with_cuts, we will have in general different ordering

@scarlehoff
Copy link
Member

The point is that by default metadata group groups by experiment.

Then I think the right thing is for metadata group to default (in the case of a fit) to the fitting group.

@andreab1997
Copy link
Contributor Author

The point is that by default metadata group groups by experiment.

Then I think the right thing is for metadata group to default (in the case of a fit) to the fitting group.

def load_default_data_grouping(self, spec):

This is the point in which the default data_grouping is stated. Do we want to change this?

@scarlehoff
Copy link
Member

Yes. Indeed, I can even see that @wilsonmr left a comment many moons ago predicting this day would come :P

@Zaharid
Copy link
Contributor

Zaharid commented Aug 22, 2022

FWIW while the while "data keyword" grouping system was great in both allowing complex new uses of the code and maintaining compatibility, I think the resulting trade off in complexity is not favorable to us anymore, in particular since we don't have to support an experiments declaration anymore. Simplifying that would be very useful work attacking the base of this problem.

@andreab1997
Copy link
Contributor Author

Yes. Indeed, I can even see that @wilsonmr left a comment many moons ago predicting this day would come :P

Do you like the new solution more?

@scarlehoff scarlehoff added the run-fit-bot Starts fit bot from a PR. label Aug 25, 2022
@github-actions
Copy link

Greetings from your nice fit 🤖 !
I have good news for you, I just finished my tasks:

Check the report carefully, and please buy me a ☕ , or better, a GPU 😉!

@scarlehoff scarlehoff added bug Something isn't working and removed run-fit-bot Starts fit bot from a PR. labels Aug 25, 2022
@scarlehoff scarlehoff merged commit 91d5c5f into master Aug 25, 2022
@scarlehoff scarlehoff deleted the fix_grouping branch August 25, 2022 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants