Skip to content

Graphical Model 3: Using a Result #1112

@Jammy2211

Description

@Jammy2211

The following example compares a run using analysis summing and graph:

https://github.com/Jammy2211/autolens_workspace_test/blob/main/model_graph/task_3_result.py

You can run it fast by using the export PYAUTOFIT_TEST_MODE=1 environment variable.

This tries to use the result returned by the fit.

For analysis summing, it can be used:

    positions_likelihood = source_lp_result[0].positions_likelihood_from(
        factor=3.0, minimum_threshold=0.2
    )

For graphical models, it raises this error:

Traceback (most recent call last):
  File "/mnt/c/Users/Jammy/Code/PyAuto/autolens_workspace_test/model_graph/task_3_result.py", line 300, in <module>
    fit()
  File "/mnt/c/Users/Jammy/Code/PyAuto/autolens_workspace_test/model_graph/task_3_result.py", line 294, in fit
    positions_likelihood = source_lp_result[0].positions_likelihood_from(
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/result.py", line 355, in __getitem__
    return self.child_results[item]
TypeError: 'NoneType' object is not subscriptable

Again, hopefully an easy fix.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions