mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-07 08:07:49 +00:00
feat(Inference): Inference now runs on the entire pipeline, only train/predict one asset, adjust trading costs (#173)
* fix, feat: Fixed inference processing data. Add transformation attribute. * feat: Added transformations step, refractored the loop to make more sense (divided the train and inference loop). * feat: Truncated models over time and transformations over time. Fixed some typing aswell. * fix: Fixed a number of out of array problems. * feat: Inference now works! * fix(Steps): runtime error not checking for None * fix(Steps): preloaded transformers are not optional anymore, sped up training by temporary increasing the retrain_every * fix(CI): disable ray memory monitoring * refactor(Inference): removed truncate_models and replaced it with filling X with NaN until inference should start * feat(Inference): added index_from parameter * fix(Tests): walk_forward test * refactor(Pipeline): only predict one asset * refactor(Inference): removed select_models step, inference code moved to run_inference.py so it matches convention (similar to run_pipeline.py) * fix(Evaluation): adjust transaction costs * fix(Config): adjusted retrain_every Co-authored-by: Daniel Szemerey <szemereydaniel@gmail.com> Co-authored-by: Mark Aron Szulyovszky <mark.szulyovszky@gmail.com>
This commit is contained in:
@@ -77,6 +77,7 @@ def test_evaluation():
|
||||
expanding_window=False,
|
||||
window_size=window_length,
|
||||
retrain_every=10,
|
||||
from_index=None,
|
||||
transformations=[],
|
||||
preloaded_transformations=None)
|
||||
predictions, _ = walk_forward_inference(
|
||||
@@ -86,6 +87,7 @@ def test_evaluation():
|
||||
X=X,
|
||||
expanding_window=False,
|
||||
window_size=window_length,
|
||||
from_index=None,
|
||||
)
|
||||
|
||||
# verify if predictions are the same as y
|
||||
|
||||
@@ -75,6 +75,7 @@ def test_walk_forward_train_test():
|
||||
expanding_window=False,
|
||||
window_size=window_length,
|
||||
retrain_every=10,
|
||||
from_index=None,
|
||||
transformations=[],
|
||||
preloaded_transformations=None
|
||||
)
|
||||
@@ -84,7 +85,8 @@ def test_walk_forward_train_test():
|
||||
transformations_over_time=transformations_over_time,
|
||||
X=X,
|
||||
expanding_window=False,
|
||||
window_size=window_length
|
||||
window_size=window_length,
|
||||
from_index=None,
|
||||
)
|
||||
|
||||
# verify if predictions are the same as y
|
||||
|
||||
Reference in New Issue
Block a user