-
Notifications
You must be signed in to change notification settings - Fork 86
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
Lagged implementation speedup #1139
Conversation
А есть оценка насколько это ускоряет? |
Codecov Report
@@ Coverage Diff @@
## master #1139 +/- ##
=======================================
Coverage 78.53% 78.53%
=======================================
Files 131 131
Lines 9359 9360 +1
=======================================
+ Hits 7350 7351 +1
Misses 2009 2009
|
Здорово! Да наверное в тесте нет нужды, время сложно оценивать. |
@@ -841,7 +841,8 @@ def prepare_target(all_idx, idx, features_columns: np.array, target, forecast_le | |||
idx = idx[: -1] | |||
|
|||
# Update target (clip first "window size" values) | |||
row_nums = [list(all_idx).index(i) for i in idx] | |||
index_hash_table = {val: i for i, val in enumerate(all_idx)} |
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.
Можешь оставить в комментарии пометку что такая реализация критична для производительности.
One line in code in lagged implementation spends more than 95% of lagged implementation evaluation time (in my case).
Fixed it.