-
Notifications
You must be signed in to change notification settings - Fork 81
Teach set_params
to work with nested list
and tuple
#1201
Conversation
🚀 Deployed on https://deploy-preview-1201--etna-docs.netlify.app |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## automl-2.0 #1201 +/- ##
=============================================
Coverage ? 87.70%
=============================================
Files ? 177
Lines ? 10477
Branches ? 0
=============================================
Hits ? 9189
Misses ? 1288
Partials ? 0 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
set_params
with sequenceset_params
to work with nested list
and tuple
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.
👍 just one thing
etna/core/mixins.py
Outdated
|
||
current_key = keys[0] | ||
new_structure: Any | ||
if isinstance(structure, Dict): |
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.
It's not very important but you use Dict from typing in one place and standart tuple in other - inconsistency
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 copied this scheme from def _parse_value
we also have different cases for Dict, List, tuple
where. I can't use Tuple
from typing, it isn't working with isinstance
as Dict
and List
.
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.
At least for mypy where is some problem with it. In code it works fine.
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 fixed it in both functions to use dict
, list
, tuple
in all cases instead of typing
classes.
…e it with dict and list
Before submitting (must do checklist)
Proposed Changes
Teach
set_params
to work with list and tuples.Closing issues