Get a score on the leaderboard
Once submitted it's time to run your model in the cloud
Last updated
# This loop over the private test set dates to avoid leaking the x of future periods
for date in dates:
# The wrapper will block the logging of users code after the 5 first dates
if date >= log_treshold:
log = False
# If the user asked for a retrain on the current date
if retrain:
# Cutting the sample such that the user's code will only access the right part of the data
X_train = X_train[X_train.date < date - embargo]
y_train = y_train[y_train.date < date - embargo]
# This is where your `train` code is called
train(X_train, y_train, model_directory_path)
# Only the current date
X_test = X_test[X_test.date == date]
# This is where your `infer` code is called
prediction = infer(model_directory_path, X_test)
if date > log_treshold:
predictions.append(prediction)
# Concat all of the individual predictions
prediction = pandas.concat(predictions)
# Upload it to our servers
upload(prediction)
# Upload the model's files to our servers
for file_name in os.listdir(model_directory_path):
upload(file_name)