-
Notifications
You must be signed in to change notification settings - Fork 30
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
Refactor/logging #519
Refactor/logging #519
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…toring iteration, step and problem information
* move base data classes for dict and tuple like access to optimagic.typing * make all dataclasses frozen
* implement SQLiteLogger * expose primary_key property in AbstractKeyValueStore * add optimization type enum * improve type hints
25546c5
to
8c88dfa
Compare
for more information, see https://pre-commit.ci
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0.5.0 #519 +/- ##
==========================================
+ Coverage 90.71% 90.90% +0.18%
==========================================
Files 106 107 +1
Lines 10364 10644 +280
==========================================
+ Hits 9402 9676 +274
- Misses 962 968 +6 ☔ View full report in Codecov by Sentry. |
… argument to None
* improve existence handling * move RobustPickler * remove obsolete code * fix usage in depending subpackages
* add NonUpdatableKeyValueStore, raises exception when try to call update * split hierarchy into updatable and nonupdatable stores * make IterationStore nonupdatable
…move obsolete submodule
* move store implementation to logging.sqlalchemy, remove dependency to SQLiteConfig * move SQLiteConfig to logging.logger * remove obsolete file logging.sqlite * rename test files to mirror subpackage structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am through now. Thanks a lot for this PR!
One thing that is left to do is adding a logger
field to the OptimizeResult
.
…rations from reader
…ing db file at init.
* split Logger into LogStore for writing and LogReader for reading * add new abstraction LogOptions
Done |
…ze, estimate_ml, estimate_msm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! From my side this is ready to merge!
The proposed logging is described here.
This refactoring introduces the following abstractions:
LogOptions
(implementationSQLiteLogOptions
), configurationLogStore
(implementation_SQLiteLogStore
, not exposed), write accessLogReader
(implementationSQLiteLogReader
), read accessThe old class
OptimizationLogReader
redirects toSQLiteLogReader
in a backward-compatible way.