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

Pickle model using sunshine example ensemble #136

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pschork
Copy link
Contributor

@pschork pschork commented May 26, 2023

Very rough

Comment on lines +121 to +127
params = {
"n_estimators": 2000,
"learning_rate": 0.1,
"max_depth": 5,
"num_leaves": 2**5,
"colsample_bytree": 0.1,
}
Copy link
Contributor Author

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

Copy link
Contributor

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

Comment on lines +14 to +28
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
Copy link
Contributor Author

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"
Copy link
Contributor

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?

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.

None yet

2 participants