-
Notifications
You must be signed in to change notification settings - Fork 698
[BUG] Fixing bug #1930 with proper syntax #1950
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1950 +/- ##
=======================================
Coverage ? 87.06%
=======================================
Files ? 136
Lines ? 8626
Branches ? 0
=======================================
Hits ? 7510
Misses ? 1116
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
""" | ||
if not isinstance(cols, list) and cols not in data.columns: | ||
return None | ||
if isinstance(cols, list) and len(cols) == 0: | ||
dtypekind = "f" | ||
elif isinstance(cols, list): # and len(cols) > 0 | ||
dtypekind = data.dtypes[cols[0]].kind | ||
# dtypekind = data.dtypes[cols[0]].kind | ||
dtypekind = data[cols].to_numpy().dtype.kind |
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.
why are we doing this? It feels wasteful to do the conversion for the entire data container, instead of looking up the dtype.
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.
Looks good, I have a question about to_numpy
- should we not avoid conversion of the entire data to numpy
?
Reference Issues/PRs
Fixes #1930.
When
time_idx
or some other integer feature is included in the unknow reals, the dataset/dataloader elements are converted into the wrong dtype.What does this implement/fix? Explain your changes.
Modify the function the method
TimeSeriesDataSet._data_to_tensors._to_tensor()
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Added test function to
tests/test_data/test_timeseries.py
Any other comments?
PR checklist