graph LR
Training_Orchestrator["Training Orchestrator"]
GFN_Algorithms["GFN Algorithms"]
Neural_Network_Models["Neural Network Models"]
Environments["Environments"]
GFN_Tasks["GFN Tasks"]
Configuration_Management["Configuration Management"]
Data_Management["Data Management"]
Graph_Sampler["Graph Sampler"]
Conditional_Generation["Conditional Generation"]
Logging["Logging"]
Training_Orchestrator -- "Uses" --> GFN_Algorithms
Training_Orchestrator -- "Interacts with" --> Environments
Training_Orchestrator -- "Passes states to" --> Neural_Network_Models
Training_Orchestrator -- "Queries" --> GFN_Tasks
Training_Orchestrator -- "Utilizes" --> Data_Management
Training_Orchestrator -- "Reads settings from" --> Configuration_Management
Training_Orchestrator -- "Uses" --> Logging
Training_Orchestrator -- "Employs" --> Graph_Sampler
Training_Orchestrator -- "Applies" --> Conditional_Generation
GFN_Algorithms -- "Uses" --> Neural_Network_Models
GFN_Algorithms -- "Receives data from" --> Graph_Sampler
Neural_Network_Models -- "Receives input states from" --> Environments
Neural_Network_Models -- "Configured by" --> Configuration_Management
Environments -- "Provides states to" --> Neural_Network_Models
Graph_Sampler -- "Uses" --> Environments
GFN_Tasks -- "Can influence" --> Conditional_Generation
Configuration_Management -- "Configures" --> Training_Orchestrator
Configuration_Management -- "Configures" --> Neural_Network_Models
Configuration_Management -- "Configures" --> GFN_Algorithms
Data_Management -- "Provides data to" --> GFN_Algorithms
Graph_Sampler -- "Interacts with" --> Environments
Graph_Sampler -- "Queries" --> Neural_Network_Models
Logging -- "Receives data from" --> GFN_Algorithms
Logging -- "Receives data from" --> GFN_Tasks
click Training_Orchestrator href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/gflownet/Training_Orchestrator.md" "Details"
The Training Orchestrator is the central component responsible for managing and coordinating the entire GFlowNet training loop. It initializes and integrates various sub-components, including the GFlowNet algorithm, neural network models, generative environments, and data management systems. Its primary responsibilities include: Training Loop Management: Iteratively samples trajectories from the environment, computes losses based on the chosen GFlowNet algorithm, and updates the model parameters. Component Coordination: Ensures seamless interaction and data flow between the GFN Algorithms, Neural Network Models, Environments, GFN Tasks, and Data Management components. Optimization: Manages the optimization process, applying gradients to update the model's parameters. Logging and Monitoring: Integrates with logging utilities to record training progress, metrics, and other relevant information. Configuration Application: Reads and applies training parameters and configurations defined by the Configuration Management component.
Training Orchestrator [Expand]
Orchestrates the entire GFlowNet training process. It initializes and coordinates the interaction between algorithms, models, environments, and data to learn generative policies, managing the training loop, optimization, and logging.
Related Classes/Methods:
Implement the core GFlowNet learning rules and loss functions (e.g., Trajectory Balance, Flow Matching). They define how the model parameters are updated based on sampled trajectories and rewards.
Related Classes/Methods:
gflownet/algo/trajectory_balance.py(1:1)gflownet/algo/flow_matching.py(1:1)gflownet/algo/advantage_actor_critic.py(1:1)gflownet/algo/envelope_q_learning.py(1:1)gflownet/algo/soft_q_learning.py(1:1)
Parameterized functions (e.g., Graph Transformers, Sequence Transformers) that represent the GFlowNet's policy. They learn to map states to actions or flow values, enabling the generation of structured data.
Related Classes/Methods:
gflownet/models/graph_transformer.py(1:1)gflownet/models/seq_transformer.py(1:1)gflownet/models/mxmnet.py(1:1)
Define the problem space and the generative process. They provide the states, actions, and transitions that the GFlowNet learns to navigate and generate, representing the structured data (e.g., molecules, sequences).
Related Classes/Methods:
gflownet/envs/graph_building_env.py(1:1)gflownet/envs/mol_building_env.py(1:1)gflownet/envs/frag_mol_env.py(1:1)gflownet/envs/seq_building_env.py(1:1)
Encapsulate the specific objective or reward function for a generative problem. They provide the crucial feedback signal that guides the GFlowNet's learning towards desired outcomes.
Related Classes/Methods:
gflownet/tasks/qm9.py(1:1)gflownet/tasks/make_rings.py(1:1)gflownet/tasks/toy_seq.py(1:1)gflownet/tasks/seh_frag.py(1:1)gflownet/tasks/qm9_moo.py(1:1)gflownet/tasks/seh_frag_moo.py(1:1)
Manages hyperparameters and settings across all components, ensuring reproducibility and facilitating experimentation. It provides a centralized way to define and load configurations for algorithms, models, environments, and training.
Related Classes/Methods:
gflownet/config.py(1:1)gflownet/algo/config.py(1:1)gflownet/models/config.py(1:1)gflownet/tasks/config.py(1:1)gflownet/data/config.py(1:1)gflownet/utils/config.py(1:1)
Handles the storage, retrieval, and sampling of data, particularly trajectories generated during training. This includes replay buffers for off-policy learning and dataset handling.
Related Classes/Methods:
Responsible for generating trajectories (sequences of states and actions) within the environment by interacting with the neural network models. It simulates the generative process of the GFlowNet.
Related Classes/Methods:
Provides mechanisms to guide the GFlowNet's generative process based on specific conditions or preferences (e.g., temperature conditioning, multi-objective preferences, focus regions). This allows for targeted generation of desired outputs.
Related Classes/Methods:
Manages the recording of training progress, metrics, and other relevant information to a persistent store (e.g., SQLite database). Essential for monitoring experiments, debugging, and analyzing results.
Related Classes/Methods: