MCPcopy Create free account

hub / github.com/allenai/RL4LMs / types & classes

Types & classes140 in github.com/allenai/RL4LMs

↓ 15 callersClassSample
rl4lms/data_pools/text_generation_pool.py:8
↓ 6 callersClassMaskableCategoricalDistribution
Categorical distribution for discrete actions. Supports invalid action masking. :param action_dim: Number of discrete actions
rl4lms/algorithms/common/maskable/distributions.py:113
↓ 4 callersClassEvaluateActionsOutput
Dataclass for the output of the method policy.evaluate_actions(). This is invoked during training phase for each mini-batch in the rollout bu
rl4lms/envs/text_generation/policy/base_policy.py:24
↓ 4 callersClassPolicyOutput
Dataclass for the output of the method policy.foward_policy()
rl4lms/envs/text_generation/policy/base_policy.py:39
↓ 3 callersClassBeamSearchDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam search. Args: sequences (`torch.LongTensor` of shape `(batch_siz
rl4lms/envs/text_generation/hf_generation_utils.py:204
↓ 3 callersClassBeamSearchEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam search. Hidden states and attention weights of the decoder (respective
rl4lms/envs/text_generation/hf_generation_utils.py:239
↓ 3 callersClassGenerationOutputs
rl4lms/envs/text_generation/policy/base_policy.py:89
↓ 3 callersClassMeteorMetric
rl4lms/envs/text_generation/metric.py:107
↓ 3 callersClassObservation
rl4lms/envs/text_generation/observation.py:11
↓ 3 callersClassRougeRewardFunction
rl4lms/envs/text_generation/reward.py:163
↓ 2 callersClassCIDERMetric
rl4lms/envs/text_generation/metric.py:276
↓ 2 callersClassCider
Main Class to compute the CIDEr metric
rl4lms/envs/text_generation/caption_metrics/cider.py:205
↓ 2 callersClassCiderScorer
CIDEr scorer.
rl4lms/envs/text_generation/caption_metrics/cider.py:53
↓ 2 callersClassGenerationInputs
rl4lms/envs/text_generation/policy/base_policy.py:81
↓ 2 callersClassKLController
rl4lms/envs/text_generation/kl_controllers.py:5
↓ 2 callersClassMaskLogitsProcessorCasualLM
rl4lms/algorithms/common/maskable/logits_processor.py:13
↓ 2 callersClassMaskLogitsProcessorSeq2SeqLM
rl4lms/algorithms/common/maskable/logits_processor.py:159
↓ 2 callersClassMaskableCategorical
Modified PyTorch Categorical distribution with support for invalid action masking. To instantiate, must provide either probs or logits, but
rl4lms/algorithms/common/maskable/distributions.py:18
↓ 2 callersClassRefPolicyOutput
Dataclass for the output of the method policy.get_ref_log_probs()
rl4lms/envs/text_generation/policy/base_policy.py:57
↓ 2 callersClassSpice
Main Class to compute the SPICE metric
rl4lms/envs/text_generation/caption_metrics/spice/spice.py:19
↓ 2 callersClassSpiceMetric
rl4lms/envs/text_generation/metric.py:304
↓ 2 callersClassSummaCConv
rl4lms/envs/text_generation/summ_metrics/summa_c.py:216
↓ 2 callersClassSummaCImager
rl4lms/envs/text_generation/summ_metrics/summa_c.py:60
↓ 2 callersClassSummaCZS
rl4lms/envs/text_generation/summ_metrics/summa_c.py:356
↓ 2 callersClassTracker
rl4lms/envs/text_generation/logging_utils.py:15
↓ 2 callersClassValueOutput
Dataclass for the output of the method policy.forward_value()
rl4lms/envs/text_generation/policy/base_policy.py:69
↓ 1 callersClassBERTScoreMetric
rl4lms/envs/text_generation/metric.py:163
↓ 1 callersClassBERTScoreRewardFunction
rl4lms/envs/text_generation/reward.py:251
↓ 1 callersClassBLEUMetric
rl4lms/envs/text_generation/metric.py:193
↓ 1 callersClassBLEURTRewardFunction
rl4lms/envs/text_generation/reward.py:486
↓ 1 callersClassBLEURewardFunction
rl4lms/envs/text_generation/reward.py:273
↓ 1 callersClassBeamSampleDecoderOnlyOutput
Base class for outputs of decoder-only generation models using beam sample. Args: sequences (`torch.LongTensor` of shape `(batch_siz
rl4lms/envs/text_generation/hf_generation_utils.py:290
↓ 1 callersClassBeamSampleEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using beam sampling. Hidden states and attention weights of the decoder (respecti
rl4lms/envs/text_generation/hf_generation_utils.py:325
↓ 1 callersClassCommonGenPrefRM
rl4lms/envs/text_generation/preference_reward.py:189
↓ 1 callersClassEvalCallack
rl4lms/envs/text_generation/utils_supervised.py:120
↓ 1 callersClassGreedySearchDecoderOnlyOutput
Base class for outputs of decoder-only generation models using greedy search. Args: sequences (`torch.LongTensor` of shape `(batch_
rl4lms/envs/text_generation/hf_generation_utils.py:62
↓ 1 callersClassGreedySearchEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using greedy search. Hidden states and attention weights of the decoder (respecti
rl4lms/envs/text_generation/hf_generation_utils.py:90
↓ 1 callersClassIntentAccuracyDailyDialog
rl4lms/envs/text_generation/metric.py:663
↓ 1 callersClassMaskableBernoulliDistribution
Bernoulli distribution for multibinary actions. Supports invalid action masking. :param action_dim: Number of binary actions
rl4lms/algorithms/common/maskable/distributions.py:258
↓ 1 callersClassMaskableDictRolloutBuffer
Dict Rollout buffer used in on-policy algorithms like A2C/PPO. Extends the RolloutBuffer to use dictionary observations It corresponds t
rl4lms/algorithms/common/maskable/buffers.py:122
↓ 1 callersClassMaskableDictRolloutBufferSamples
rl4lms/algorithms/common/maskable/buffers.py:27
↓ 1 callersClassMaskableEvalCallback
Callback for evaluating an agent. Supports invalid action masking. :param eval_env: The environment used for initialization :param callb
rl4lms/algorithms/common/maskable/callbacks.py:10
↓ 1 callersClassMaskableMultiCategoricalDistribution
MultiCategorical distribution for multi discrete actions. Supports invalid action masking. :param action_dims: List of sizes of discrete act
rl4lms/algorithms/common/maskable/distributions.py:173
↓ 1 callersClassMaskableRolloutBufferSamples
rl4lms/algorithms/common/maskable/buffers.py:17
↓ 1 callersClassMeteorRewardFunction
rl4lms/envs/text_generation/reward.py:126
↓ 1 callersClassOnPolicyAlgText
rl4lms/envs/text_generation/alg_wrappers.py:98
↓ 1 callersClassOnPolicyTrainer
A generic trainer for training LMs with onpolicy algorithms from SB3
rl4lms/envs/text_generation/training_utils.py:126
↓ 1 callersClassParentToTTo
Official version
rl4lms/envs/text_generation/metric.py:486
↓ 1 callersClassPrioritySampler
rl4lms/core_components/sampler.py:6
↓ 1 callersClassRougeCombined
rl4lms/envs/text_generation/reward.py:208
↓ 1 callersClassRougeLMax
rl4lms/envs/text_generation/metric.py:555
↓ 1 callersClassSampleDecoderOnlyOutput
Base class for outputs of decoder-only generation models using sampling. Args: sequences (`torch.LongTensor` of shape `(batch_size*
rl4lms/envs/text_generation/hf_generation_utils.py:132
↓ 1 callersClassSampleEncoderDecoderOutput
Base class for outputs of encoder-decoder generation models using sampling. Hidden states and attention weights of the decoder (respectively
rl4lms/envs/text_generation/hf_generation_utils.py:161
↓ 1 callersClassSupervisedTrainer
A supervised trainer to train LMs (causal and seq2seq) on text generation tasks (wrapper on HF trainer)
rl4lms/envs/text_generation/training_utils.py:225
↓ 1 callersClassT5Dataset
rl4lms/envs/text_generation/preference_reward.py:90
↓ 1 callersClassTERMetric
rl4lms/envs/text_generation/metric.py:617
↓ 1 callersClassTransitionInfo
rl4lms/envs/text_generation/alg_wrappers.py:27
↓ 1 callersClasschrF
rl4lms/envs/text_generation/reward.py:584
↓ 1 callersClasschrFmetric
rl4lms/envs/text_generation/metric.py:640
ClassA2C
Advantage Actor Critic (A2C) Paper: https://arxiv.org/abs/1602.01783 Code: This implementation borrows code from https://github.com/ikos
rl4lms/algorithms/a2c/a2c.py:15
ClassActionSpace
rl4lms/envs/common/action_space.py:5
ClassActorCriticWarmStartMixin
rl4lms/envs/text_generation/warm_start.py:26
ClassActorOnlyWarmStartMixin
rl4lms/envs/text_generation/warm_start.py:12
ClassAlgorithmRegistry
rl4lms/envs/text_generation/registry.py:203
ClassBLEURTMetric
rl4lms/envs/text_generation/metric.py:227
ClassBLEUToTTo
Official version
rl4lms/envs/text_generation/metric.py:528
ClassBaseEnv
A base class for all the environments
rl4lms/envs/common/base_env.py:12
ClassBaseMetric
rl4lms/envs/text_generation/metric.py:21
ClassBaseObservation
Placeholder for observation data class
rl4lms/envs/common/observation.py:7
ClassBaseObservationFeaturizer
rl4lms/envs/common/observation.py:14
ClassBatchedCommonGenPenaltyShapingFunction
rl4lms/envs/text_generation/reward.py:98
ClassBatchedRewardFunction
Computes rewards for several instances at once
rl4lms/envs/text_generation/reward.py:48
ClassCNNDailyMail
rl4lms/data_pools/custom_text_generation_pools.py:175
ClassCRD3DialogueGeneration
rl4lms/data_pools/custom_text_generation_pools.py:480
ClassCausalLMActorCriticPolicy
rl4lms/envs/text_generation/policy/causal_policy.py:37
ClassCommonGen
rl4lms/data_pools/custom_text_generation_pools.py:117
ClassCommonGenPenaltyShapingFunction
rl4lms/envs/text_generation/reward.py:71
ClassDailyDialog
rl4lms/data_pools/custom_text_generation_pools.py:553
ClassDataPoolRegistry
rl4lms/envs/text_generation/registry.py:87
ClassDateInText
rl4lms/envs/text_generation/test_metric.py:35
ClassDiversityMetrics
rl4lms/envs/text_generation/metric.py:333
ClassGenerationMixinWithRawScores
A class containing all functions for auto-regressive text generation, to be used as a mixin in [`PreTrainedModel`]. The class exposes [`~gen
rl4lms/envs/text_generation/hf_generation_utils.py:382
ClassIMDB
IMDB Dataset for sentiment continuation task
rl4lms/data_pools/custom_text_generation_pools.py:209
ClassIMDBForSeq2Seq
IMDB Dataset in seq2seq format to train supervised generator
rl4lms/data_pools/custom_text_generation_pools.py:241
ClassIWSLT2017EnDe
rl4lms/data_pools/custom_text_generation_pools.py:448
ClassIncreasingNumbersinText
rl4lms/envs/text_generation/test_metric.py:11
ClassIntentAccuracy
rl4lms/envs/text_generation/reward.py:608
ClassLMActorCriticPolicy
rl4lms/envs/text_generation/policy.py:25
ClassLMActorCriticPolicy
rl4lms/envs/text_generation/policy/base_policy.py:102
ClassLearnedBatchedRewardFunction
rl4lms/envs/text_generation/reward.py:318
ClassLearnedRewardFunction
rl4lms/envs/text_generation/reward.py:442
ClassLearnedRewardMetric
rl4lms/envs/text_generation/metric.py:44
ClassMaskableActorCriticCnnPolicy
CNN policy class for actor-critic algorithms (has both policy and value prediction). Used by A2C, PPO and the likes. :param observation_
rl4lms/algorithms/common/maskable/policies.py:319
ClassMaskableActorCriticPolicy
Policy class for actor-critic algorithms (has both policy and value prediction). Used by A2C, PPO and the likes. :param observation_spac
rl4lms/algorithms/common/maskable/policies.py:21
ClassMaskableActorCriticWarmStartMixin
rl4lms/envs/text_generation/warm_start.py:44
ClassMaskableDistribution
rl4lms/algorithms/common/maskable/distributions.py:100
ClassMaskableLMActorCriticPolicy
rl4lms/envs/text_generation/policy.py:550
ClassMaskableMultiInputActorCriticPolicy
MultiInputActorClass policy class for actor-critic algorithms (has both policy and value prediction). Used by A2C, PPO and the likes. :p
rl4lms/algorithms/common/maskable/policies.py:370
ClassMaskableRolloutBuffer
Rollout buffer that also stores the invalid action masks associated with each observation. :param buffer_size: Max number of element in the
rl4lms/algorithms/common/maskable/buffers.py:37
ClassMaskableSeq2SeqLMActorCriticPolicy
rl4lms/envs/text_generation/policy.py:922
next →1–100 of 140, ranked by callers