MCPcopy Create free account

hub / github.com/allenai/RL4LMs / functions

Functions555 in github.com/allenai/RL4LMs

Method__init__
(self, **kwargs)
rl4lms/envs/text_generation/metric.py:394
Method__init__
( self, stride: int, tokenizer_id: str, model_type: str = "causal", us
rl4lms/envs/text_generation/metric.py:416
Method__init__
(self, **args)
rl4lms/envs/text_generation/metric.py:594
Method__init__
(self)
rl4lms/envs/text_generation/metric.py:618
Method__init__
(self)
rl4lms/envs/text_generation/metric.py:641
Method__init__
(self)
rl4lms/envs/text_generation/metric.py:664
Method__init__
(self, min_tokens: int)
rl4lms/envs/text_generation/test_reward.py:9
Method__init__
(self, tokenizer_config: Dict[str, Any], datapool_config: Dict[str, Any],
rl4lms/envs/text_generation/training_utils.py:131
Method__init__
(self, tokenizer_config: Dict[str, Any], datapool_config: Dict[str, Any],
rl4lms/envs/text_generation/training_utils.py:230
Method__init__
(self, min_tokens: int)
rl4lms/envs/text_generation/test_metric.py:12
Method__init__
(self, shaping_fn: str = None)
rl4lms/envs/text_generation/reward.py:127
Method__init__
( self, rouge_type: str, shaping_fn: str = None, use_single_ref: bool = True )
rl4lms/envs/text_generation/reward.py:164
Method__init__
(self, shaping_fn: str = None)
rl4lms/envs/text_generation/reward.py:209
Method__init__
(self, language: str = "en")
rl4lms/envs/text_generation/reward.py:252
Method__init__
(self)
rl4lms/envs/text_generation/reward.py:274
Method__init__
(self, **args)
rl4lms/envs/text_generation/reward.py:296
Method__init__
( self, model_name: str, label_ix: int, include_prompt_for_eval: bool = True )
rl4lms/envs/text_generation/reward.py:319
Method__init__
Spice + Cider
rl4lms/envs/text_generation/reward.py:372
Method__init__
( self, model_name: str, label_ix: int, include_prompt_for_eval: bool = True )
rl4lms/envs/text_generation/reward.py:443
Method__init__
(self, checkpoint: str = None)
rl4lms/envs/text_generation/reward.py:487
Method__init__
(self)
rl4lms/envs/text_generation/reward.py:515
Method__init__
(self, **args)
rl4lms/envs/text_generation/reward.py:537
Method__init__
(self)
rl4lms/envs/text_generation/reward.py:585
Method__init__
( self, shape: bool = True, intent_coeff: float = 1.0, auto_coeff: float = 1.0 )
rl4lms/envs/text_generation/reward.py:609
Method__init__
(self, val_samples: List[Sample], generation_kwargs: Dict[str, Any], eval_ba
rl4lms/envs/text_generation/utils_supervised.py:121
Method__init__
(self, kl_coeff: float, target_kl: Optional[float] = None)
rl4lms/envs/text_generation/kl_controllers.py:6
Method__init__
( self, alg_kwargs: Dict[str, Any], kl_coeff: float, tracker:
rl4lms/envs/text_generation/alg_wrappers.py:99
Method__init__
(self, observation_space: DictSpace, action_space: Discrete, lr_schedule: Sc
rl4lms/envs/text_generation/policy.py:551
Method__init__
A generic RL environment to generate textual sequences. For eg: text generation, summarization, machine translation, text simplificat
rl4lms/envs/text_generation/env.py:16
Method__init__
( self, model_type: str, device: str, batch_size: int, concept_penalty
rl4lms/envs/text_generation/preference_reward.py:190
Method__init__
(self, base_path_to_store_results: str, run_config: Dict[str, Any],
rl4lms/envs/text_generation/logging_utils.py:16
Method__init__
Args: observation_space (DictSpace): Observation space action_space (Discrete): Action space lr_schedule
rl4lms/envs/text_generation/policy/base_policy.py:103
Method__init__
( self, observation_space: DictSpace, action_space: Discrete, lr_schedule: Sch
rl4lms/envs/text_generation/policy/causal_policy.py:317
Method__init__
( self, observation_space: DictSpace, action_space: Discrete, lr_schedule: Sch
rl4lms/envs/text_generation/policy/seq2seq_policy.py:348
Method__init__
(self, model_name="mnli", granularity="paragraph", use_cache=True, max_doc_sents=100, **kwargs)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:61
Method__init__
(self, models=["mnli", "anli", "vitc"], bins='even50', granularity="sentence", nli_labels="e", device="cuda",
rl4lms/envs/text_generation/summ_metrics/summa_c.py:217
Method__init__
singular instance
rl4lms/envs/text_generation/caption_metrics/cider.py:64
Method__init__
(self, test=None, refs=None, n=4, sigma=6.0)
rl4lms/envs/text_generation/caption_metrics/cider.py:211
Method__init__
(self)
rl4lms/envs/text_generation/caption_metrics/spice/spice.py:24
Method__init__
Args: max_steps (int): max steps for each episode reward_function (RewardFunction): reward function that computes sca
rl4lms/envs/common/base_env.py:17
Method__init__
(self, actions: List[str])
rl4lms/envs/common/action_space.py:6
Method__init__
(self, samples: List[Sample])
rl4lms/data_pools/text_generation_pool.py:16
Method__init__
( self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str],
rl4lms/algorithms/a2c/a2c.py:62
Method__init__
( self, policy: Union[str, Type[MaskableActorCriticPolicy]], env: Union[GymEnv, str],
rl4lms/algorithms/nlpo/nlpo.py:78
Method__init__
( self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str],
rl4lms/algorithms/ppo/ppo.py:76
Method__init__
( self, buffer_size: int, observation_space: spaces.Space, action_space: space
rl4lms/algorithms/common/maskable/buffers.py:147
Method__init__
( self, observation_space: gym.spaces.Space, action_space: gym.spaces.Space, l
rl4lms/algorithms/common/maskable/policies.py:341
Method__init__
( self, observation_space: gym.spaces.Dict, action_space: gym.spaces.Space, lr
rl4lms/algorithms/common/maskable/policies.py:392
Method__init__
( self, mask_model, action_space, top_mask, apply_model_parallel,
rl4lms/algorithms/common/maskable/logits_processor.py:160
Method__init__
(self, *args, use_masking: bool = True, **kwargs)
rl4lms/algorithms/common/maskable/callbacks.py:32
Method__init__
(self, action_dim: int)
rl4lms/algorithms/common/maskable/distributions.py:120
Method__init__
(self, action_dims: List[int])
rl4lms/algorithms/common/maskable/distributions.py:180
Method__init__
(self, action_dim: int)
rl4lms/algorithms/common/maskable/distributions.py:265
Method__init__
( self, policy: Union[str, Type[ActorCriticPolicy]], env: Union[GymEnv, str],
rl4lms/algorithms/trpo/trpo.py:77
Method__len__
(self)
rl4lms/envs/text_generation/preference_reward.py:100
Method__len__
(self)
rl4lms/data_pools/text_generation_pool.py:19
Method__post_init__
(self)
rl4lms/envs/common/action_space.py:12
Method__repr__
(self)
rl4lms/envs/common/action_space.py:25
Method_build_model_heads
(self, model_name: str)
rl4lms/envs/text_generation/policy.py:361
Method_build_model_heads
(self, model_name: str)
rl4lms/envs/text_generation/policy.py:923
Method_build_model_heads
(self, model_name: str)
rl4lms/envs/text_generation/policy/causal_policy.py:360
Method_build_model_heads
(self, model_name: str)
rl4lms/envs/text_generation/policy/seq2seq_policy.py:391
Method_get_constructor_parameters
(self)
rl4lms/algorithms/common/maskable/policies.py:121
Function_mention_probability
Returns the probability that the table entry is mentioned in the sentence. A simple implementation which checks the longest common subsequence be
rl4lms/data_pools/task_utils/totto/eval_utils/totto_parent_eval.py:203
Method_on_step
(self)
rl4lms/algorithms/common/maskable/callbacks.py:36
Method_predict
(self, observation: Dict[str, torch.tensor], deterministic: bool = False)
rl4lms/envs/text_generation/policy.py:207
Method_predict
(self, observation: Dict[str, torch.tensor], deterministic: bool = False)
rl4lms/envs/text_generation/policy.py:752
Method_predict
( self, observation: Dict[str, torch.tensor], deterministic: bool = False )
rl4lms/envs/text_generation/policy/base_policy.py:169
Method_prepare_inputs_for_model
(self, model: AutoModelForCausalLM, input_ids: torch.tensor,
rl4lms/envs/text_generation/policy.py:960
Method_prepare_inputs_for_model
( self, model: Union[AutoModelForCausalLM, AutoModelForSeq2SeqLM], input_ids: torch.Te
rl4lms/algorithms/common/maskable/logits_processor.py:191
Methodaction_to_ix
(self, action: str)
rl4lms/envs/common/action_space.py:16
Methodadd
(cls, id: str, datapool_cls: Type[TextGenPool])
rl4lms/envs/text_generation/registry.py:111
Methodadd
(cls, id: str, reward_fn_cls: Type[RewardFunction])
rl4lms/envs/text_generation/registry.py:145
Methodadd
(cls, id: str, policy_cls: Type[LMActorCriticPolicy])
rl4lms/envs/text_generation/registry.py:199
Methodadd
( cls, id: str, alg_cls: Union[Type[OnPolicyAlgorithm], Type[OffPolicyAlgorithm]] )
rl4lms/envs/text_generation/registry.py:222
Methodadd
(cls, id: str, wrapper_def)
rl4lms/envs/text_generation/registry.py:245
Methodadd
(cls, id: str, post_processor_fn)
rl4lms/envs/text_generation/registry.py:263
Methodadd
:param action_masks: Masks applied to constrain the choice of possible actions.
rl4lms/algorithms/common/maskable/buffers.py:178
Methodadd_sample
(self, sample: Sample, weight: int = 1.0)
rl4lms/envs/text_generation/env.py:178
Methodadd_sample
Adds annotated sample for sampling/replaying
rl4lms/envs/common/base_env.py:78
Methodapply_masking
Eliminate ("mask out") chosen distribution outcomes by setting their probability to 0. :param masks: An optional boolean ndarray of
rl4lms/algorithms/common/maskable/distributions.py:102
Methodapply_masking
(self, masks: Optional[np.ndarray])
rl4lms/algorithms/common/maskable/distributions.py:168
Methodapply_masking
(self, masks: Optional[np.ndarray])
rl4lms/algorithms/common/maskable/distributions.py:241
Methodbuild_image
(self, original, generated)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:131
Functioncard_to_name
(card)
rl4lms/envs/text_generation/summ_metrics/summa_c.py:43
Methodcheckpoint_base_path
(self)
rl4lms/envs/text_generation/logging_utils.py:155
Methodclose
(self)
rl4lms/envs/common/base_env.py:55
Methodcompute
Returns a dict where key is the metric name and value is again a dict consisting of tuple of individual scores (if any) and corpus level scor
rl4lms/envs/text_generation/metric.py:23
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:63
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:112
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:136
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:171
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:198
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:232
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:280
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:308
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:338
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:372
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:398
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:435
← previousnext →301–400 of 555, ranked by callers