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

Multi Analysis fit.model broken #899

Open
Jammy2211 opened this issue Dec 21, 2023 · 2 comments
Open

Multi Analysis fit.model broken #899

Jammy2211 opened this issue Dec 21, 2023 · 2 comments
Assignees

Comments

@Jammy2211
Copy link
Collaborator

I am running the following two unit tests in this test module:

https://github.com/Jammy2211/PyAutoGalaxy/blob/main/test_autogalaxy/aggregator/test_aggregator_fit_imaging.py

test__fit_imaging_randomly_drawn_via_pdf_gen_from__analysis_has_single_dataset: This one works
test__fit_imaging_randomly_drawn_via_pdf_gen_from__analysis_multi : This one does not work

The problem is that In the following code:

https://github.com/Jammy2211/PyAutoGalaxy/blob/main/autogalaxy/aggregator/agg_util.py

The model from fit.model is None for the multi Analysis test (but works fine for single Analysis.

instance = fit.model.instance_from_prior_medians(ignore_prior_limits=True)

How do I get a model in this case?

@rhayes777
Copy link
Owner

For me this tests passes. It doesn't get very far into the adapt_images_from function because fit.value(name="adapt_images") is None

@rhayes777
Copy link
Owner

So the child analyses don't have an associated model because there is only one global model which is associated with the parent fit.

You could use that model or we could explicitly attach the parent model to each of the child analyses.

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

No branches or pull requests

2 participants