Skip to content

Instantly share code, notes, and snippets.

@ties
Created April 6, 2021 19:30
Show Gist options
  • Save ties/4c0deb82ebe286c93bd057a33be57703 to your computer and use it in GitHub Desktop.
Save ties/4c0deb82ebe286c93bd057a33be57703 to your computer and use it in GitHub Desktop.
pointwise_experiment_content = session.query(PointwiseExperiment). \
filter(PointwiseExperiment.features==feature_string).subquery('c')
# reindented on phone...
q = session.query(PointwiseExperiment, func.row_number().over(
partition_by=PointwiseExperiment.learner,
order_by=PointwiseExperiment.mse_mean
).label('ord')).select_entity_from(pointwise_experiment_content).subquery()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment