Skip to content

Instantly share code, notes, and snippets.

@JonathanRaiman
Last active October 6, 2021 02:53
Show Gist options
  • Save JonathanRaiman/1ef1718e8571da20d90d9b6fd00e11ae to your computer and use it in GitHub Desktop.
Save JonathanRaiman/1ef1718e8571da20d90d9b6fd00e11ae to your computer and use it in GitHub Desktop.
Code to submit predictions to cardinality estimation leaderboard @ ML for Systems NeurIPS 2021 workshop
import numpy as np
def save_submission(predictions, filename):
"Take model output & save for cardinality estimation benchmark upload."""
np.save(filename, np.array([value for item in predictions for key, value in sorted(item.items())]))
# preds = rf.test(testqs) # run your prediction code on the test data
save_submission(preds, "mysubmission.npy")
# Then Upload "mysubmission.npy" to the leaderboard https://mlforsystems.wl.r.appspot.com :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment