mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-02 13:47:47 +00:00
feat(Baseline): added one-split baseline, pure sklearn (#247)
* feat(Baseline): added sklearn_baseline * feat(Baseline): completely working
This commit is contained in:
committed by
GitHub
parent
5482e3fc95
commit
7deeb2de01
+10
-10
@@ -11,20 +11,20 @@ from config.hashing import hash_data_config
|
||||
from .types import XDataFrame, ReturnSeries
|
||||
from diskcache import Cache
|
||||
|
||||
cache = Cache(".cachedir/data")
|
||||
# cache = Cache(".cachedir/data")
|
||||
|
||||
|
||||
def load_data(**kwargs) -> tuple[XDataFrame, ReturnSeries]:
|
||||
hashed = hash_data_config(kwargs)
|
||||
if hashed in cache:
|
||||
return cache.get(hashed)
|
||||
else:
|
||||
return_value = __load_data(**kwargs)
|
||||
cache[hashed] = return_value
|
||||
return return_value
|
||||
# def load_data(**kwargs) -> tuple[XDataFrame, ReturnSeries]:
|
||||
# hashed = hash_data_config(kwargs)
|
||||
# if hashed in cache:
|
||||
# return cache.get(hashed)
|
||||
# else:
|
||||
# return_value = __load_data(**kwargs)
|
||||
# cache[hashed] = return_value
|
||||
# return return_value
|
||||
|
||||
|
||||
def __load_data(
|
||||
def load_data(
|
||||
assets: DataCollection,
|
||||
other_assets: DataCollection,
|
||||
exogenous_data: DataCollection,
|
||||
|
||||
Reference in New Issue
Block a user