Skip to content

Database session support for all new types of output #224

Open
@Jammy2211

Description

@Jammy2211

The following test script tries to perform a normal lens model fit where results are written to the database as a session:

https://github.com/Jammy2211/autolens_workspace_test/blob/main/database/session/slam_simple.py

For example it currently gives the following exception:

Traceback (most recent call last):
  File "/mnt/c/Users/Jammy/Code/PyAuto/autolens_workspace_test/database/session/slam_simple.py", line 145, in <module>
    source_lp_results = slam.source_lp.run(
  File "/mnt/c/Users/Jammy/Code/PyAuto/autolens_workspace_test/slam/source_lp.py", line 108, in run
    result_1 = search_1.fit(
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/search/abstract_search.py", line 490, in fit
    analysis = analysis.modify_before_fit(paths=self.paths, model=model)
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoLens/autolens/imaging/model/analysis.py", line 49, in modify_before_fit
    super().modify_before_fit(paths=paths, model=model)
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoLens/autolens/analysis/analysis.py", line 255, in modify_before_fit
    super().modify_before_fit(paths=paths, model=model)
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoGalaxy/autogalaxy/analysis/analysis.py", line 268, in modify_before_fit
    self.check_and_replace_adapt_images(paths=paths)
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoGalaxy/autogalaxy/analysis/analysis.py", line 505, in check_and_replace_adapt_images
    adapt_model_image = load_adapt_image(filename="adapt_model_image.fits")
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoGalaxy/autogalaxy/analysis/analysis.py", line 499, in load_adapt_image
    file_path=paths._files_path / "adapt" / filename,
  File "/mnt/c/Users/Jammy/Code/PyAuto/PyAutoFit/autofit/non_linear/paths/abstract.py", line 240, in _files_path
    raise NotImplementedError
NotImplementedError

This occurs because it tries to load the image paths._files_path / "adapt" / filename via a DirectoryPaths when it should be via the database.

Can you run this script and fix issues that come up until using a session works end-to-end (like using directories).

I think most issues will be things like .fits file not being supported to be loaded.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions