-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
🚀 Deployed on https://deploy-preview-949--etna-docs.netlify.app |
Codecov Report
@@ Coverage Diff @@
## master #949 +/- ##
==========================================
+ Coverage 85.31% 85.38% +0.07%
==========================================
Files 147 148 +1
Lines 7890 7936 +46
==========================================
+ Hits 6731 6776 +45
- Misses 1159 1160 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
etna/core/mixins.py
Outdated
@@ -80,6 +93,22 @@ def to_dict(self): | |||
params["_target_"] = BaseMixin._get_target_from_class(self) | |||
return params | |||
|
|||
@staticmethod | |||
def _unsafe_to_dict(value: Any) -> Dict[str, Any]: | |||
"""Collect all information about etna object in 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 isn't only about etna object, we use it for callbacks from pytorch_lightning.
|
||
self._init_params = {} | ||
args_dict = dict( | ||
zip([arg for arg, param in init_args.items() if param.kind == param.POSITIONAL_OR_KEYWORD], deepcopy_args) |
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.
Can we meet problems with other kinds? E.g. kwargs
parameters: docs.
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.
They will be in kwargs
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.
Will it work with POSITIONAL_ONLY
somehow?
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.
No
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 think we should write in documentation about the limitations of this approach.
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've added comment
Before submitting (must do checklist)
Proposed Changes
Closing issues