MCPcopy Create free account

hub / github.com/COLA-Laboratory/OmniGenBench / functions

Functions955 in github.com/COLA-Laboratory/OmniGenBench

Method__init__
Initializes the multi-label sequence classification model. Args: config_or_model: Model configuration, pre-trained model
omnigenbench/src/model/classification/model.py:506
Method__init__
(self, config_or_model, tokenizer, *args, **kwargs)
omnigenbench/src/model/classification/model.py:638
Method__init__
(self, config_or_model, tokenizer, *args, **kwargs)
omnigenbench/src/model/classification/model.py:662
Method__init__
(self, config_or_model, tokenizer, *args, **kwargs)
omnigenbench/src/model/classification/model.py:688
Method__init__
Initialize the RNA design model. Args: model (str): Model name or path for the pre-trained MLM model device:
omnigenbench/src/model/rna_design/model.py:47
Method__init__
Initialize the Metric class. Args: metric_func (callable, optional): Custom metric function to use ignore_y
omnigenbench/src/metric/metric.py:82
Method__init__
Initializes the classification metric. Args: metric_func (callable, optional): A callable metric function from
omnigenbench/src/metric/classification_metric.py:38
Method__init__
Initialize the RegressionMetric class. Args: metric_func (callable, optional): Custom metric function to use
omnigenbench/src/metric/regression_metric.py:78
Method__init__
Initialize the RankingMetric class. Args: *args: Additional positional arguments passed to parent class **kw
omnigenbench/src/metric/ranking_metric.py:43
Method__init__
Initialize the RNA structure cache. Args: cache_file (str, optional): Path to the cache file. If None, uses
omnigenbench/src/misc/utils.py:68
Method__init__
Initialize the base trainer. Args: model (torch.nn.Module): The model to be trained train_dataset (Optional[
omnigenbench/src/trainer/base_trainer.py:285
Method__init__
Initialize the HuggingFace training arguments wrapper. Args: *args: Positional arguments passed to the parent TrainingAr
omnigenbench/src/trainer/hf_trainer.py:315
Method__init__
Initialize the accelerate trainer. Args: model (torch.nn.Module): The model to be trained **kwargs: Addition
omnigenbench/src/trainer/accelerate_trainer.py:54
Method__init__
Initialize the native trainer. Args: model (torch.nn.Module): The model to be trained device (Optional[Union
omnigenbench/src/trainer/trainer.py:55
Method__init__
(self, model)
omnigenbench/src/explainability/attention/explainer.py:16
Method__init__
Initializes the EpistasisExplainer. Args: model (Any): The model to explain, which must be compatible with the
omnigenbench/src/explainability/epistasis/explainer.py:47
Method__init__
Initialize the LIMEExplainer. Args: model: The trained model (classification or regression) to explain.
omnigenbench/src/explainability/shared_methods/lime_explainer.py:34
Method__init__
Initializes the TSNEExplainer. Args: model: A model object capable of generating embeddings, which should have
omnigenbench/src/explainability/shared_methods/tsne_explainer.py:33
Method__init__
Initialize the ISMExplainer. Args: model: The trained model (classification or regression) to explain.
omnigenbench/src/explainability/shared_methods/ism_explainer.py:30
Method__init__
( self, alphabet: List[str], mut_rate: float = 0.1, uniform: bool = False,
omnigenbench/src/explainability/shared_methods/squid_explainer.py:377
Method__init__
Initialize the SQUIDCombinatorialMutagenesis class. Args: max_order: the maximum order of mutations to generate. If -1,
omnigenbench/src/explainability/shared_methods/squid_explainer.py:426
Method__init__
(self, L: int, A: int, reg_strength: float = 0.0)
omnigenbench/src/explainability/shared_methods/squid_explainer.py:517
Method__init__
(self, L: int, A: int, rank: int = 8, reg_strength: float = 0.0)
omnigenbench/src/explainability/shared_methods/squid_explainer.py:543
Method__init__
(self, hidden_nodes: int = 50)
omnigenbench/src/explainability/shared_methods/squid_explainer.py:578
Method__init__
( self, input_shape: Tuple[int, int, int], num_tasks: int, gpmap: str = "addit
omnigenbench/src/explainability/shared_methods/squid_explainer.py:589
Method__init__
Initializes the SequenceLogoExplainer. Args: model: The pre-trained model to be explained. This should be a model
omnigenbench/src/explainability/sequence_logo/explainer.py:67
Method__init__
Initializes the Visualization2DExplainer. Args: model (OmniModelForEmbedding): The model to explain. It must be an instance of
omnigenbench/src/explainability/visualization_2d/explainer.py:50
Method__init__
Initialize the OmniKmersTokenizer. Args: base_tokenizer: The base tokenizer for converting k-mers to token IDs
omnigenbench/src/tokenizer/kmers_tokenizer.py:42
Method__init__
Initializes the single nucleotide tokenizer. Args: base_tokenizer: The underlying Hugging Face tokenizer. **
omnigenbench/src/tokenizer/single_nucleotide_tokenizer.py:38
Method__init__
Initialize the OmniBPETokenizer. Args: base_tokenizer: The base BPE tokenizer **kwargs: Additional keyword a
omnigenbench/src/tokenizer/bpe_tokenizer.py:75
Method__init__
Initializes the BenchHub.
omnigenbench/auto/bench_hub/bench_hub.py:17
Method__init__
Initialize the AutoTrain instance. Args: dataset (str): The name or path of the dataset to use for training.
omnigenbench/auto/auto_train/auto_train.py:59
Method__init__
Initializes the AutoBench instance. Args: benchmark (str): The name or path of the benchmark to use.
omnigenbench/auto/auto_bench/auto_bench.py:91
Method__init__
Initializes the AutoConfig. :param args: A dictionary or `argparse.Namespace` of parameters. :param kwargs:
omnigenbench/auto/config/auto_config.py:25
Method__init__
(self)
examples/rna_secondary_structure_prediction/enhanced_ssp_demo.py:25
Method__init__
Initialize dataset with BPP computation capability.
examples/translation_efficiency_prediction/te_bpp_model.py:118
Method__init__
Initialize fusion module.
examples/translation_efficiency_prediction/te_bpp_model.py:373
Method__init__
Initialize model with BPP fusion.
examples/translation_efficiency_prediction/te_bpp_model.py:475
Method__init__
Initialize model with BPP fusion capability. Args: config_or_model: Path to pre-trained model tokeni
examples/translation_efficiency_prediction/te_with_bpp_features.py:209
Method__iter__
Returns an iterator over the dataset. Returns: iterator: An iterator over the dataset.
omnigenbench/src/abc/abstract_dataset.py:1466
Method__iter__
Return an iterator over the keys of the parameter dict.
omnigenbench/auto/config/auto_config.py:162
Method__len__
Returns the number of samples in the dataset. Returns: int: The number of samples in the dataset.
omnigenbench/src/abc/abstract_dataset.py:1341
Method__len__
Return the number of items in the parameter dict.
omnigenbench/auto/config/auto_config.py:156
Method__ne__
Check if the parameter dict is not equal to another object. :param other: The other object to compare with the parameter dict.
omnigenbench/auto/config/auto_config.py:211
Method__repr__
Return a detailed string representation of the configuration, including all parameters and the frequency of their access.
omnigenbench/auto/config/auto_config.py:144
Method__setitem__
Sets a structure prediction in the cache.
omnigenbench/src/misc/utils.py:99
Method__setitem__
Set the value of a key in the parameter dict. Also set the call frequency of the key to 0 and check if the updated configuration is v
omnigenbench/auto/config/auto_config.py:184
Method__str__
String representation of the cache.
omnigenbench/src/misc/utils.py:103
Method__str__
Return the same formatted representation as __repr__.
omnigenbench/src/trainer/base_trainer.py:122
Method__str__
Get a string representation of the parameter dict. :return: A string representation of the parameter dict.
omnigenbench/auto/config/auto_config.py:137
Method_compute_hf_metrics
Compute metrics for HuggingFace trainer. This method adapts OmniGenome metrics to work with HuggingFace trainer. Args:
omnigenbench/src/trainer/hf_trainer.py:112
Method_download_dataset_from_huggingface
Downloads and extracts datasets from OmniGenBench Hub powered by HuggingFace. .. deprecated:: 0.3.0 Use ``omnigenbench.s
omnigenbench/src/abc/abstract_dataset.py:1267
Method_load_state_dict
Load model state dictionary from temporary file.
omnigenbench/src/trainer/trainer.py:358
Method_longest_bp_span
Compute the longest base-pair distance using a stack over dot-bracket notation.
omnigenbench/src/model/rna_design/model.py:99
Method_max_labels_length
Returns the maximum length of labels in the dataset. Returns: int: The maximum length of labels.
omnigenbench/src/abc/abstract_dataset.py:1454
Method_predict_batch
Generate predictions for a batch using the model. Args: batch: Input batch Returns: Dict[str, torch
omnigenbench/src/trainer/hf_trainer.py:153
Method_predict_batch
Generate predictions for a batch using the model. Args: batch: Input batch Returns: Dict[str, torch
omnigenbench/src/trainer/accelerate_trainer.py:135
Method_prepare_batch
Prepare a batch for model input. For HuggingFace trainer, batch preparation is handled internally. Args: batch:
omnigenbench/src/trainer/hf_trainer.py:139
Method_prepare_batch
Prepare a batch for model input. For accelerate trainer, the batch is already prepared by accelerator, so we just return it
omnigenbench/src/trainer/accelerate_trainer.py:120
Method_save_state_dict
Save model state dictionary to temporary file.
omnigenbench/src/trainer/trainer.py:370
Method_setup_training_components
Set up HuggingFace training-specific components. This method initializes the HuggingFace Trainer with the model, datasets, a
omnigenbench/src/trainer/hf_trainer.py:96
Method_setup_training_components
Set up accelerate training-specific components. This method initializes the HuggingFace Accelerator with appropriate mixed p
omnigenbench/src/trainer/accelerate_trainer.py:68
Method_setup_training_components
Set up native training-specific components. This method initializes the device, mixed precision settings, and gradient scale
omnigenbench/src/trainer/trainer.py:77
Function_synchronize_config_with_checkpoint
Align config fields with the actual checkpoint tensor shapes. Some training scripts mutate the transformer architecture (e.g., GLU width)
omnigenbench/src/utility/model_hub/model_hub.py:325
Method_train_epoch
Train the model for one epoch. This method is not used in HuggingFace trainer as training is handled by the HuggingFace Trai
omnigenbench/src/trainer/hf_trainer.py:165
Method_train_epoch
Train the model for one epoch using native PyTorch. Args: epoch (int): Current epoch number Returns:
omnigenbench/src/trainer/trainer.py:128
Methodaugment
Generate multiple augmented instances for a single sequence. Args: seq (str): Input genomic sequence k (int,
omnigenbench/src/model/augmentation/model.py:198
Methodavailable_models
Get information about available models in the hub. This method queries the OmniGenome hub to retrieve information about avai
omnigenbench/src/utility/model_hub/model_hub.py:814
Methodbatch_encode_tokens
Encode sequences to token-level embeddings (last_hidden_state). Args: sequences (List[str]): Input DNA/RNA sequences for
omnigenbench/src/abc/embedding_mixin.py:124
Methodbatch_encode_tokens
Encode sequences to token-level embeddings (last_hidden_state). Args: sequences (List[str]): Input DNA/RNA sequences for
omnigenbench/src/model/embedding/model.py:149
Methodbatch_extract_attention_scores
Extract attention scores from multiple genomic sequences in batches. This method provides efficient batch processing for attention extraction
omnigenbench/src/model/embedding/model.py:509
Methodbatch_predict
Predicts on a batch of texts using the ensemble of predictors. This method processes multiple texts efficiently by combining predict
omnigenbench/src/utility/ensemble.py:267
Functionbenchmark_names
Available benchmark datasets
tests/test_autobench_autotrain.py:31
Methodblock
(in_ch, out_ch, k)
omnigenbench/src/model/baselines.py:1226
Methodblock
(in_ch, out_ch, k)
omnigenbench/src/model/baselines.py:1651
Methodcalculate_accuracy
Calculate accuracy between two structures
tests/test_structure_prediction.py:187
Methodcalculate_bp_metrics
Calculate precision, recall, F1 for base pairs
tests/test_structure_prediction.py:227
Functioncheck_version
Checks the version compatibility between local and remote OmniGenome. Args: repo (str, optional): The repository URL to check. If No
omnigenbench/src/utility/hub_utils.py:768
Methodcompute
Computes the metric. This method must be implemented by subclasses. Args: y_true: Ground truth labels. y_pre
omnigenbench/src/abc/abstract_metric.py:133
Methodcompute_bpp_matrix
Compute Base Pairing Probability (BPP) matrix using ViennaRNA. Args: sequence: RNA sequence string
examples/translation_efficiency_prediction/te_with_bpp_features.py:49
Functioncovert_input_to_tensor
This function traverses through nested dictionaries and lists, converting numerical values to PyTorch tensors while preserving the structure.
omnigenbench/src/abc/abstract_dataset.py:26
Functioncreate_baseline
Factory for building baselines via OmniGenericBaseline. Example: model = create_baseline( tokenizer, backbone_typ
omnigenbench/src/model/baselines.py:2354
Methoddecode
Decode input IDs using the base tokenizer. Args: input_ids: Input IDs to decode **kwargs: Additional keyword
omnigenbench/src/tokenizer/kmers_tokenizer.py:197
Methoddecode
Converts a list of token IDs back into a sequence. This method decodes token IDs back into genomic sequences using the under
omnigenbench/src/tokenizer/single_nucleotide_tokenizer.py:211
Methoddecode
Decode a sequence using the base BPE tokenizer. Args: sequence: Input sequence to decode (can be token IDs or tokens)
omnigenbench/src/tokenizer/bpe_tokenizer.py:203
Methoddevice
(self)
omnigenbench/src/model/baselines.py:147
Methoddevice
(self)
omnigenbench/src/model/baselines.py:420
Methoddevice
(self)
omnigenbench/src/model/baselines.py:660
Methoddevice
(self)
omnigenbench/src/model/baselines.py:907
Methoddevice
(self)
omnigenbench/src/model/baselines.py:1198
Methoddevice
(self)
omnigenbench/src/model/baselines.py:2052
Methoddevice
(self)
omnigenbench/src/model/baselines.py:2143
Methoddevice
(self)
omnigenbench/src/model/baselines.py:2454
Methoddevice
(self)
omnigenbench/src/model/baselines.py:2575
Methoddevice
(self)
omnigenbench/src/model/baselines.py:2725
Functiondownload_benchmarks
Download all benchmarks before running tests. This ensures benchmark data is available for testing.
tests/test_autobench_autotrain.py:37
Functiondownload_file_from_hf_hub
Download a single file from HuggingFace Hub. Args: repo_id (str): HuggingFace repository identifier filename (str): Name of
omnigenbench/src/utility/model_hub/hf_download.py:147
Methoddtype
(self)
omnigenbench/src/model/baselines.py:151
Methoddtype
(self)
omnigenbench/src/model/baselines.py:424
Methoddtype
(self)
omnigenbench/src/model/baselines.py:664
← previousnext →401–500 of 955, ranked by callers