Skip to content

Commit

Permalink
Fix tuning server not sorting data by job id
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
kiudee committed Jul 9, 2021
1 parent d13b1a0 commit 35bf214
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tune/db_workers/tuning_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def query_data(self, session, include_active=False):
if np.all(sample_sizes >= self.experiment.get("minimum_samplesize", 16)):
samplesize_reached = True

q = session.query(SqlJob).filter(SqlJob.tune_id == tune_id)
q = session.query(SqlJob).filter(SqlJob.tune_id == tune_id).order_by(SqlJob.id)
if not include_active:
q = q.filter(SqlJob.active == False) # noqa
jobs = q.all()
Expand Down Expand Up @@ -268,7 +268,9 @@ def query_data(self, session, include_active=False):
result.ll_count,
]
)
score, variance = counts_to_penta(counts=counts, random_state=0)
score, variance = counts_to_penta(
counts=counts, random_state=0, n_dirichlet_samples=100000
)
y[tc].append(score)
variances[tc].append(variance)
return (
Expand Down

0 comments on commit 35bf214

Please sign in to comment.