Skip to content

Conversation

bpkroth
Copy link
Contributor

@bpkroth bpkroth commented May 9, 2025

Pull Request

Title

Prepare Experiment.load to handle async out of order trial completion


Description

In the case of ParallelTrialScheduler (#971) where Trials may complete out of order relative to what they were submitted in, we can no longer rely only on _last_trial_id to fetch the latest Trial results when registering finished Trial scores with the Optimizer since that may cause us to skip trial_ids that are less than that that haven't completed yet.

This change enables us to handle that situation by doing the following:

  1. Track the a set() of registered_trial_ids and allow omitting them from being returned by the Experiment.load() operation.
  2. As an optimization (and since that set could otherwise grow large and cause SQL query text construction issues), we also track the first unfinished trial_id in the Experiment. This allows us to remove all trial_ids < first_unfinished_trial_id from the registered_trial_ids set.

Type of Change

  • 🛠️ Bug fix
  • ✨ New feature
  • 🔄 Refactor
  • 🧪 Tests

Testing


Additional Notes (optional)

This should have no impact on the SyncScheduler.


@bpkroth bpkroth mentioned this pull request May 9, 2025
10 tasks
bpkroth and others added 28 commits May 9, 2025 16:09
@bpkroth bpkroth added the WIP Work in progress - do not merge yet label May 22, 2025
@bpkroth bpkroth changed the title Prepare Experiment.load to handle async out of order trial completion WIP: Prepare Experiment.load to handle async out of order trial completion May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress - do not merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants