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

Support multiple node generation for single trial #2428

Closed
wants to merge 5 commits into from

Conversation

mgarrard
Copy link
Contributor

@mgarrard mgarrard commented May 3, 2024

Summary:
This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that:
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff
(2) we don't support multiple transition criterion creating individual forks to another trial -- all trial blocking tc must be met in order to move to the next step --> we don't have a usecase for this right now, so i think it's okay to wait on this. The current implementation should be quite easy to extend to support this.

To do this we added:
(1) trial transitions property
(2) generation node dict property
(3) should_move_trials method
and (4) a temp gen method to derisk the dev

Differential Revision: D56743651

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

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

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

Attention: Patch coverage is 99.34211% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95.32%. Comparing base (92820ae) to head (0cabf69).

Files Patch % Lines
ax/modelbridge/generation_node.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2428      +/-   ##
==========================================
- Coverage   95.32%   95.32%   -0.01%     
==========================================
  Files         496      496              
  Lines       48204    48326     +122     
==========================================
+ Hits        45951    46065     +114     
- Misses       2253     2261       +8     

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

@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:
Pull Request resolved: facebook#2428

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that:
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@mgarrard mgarrard force-pushed the export-D56743651 branch 2 times, most recently from 72d4dd3 to bc76609 Compare May 9, 2024 19:57
mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 9, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 10, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

Summary:

In order to support multiple models in a single gen call we need to support the `Auto` Transition class. This criterion will automatically move to the next node once anything has been generated from the current node

Reviewed By: saitcakmak

Differential Revision: D56360662
Summary: While I was working on adding some new tests I noticed we could be using the vars defined in setup much more in the file to reduce redundancy

Reviewed By: lena-kashtelyan

Differential Revision: D56744357
…acebook#2446)

Summary:

As part of modifying the generation node dag we want to support multiple transition edges now (meaning one node x could transition either to node y or node z depending on what criterion are met). This property creates a dict with {'next_node_name': [tc]} where tc is the transition criterion to move the gs from the current node to the `next node`

The reason we need this, is currently and in any future i can envision, to transition to another node all criterion for that edge that are transition blocking must be met. In the next diff I modify the should_transition method. I just like bite sized diffs :)

Reviewed By: lena-kashtelyan

Differential Revision: D57127974
Summary:

This diff builds on the previous diff, and uses the new property that we added for TC to decide if the gs should move forward.

If all criterion that specificy a transition edge between nodes are met, we move to that node. We progress through tc in order -- meaning when constructing a gs tc ordering is important.

Differential Revision: D57132018
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

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

mgarrard added a commit to mgarrard/Ax that referenced this pull request May 11, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Reviewed By: saitcakmak, lena-kashtelyan

Differential Revision: D56743651
mgarrard added a commit to mgarrard/Ax that referenced this pull request May 14, 2024
…acebook#2428)

Summary:

This diff enables multiple nodes to be used to generate a single batch trial. Right now the limitations are that: 
(1) currently each node only contributes 1 gr to the trial -- we will extend this to n grs in a future diff 

To do this we added:
(1) should_move_trials method
(2) updates to the transition criterion args

Reviewed By: saitcakmak, lena-kashtelyan

Differential Revision: D56743651
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 231d45d.

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