-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: user specified timeseries #285
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #285 +/- ##
==========================================
- Coverage 91.25% 91.11% -0.14%
==========================================
Files 106 107 +1
Lines 3863 3881 +18
Branches 839 844 +5
==========================================
+ Hits 3525 3536 +11
- Misses 208 212 +4
- Partials 130 133 +3
|
# from indsl.validations import validate_series_is_not_empty | ||
|
||
|
||
# @check_types |
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.
Check types is required for functions that should be exposed in the UI. Thin function checks that the provided types are matching expected types.
input_time = np.array([time_.timestamp() for time_ in input_time_pd]) | ||
input_y = np.sin((input_time - input_time[0]) / (input_time[-1] - input_time[0]) * 2 * np.pi) | ||
|
||
ts_series = user_specified_timeseries(input_time_str, input_y.tolist()) |
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 assume here check_types fails because input_time_str is a [str]
, but in the function definition the input is specified as a [float]
def user_specified_timeseries( | ||
input_time: List[float] = [0.0, 1.0], input_values: List[float] = [0.0, 1.0] | ||
) -> pd.Series: | ||
"""Convert input to a timeseries. |
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.
How would this work in the UI? user manually copy pastes all the values into the parameters of the nodes?
Description
Allow the user to provide a timeseries as input
Motivation and Context
Many users want to overlay a timeseries on the plots in Charts. It can be a measurement that is not in cdf, or a separate model/curvefit that cannot be performed in Charts.
This is a common request.
It is a crude workaround, but it will solve the clients problem until we have a better solution
How Has This Been Tested?
Win11, python 3.10.7
Screenshots (if appropriate):
Types of changes
Contributor Checklist:
fix: <description>
,feat: <description>
, etc.Reviewer Checklist for Charts compliant functions: