-
-
Notifications
You must be signed in to change notification settings - Fork 210
[ENH] Improve Global Config Architecture #1577
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
base: main
Are you sure you want to change the base?
Conversation
|
Can you please add more details in your PR description? |
|
It's not ready for review yet! Hence a draft. |
|
@SimonBlanke if we make the dataclass For anyone else trying to help out, kindly refer to the issue attached to the PR (#1564) to get into the loop on the discussion. ps: Even though this is a temporary fix it seems like a good step in the right direction for having a proper config. I think I would like to add and remove a few things to build on top of this once ive a better idea though (and once this PR is closed). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1577 +/- ##
==========================================
- Coverage 52.71% 52.62% -0.10%
==========================================
Files 36 36
Lines 4325 4321 -4
==========================================
- Hits 2280 2274 -6
- Misses 2045 2047 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fkiraly
left a comment
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.
You changed the public interface to the config and apparently users have to write to a private module. That is not good design. Please leave the public APIs inteacts, otherwise this would be a breaking change.
Also, in the summary for this PR, please explain what you change and why.
I know that the public interface was changed, and that it shouldnt be changed, but the interface HAS to be changed if I follow Simon's proposed design in the issue description in #1564 given modular |
It is a key requirement that it does not change. Or it will be a breaking change.
this is wrong. I would appreciate if you would not assert this with such certainty. It is true that modular Also, you should be able to catch that a change in design that touches 13 files is perhaps not the right way to go.
No, the minimal changes imo would be the ones that preserve the current API and stay close to @SimonBlanke´s proposal, instead of modifying 13 files. Changing 13 files is not "minimal" in the sense of scope and cohesion. You should have pointed out the issue with Anyway, the way to go imo (in order to be faithful to @SimonBlanke´s design) would be:
|
|
In terms of communication:
|
I definitely knew it was wrong, I was going to bring it up in tomorrow's meeting, and had no intention of getting this PR merged in the current state, hence should have probably kept it in draft. Though I think I should have said that more explicity in the PR itself.
Now that there is a way around this, which involves not changing 13 files I do agree I was wrong, but just to give an idea of what was going through my head, by "minimal" I meant at that point of time to get all globals into 1 dataclass, I (felt I) had to change the 13 files to continue with Simon's design.
I was doing that throughout no? I didn't drop an update about a better design, because I am still working on it, so there was no update about that.
I should have definitely done that. |
Metadata
OpenMLConfig.Details
What does this PR implement/fix? Explain your changes.
OpenMLConfigdataclass and a single module-level instance _config in openml.config.OpenMLConfig.__getattr__so attribute reads on openml.config forward to the dataclass (preserving read compatibility).Why is this change necessary? What is the problem it solves?