Skip to content

Use default log in Inversion class#12

Merged
santisoler merged 3 commits intomainfrom
default-log
Aug 11, 2025
Merged

Use default log in Inversion class#12
santisoler merged 3 commits intomainfrom
default-log

Conversation

@santisoler
Copy link
Member

Use a default log in Inversion if log=True, so the user doesn't need to build it and pass it. If log=False, then Inversion.log will be None. Users can still pass their custom InversionLog. Move the first call of log.update() to the __next__ method, only executed in the first iteration. This makes Inversion instantiation faster (no calls to objective functions), and allows users to edit the log columns before the inversion has started. Rerun notebooks.

Use a default log in Inversion if `log=True`, so the user doesn't need
to build it and pass it. If `log=False`, then `Inversion.log` will be
`None`. Users can still pass their custom `InversionLog`. Move the first
call of `log.update()` to the `__next__` method, only executed in the
first iteration. This makes Inversion instantiation faster (no calls to
objective functions), and allows users to edit the log columns before
the inversion has started.
@santisoler santisoler merged commit 54ed11b into main Aug 11, 2025
2 checks passed
@santisoler santisoler deleted the default-log branch August 11, 2025 16:23
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.

1 participant