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
Pickle model using sunshine example ensemble #136
base: master
Are you sure you want to change the base?
Conversation
params = { | ||
"n_estimators": 2000, | ||
"learning_rate": 0.1, | ||
"max_depth": 5, | ||
"num_leaves": 2**5, | ||
"colsample_bytree": 0.1, | ||
} |
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.
WIP These params are intentionally low to get things working
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.
use 0.01 learning rate,
5 max depth
2**5 num_leaves
for 2000 trees
and for 20k or 60k trees
0.001 lr
6 max depth
2**6 num_leaves
ERA_COL = "era" | ||
TARGET_COL = "target_cyrus_v4_20" | ||
DATA_TYPE_COL = "data_type" | ||
MODEL_FOLDER = "models" | ||
|
||
def load_model(name): | ||
path = Path(f"{MODEL_FOLDER}/{name}.pkl") | ||
if path.is_file(): | ||
model = pd.read_pickle(f"{MODEL_FOLDER}/{name}.pkl") | ||
else: | ||
model = False | ||
return model | ||
|
||
def neutralize( | ||
df, columns, neutralizers=None, proportion=1.0, normalize=True, era_col="era", verbose=False |
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.
I had to flatten utils.py
in order for the pickle to be unserializable with numerai_predict
in our execution enclave
|
||
# export pickle | ||
p = cloudpickle.dumps(predict) | ||
model_pkl = f"sunshine_{'_'.join(sys.version.split('.')[:2])}.pkl" |
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.
maybe some comment about this naming scheme?
Very rough