Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not deduplicate against FAILED in GenerationStrategy/Node #2488

Closed
wants to merge 2 commits into from

Conversation

saitcakmak
Copy link
Contributor

Summary:
We have an implicit rule that the ABANDONED trials failed deterministically and should not be generated again, while FAILED trials are unknown and may be generated again if the model chooses to do so. This rule is encoded in the utilities used to extract pending_observations from experiment while generating candidates, which counts CANDIDATE (as of D57514290), STAGED, RUNNING & ABANDONED trials. The EARLY_STOPPED and COMPLETED trials have data associated with them, which was a similar effect to pending_observations in discouraging the models from generating them again. Notably, FAILED trials do not fall into either category, thus they are fair game for the model to generate again, if it determines that to be the optimal next step.

This conflicts with the current deduplication against experiment.arms_by_signature which includes all arms on the experiment regardless of the trial status. To make the behavior consistent, this diff adds a new arms_by_signature_for_deduplication property on the Experiment that excludes arms attached to the FAILED trials.

Differential Revision: D57478100

Summary:
While working on D57478100, I noticed that CANDIDATE trials were not being included in `pending_features` but they were being used for deduplication checks. This diff resolves this inconsistency by adding CANDIDATE trials to `pending_features`.

Also updates `get_pending_observation_features_based_on_trial_status` to avoid repeating same computations for each metric on the experiment.

Differential Revision: D57514290
…k#2488)

Summary:

We have an implicit rule that the `ABANDONED` trials failed deterministically and should not be generated again, while `FAILED` trials are unknown and may be generated again if the model chooses to do so. This rule is encoded in the utilities used to extract `pending_observations` from experiment while generating candidates, which counts `CANDIDATE` (as of D57514290), `STAGED`, `RUNNING` & `ABANDONED` trials. The `EARLY_STOPPED` and `COMPLETED` trials have data associated with them, which was a similar effect to `pending_observations` in discouraging the models from generating them again. Notably, `FAILED` trials do not fall into either category, thus they are fair game for the model to generate again, if it determines that to be the optimal next step.

This conflicts with the current deduplication against `experiment.arms_by_signature` which includes all arms on the experiment regardless of the trial status. To make the behavior consistent, this diff adds a new `arms_by_signature_for_deduplication` property on the `Experiment` that excludes arms attached to the `FAILED` trials.

Differential Revision: D57478100
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 30, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57478100

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57478100

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.28%. Comparing base (a64f3ea) to head (d7eba32).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2488   +/-   ##
=======================================
  Coverage   95.28%   95.28%           
=======================================
  Files         485      485           
  Lines       47400    47410   +10     
=======================================
+ Hits        45163    45174   +11     
+ Misses       2237     2236    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4100602.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants