MCPcopy Create free account

hub / github.com/allenai/RL4LMs / functions

Functions555 in github.com/allenai/RL4LMs

Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:491
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:575
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:599
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:622
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:645
Methodcompute
( self, prompt_texts: List[str], generated_texts: List[str], reference_texts:
rl4lms/envs/text_generation/metric.py:676
Methodcompute
(self, prompt_texts: List[str], generated_texts: List[str], reference_texts: L
rl4lms/envs/text_generation/test_metric.py:16
Methodcompute
(self, prompt_texts: List[str], generated_texts: List[str], reference_texts: L
rl4lms/envs/text_generation/test_metric.py:36
Functioncompute_metrics
(eval_preds)
scripts/reward-modeling/train_intent_classifier.py:63
Methodcounts2vec
Function maps counts of ngram to vector of tfidf weights. The function returns vec, an array of dictionary that store mapping
rl4lms/envs/text_generation/caption_metrics/cider.py:116
Methodentropy
(self)
rl4lms/algorithms/common/maskable/distributions.py:146
Methodentropy
(self)
rl4lms/algorithms/common/maskable/distributions.py:219
Methodevaluate_actions
(self, obs: torch.Tensor, actions: torch.Tensor)
rl4lms/envs/text_generation/policy.py:212
Methodevaluate_actions
(self, obs: torch.Tensor, actions: torch.Tensor, action_mask
rl4lms/envs/text_generation/policy.py:757
Methodevaluate_actions
Evaluates specified <observation, action> and returns log_probs, values, entropy This is invoked for each mini-batch in roll
rl4lms/envs/text_generation/policy/base_policy.py:317
Methodevaluate_actions
( self, obs: torch.Tensor, actions: torch.Tensor )
rl4lms/envs/text_generation/policy/causal_policy.py:208
Methodevaluate_actions
( self, obs: torch.Tensor, actions: torch.Tensor, action_masks: torch.Tensor )
rl4lms/envs/text_generation/policy/causal_policy.py:477
Methodevaluate_actions
( self, obs: torch.Tensor, actions: torch.Tensor )
rl4lms/envs/text_generation/policy/seq2seq_policy.py:238
Methodevaluate_actions
( self, obs: torch.Tensor, actions: torch.Tensor, action_masks: torch.Tensor )
rl4lms/envs/text_generation/policy/seq2seq_policy.py:495
Methodfeaturize
(self, observation: BaseObservation)
rl4lms/envs/common/observation.py:17
Methodforward
(self, *args, **kwargs)
rl4lms/envs/text_generation/policy.py:747
Methodforward
Forward pass in all the networks (actor and critic) :param obs: Observation :param deterministic: Whether to sample or use d
rl4lms/algorithms/common/maskable/policies.py:95
Methodforward_policy
(self, obs: TensorDict, actions: torch.tensor, model_kwargs: Opt
rl4lms/envs/text_generation/policy.py:389
Methodforward_policy
(self, obs: TensorDict, actions: torch.Tensor, action_masks: tor
rl4lms/envs/text_generation/policy.py:991
Methodforward_policy
Performs a forward pass on the policy and gets log_probs, entropy etc corresponding to specified observation, actions This i
rl4lms/envs/text_generation/policy/base_policy.py:278
Methodforward_value
(self, obs: TensorDict, model_kwargs: Optional[Dict[str, torch.tensor]] = None)
rl4lms/envs/text_generation/policy.py:439
Methodforward_value
(self, obs: TensorDict, model_kwargs: Optional[Dict[str, torch.tensor]] = None)
rl4lms/envs/text_generation/policy.py:1048
Methodforward_value
Performs a forward pass on the value network and gets values corresponding to observations This is invoked during rollout generation
rl4lms/envs/text_generation/policy/base_policy.py:299
Methodgen_split_name
(split: str)
rl4lms/data_pools/custom_text_generation_pools.py:146
Methodgenerate
r""" Generates sequences of token ids for models with a language modeling head. The method supports the following generation methods
rl4lms/envs/text_generation/hf_generation_utils.py:867
Methodgenerate
(self, tokenizer: AutoTokenizer, texts: List[str] = None, max_prompt_length:
rl4lms/envs/text_generation/policy.py:809
Methodgenerate
( self, tokenizer: AutoTokenizer, texts: List[str] = None, max_prompt_length:
rl4lms/envs/text_generation/policy/base_policy.py:178
Methodgenerate
( self, tokenizer: AutoTokenizer, texts: List[str] = None, max_prompt_length:
rl4lms/envs/text_generation/policy/causal_policy.py:493
Methodgenerate
( self, tokenizer: AutoTokenizer, texts: List[str] = None, max_prompt_length:
rl4lms/envs/text_generation/policy/seq2seq_policy.py:536
Methodget
(cls, datapool_id: str, kwargs: Dict[str, Any])
rl4lms/envs/text_generation/registry.py:105
Methodget
(cls, reward_fn_id: str, kwargs: Dict[str, Any])
rl4lms/envs/text_generation/registry.py:139
Methodget
(cls, policy_id: str)
rl4lms/envs/text_generation/registry.py:194
Methodget
( cls, alg_id: str )
rl4lms/envs/text_generation/registry.py:212
Methodget
(cls, alg_id: str)
rl4lms/envs/text_generation/registry.py:237
Methodget
(cls, post_processor_id: str)
rl4lms/envs/text_generation/registry.py:255
Methodget
(self, batch_size: Optional[int] = None)
rl4lms/algorithms/common/maskable/buffers.py:188
Methodget_action_space
Lists all possible actions indices and its meaning Returns: ActionSpace -- an instance of action space
rl4lms/envs/common/base_env.py:66
Methodget_all_samples
(self)
rl4lms/core_components/sampler.py:39
Methodget_config_module
(self)
rl4lms/envs/text_generation/policy.py:353
Methodget_config_module
(self)
rl4lms/envs/text_generation/policy.py:543
Methodget_config_module
(self)
rl4lms/envs/text_generation/policy.py:915
Methodget_config_module
(self)
rl4lms/envs/text_generation/policy.py:1152
Methodget_dataset
(cls, split: str)
rl4lms/data_pools/custom_text_generation_pools.py:383
Methodget_dataset
(cls, split: str)
rl4lms/data_pools/custom_text_generation_pools.py:414
Methodget_dataset
(cls, split: str)
rl4lms/data_pools/custom_text_generation_pools.py:450
Methodget_distribution
(self, obs: TensorDict, detach=False)
rl4lms/envs/text_generation/policy.py:99
Methodget_distribution
(self, obs: TensorDict, detach=False)
rl4lms/envs/text_generation/policy/causal_policy.py:281
Functionget_highlighted_subtable
Extract out the highlighted part of a table.
rl4lms/data_pools/task_utils/totto/preprocess_utils.py:64
Functionget_highlighted_subtable
Extract out the highlighted part of a table.
rl4lms/data_pools/task_utils/totto/eval_utils/table_to_text_utils.py:18
Methodget_input_for_classifier
(prompt, generated_text)
rl4lms/envs/text_generation/metric.py:685
Methodget_inputs_for_generation
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy.py:540
Methodget_inputs_for_generation
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy.py:806
Methodget_inputs_for_generation
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy.py:1149
Methodget_inputs_for_generation
Extracts the prompt inputs and attention masks which is used as seed for generation
rl4lms/envs/text_generation/policy/base_policy.py:363
Methodget_inputs_for_generation
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy/causal_policy.py:265
Methodget_inputs_for_generation
(self, obs: TensorDict)
rl4lms/envs/text_generation/policy/seq2seq_policy.py:334
Methodget_language_model
(self)
rl4lms/envs/text_generation/policy.py:909
Methodget_language_model
(self)
rl4lms/envs/text_generation/policy/base_policy.py:265
Methodget_log_probs_ref_model
(self, obs: TensorDict, action: torch.tensor,
rl4lms/envs/text_generation/policy.py:488
Methodget_log_probs_ref_model
(self, obs: TensorDict, action: torch.tensor,
rl4lms/envs/text_generation/policy.py:768
Methodget_log_probs_ref_model
(self, obs: TensorDict, action: torch.tensor,
rl4lms/envs/text_generation/policy.py:1097
Methodget_log_probs_ref_model
Performs a forward pass on the reference policy and gets log_probs corresponding to specified observation, actions This is i
rl4lms/envs/text_generation/policy/base_policy.py:329
Methodget_log_probs_ref_model
( self, obs: TensorDict, action: torch.tensor, past_model_kwargs: Dict[str, An
rl4lms/envs/text_generation/policy/causal_policy.py:222
Methodget_log_probs_ref_model
( self, obs: TensorDict, action: torch.tensor, model_kwarpast_model_kwargsgs:
rl4lms/envs/text_generation/policy/seq2seq_policy.py:259
Methodget_observation_dim
Returns the observation dim
rl4lms/envs/common/observation.py:20
Methodget_policy_first_device
(self)
rl4lms/envs/text_generation/policy.py:537
Methodget_policy_first_device
(self)
rl4lms/envs/text_generation/policy.py:1146
Methodget_policy_type
(self)
rl4lms/envs/text_generation/policy.py:356
Methodget_policy_type
(self)
rl4lms/envs/text_generation/policy.py:546
Methodget_policy_type
(self)
rl4lms/envs/text_generation/policy.py:918
Methodget_policy_type
(self)
rl4lms/envs/text_generation/policy.py:1155
Methodget_policy_type
Returns the type of policy (causal or seq2seq)
rl4lms/envs/text_generation/policy/base_policy.py:356
Methodget_policy_type
(self)
rl4lms/envs/text_generation/policy/causal_policy.py:271
Methodget_policy_type
(self)
rl4lms/envs/text_generation/policy/seq2seq_policy.py:341
Methodget_samples
Returns list of samples available in the environment Returns: List[Sample]: list of samples in the environment
rl4lms/envs/common/base_env.py:84
Methodget_state_dict
(self)
rl4lms/envs/text_generation/warm_start.py:13
Methodget_state_dict
(self)
rl4lms/envs/text_generation/warm_start.py:27
Methodget_state_dict
(self)
rl4lms/envs/text_generation/warm_start.py:45
Methodget_state_dict
(self)
rl4lms/envs/text_generation/warm_start.py:79
Functionget_subtable_parent_format
Convert subtable to PARENT format. Do not include section text.
rl4lms/data_pools/task_utils/totto/eval_utils/table_to_text_utils.py:68
Functionget_table_parent_format
Convert table to format required by PARENT.
rl4lms/data_pools/task_utils/totto/eval_utils/table_to_text_utils.py:28
Methodhessian_vector_product
Computes the matrix-vector product with the Fisher information matrix. :param params: list of parameters used to compute the Hessian
rl4lms/algorithms/trpo/trpo.py:415
Methodix_to_action
(self, ix: int)
rl4lms/envs/common/action_space.py:19
Methodkl_coeff
(self)
rl4lms/envs/text_generation/kl_controllers.py:20
Methodlearn
( self, total_timesteps: int, callback: MaybeCallback = None, log_interval: in
rl4lms/algorithms/nlpo/nlpo.py:454
Methodlearn
( self, total_timesteps: int, callback: MaybeCallback = None, log_interval: in
rl4lms/algorithms/ppo/ppo.py:329
Methodlearn
( self, total_timesteps: int, callback: MaybeCallback = None, log_interval: in
rl4lms/algorithms/trpo/trpo.py:430
Functionlinearize_full_table
Linearize full table with localized headers and return a string.
rl4lms/data_pools/task_utils/totto/preprocess_utils.py:91
Functionlinearize_subtable
Linearize the highlighted subtable and return a string of its contents.
rl4lms/data_pools/task_utils/totto/preprocess_utils.py:140
Methodload_from_dict
(self, state_dict: dict = None)
rl4lms/envs/text_generation/warm_start.py:20
Methodload_from_dict
(self, state_dict: dict = None)
rl4lms/envs/text_generation/warm_start.py:36
Methodload_from_dict
(self, state_dict: dict = None)
rl4lms/envs/text_generation/warm_start.py:55
Methodload_from_dict
(self, state_dict: Dict[str, Any])
rl4lms/envs/text_generation/warm_start.py:86
Methodlog_prob_from_params
(self, action_logits: th.Tensor)
rl4lms/algorithms/common/maskable/distributions.py:163
Methodlog_prob_from_params
(self, action_logits: th.Tensor)
rl4lms/algorithms/common/maskable/distributions.py:236
← previousnext →401–500 of 555, ranked by callers