Skip to content
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

[MNT] update nbeats/sub_modules.py to remove overhead in tensor creation #1580

Merged
merged 8 commits into from
Jan 6, 2025

Conversation

d-schmitt
Copy link
Contributor

Issue

This PR removes a warning raised by nbeats/sub_module.py:
UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor.
This commit replaces the relevant sections with the appropriate code to remove the warning in nbeats submodule. (similar to #754)

Proposed change:

Change the implementation, as suggested by the warning to increase efficiency.

The nbeats/sub_module.py raises the following warning:
UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor.
This commit replaces the relevant sections with the appropriate code to remove the warning. (similar to sktime#754)
Remove faulty copy commit.
Remove spaces.
@fnhirwa fnhirwa self-assigned this Jan 6, 2025
@fnhirwa fnhirwa changed the title Update nbeats/sub_modules.py to remove UserWarning [MNT] update nbeats/sub_modules.py to remove overhead in tensor creation Jan 6, 2025
@fnhirwa fnhirwa marked this pull request as draft January 6, 2025 12:08
@fnhirwa fnhirwa marked this pull request as ready for review January 6, 2025 13:14
@fnhirwa fnhirwa merged commit 1331d57 into sktime:main Jan 6, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants