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

Add backward sampling #110

Merged
merged 10 commits into from
Oct 26, 2023
Merged

Add backward sampling #110

merged 10 commits into from
Oct 26, 2023

Conversation

bengioe
Copy link
Collaborator

@bengioe bengioe commented Oct 23, 2023

This PR adds proper backward sampling routines, specifically to sample from parameterized backward policies or to sample uniformly (from masks).

This PR also:

  • Changes how stem attachments are defined in the fragment environment using a saner "src_"/"dst_" format
  • Includes Recursive decompose routine for fragment env #96 to showcase offline training
  • adds an extra Queue object for in-main-process calls to an MP wrapped model
  • changes GraphActionCategorical._compute_batchwise_max to use finfo().min instead of the batch min to compute the argmax -- this avoids some edge case errors.
  • numpy-fies graph_to_Data in the fragment environment

Includes @diamondspark as an author since the PR is based on his implementation.

Copy link

@hadim hadim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See a minor comment about the use of if.

src/gflownet/envs/graph_building_env.py Outdated Show resolved Hide resolved
docs/examples/grid_cond_gfn.py Show resolved Hide resolved
@bengioe bengioe merged commit e6b7906 into trunk Oct 26, 2023
6 checks passed
@bengioe bengioe deleted the feat_back_sampling branch October 26, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants