321 matches across 11 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/utils/misc_test.py | 23 | def test_merge_annotations_gap(): |
| LOW | esm/utils/misc.py | 40 | def slice_python_object_as_numpy( |
| LOW | esm/utils/misc.py | 180 | def stack_variable_length_tensors( |
| LOW | esm/utils/misc.py | 394 | def get_chainbreak_boundaries_from_sequence(sequence: Sequence[str]) -> np.ndarray: |
| LOW | esm/utils/misc.py | 444 | def iterate_with_intermediate( |
| LOW | esm/utils/system.py | 10 | def run_subprocess_with_errorcheck( |
| LOW | esm/utils/encoding.py | 26 | def get_default_secondary_structure(sequence_length: int) -> str: |
| LOW | esm/utils/encoding.py | 100 | def tokenize_secondary_structure( |
| LOW | esm/utils/encoding.py | 138 | def tokenize_function_annotations( |
| LOW | esm/utils/encoding.py | 156 | def get_default_sequence_tokens( |
| LOW | esm/utils/encoding.py | 172 | def get_default_structure_tokens( |
| LOW | esm/utils/encoding.py | 185 | def get_default_secondary_structure_tokens( |
| LOW | esm/utils/encoding.py | 206 | def get_default_function_tokens( |
| LOW | esm/utils/encoding.py | 219 | def get_default_residue_annotation_tokens( |
| LOW | esm/utils/generation.py | 37 | def _trim_sequence_tensor_dataclass(o: Any, sequence_len: int): |
| LOW | esm/utils/generation.py | 241 | def _get_iterative_sampling_mask_for_prompt_and_step( |
| LOW | esm/utils/generation.py | 350 | def _get_annealed_temperature(step: int, num_steps: int, initial_temperature: float): |
| LOW | esm/utils/generation.py | 355 | def iterative_sampling_tokens( |
| LOW | esm/utils/decoding.py | 172 | def decode_secondary_structure( |
| LOW | esm/utils/decoding.py | 206 | def decode_function_annotations( |
| LOW | esm/utils/decoding.py | 223 | def decode_residue_annotations( |
| LOW | esm/utils/sequential_dataclass.py | 97 | def _check_sequence_lengths_match(self): |
| LOW | esm/utils/residue_constants.py | 429 | def load_stereo_chemical_props() -> ( |
| LOW | esm/utils/residue_constants.py | 1042 | def _make_rigid_group_constants(): |
| LOW | esm/utils/sampling.py | 109 | def get_default_sampling_config( |
| LOW | esm/utils/sampling.py | 241 | def sample_residue_annotation_logits( |
| LOW | esm/utils/msa/msa.py | 23 | def remove_insertions_from_sequence(seq: str) -> str: |
| LOW | esm/utils/constants/models.py | 17 | def forge_only_return_single_layer_hidden_states(model_name: str): |
| LOW | esm/utils/constants/models.py | 21 | def model_is_locally_supported(x: str): |
| LOW | esm/utils/function/encode_decode.py | 13 | def encode_function_annotations( |
| LOW | esm/utils/function/encode_decode.py | 136 | def decode_residue_annotation_tokens( |
| LOW | esm/utils/structure/mmcif_parsing.py | 357 | def _parse_nonpoly_from_mmcif(self) -> dict[tuple, bs.AtomArray]: |
| LOW | esm/utils/structure/input_builder.py | 82 | def serialize_structure_prediction_input(all_atom_input: StructurePredictionInput): |
| LOW | esm/utils/structure/input_builder.py | 156 | def deserialize_structure_prediction_input( |
| LOW | esm/utils/structure/protein_structure.py | 70 | def compute_alignment_tensors( |
| LOW | esm/utils/structure/protein_structure.py | 165 | def compute_rmsd_no_alignment( |
| LOW | esm/utils/structure/protein_structure.py | 263 | def compute_gdt_ts_no_alignment( |
| LOW | esm/utils/structure/input_builder_test.py | 38 | def test_roundtrip_minimal_protein() -> None: |
| LOW | esm/utils/structure/input_builder_test.py | 43 | def test_roundtrip_protein_with_modifications() -> None: |
| LOW | esm/utils/structure/input_builder_test.py | 68 | def test_roundtrip_protein_with_msa() -> None: |
| LOW | esm/utils/structure/input_builder_test.py | 82 | def test_roundtrip_rna_dna_ligand() -> None: |
| LOW | esm/utils/structure/input_builder_test.py | 99 | def test_roundtrip_full_with_conditioning() -> None: |
| LOW | esm/utils/structure/input_builder_test.py | 140 | def test_unsupported_sequence_type_raises() -> None: |
| LOW | esm/utils/structure/protein_chain.py | 235 | def residue_index_no_insertions(self) -> np.ndarray: |
| LOW | esm/utils/structure/protein_chain.py | 760 | def chain_iterable_from_mmcif( |
| LOW | esm/utils/structure/protein_chain.py | 968 | def from_backbone_atom_coordinates( |
| LOW | esm/utils/structure/protein_chain.py | 1355 | def to_structure_encoder_inputs( |
| LOW | esm/utils/structure/protein_complex.py | 53 | def _parse_operation_expression(expression): |
| LOW | esm/utils/structure/protein_complex.py | 85 | def _apply_transformations_fast(chains, transformation_dict, operations): |
| LOW | esm/utils/structure/protein_complex.py | 364 | def normalize_chain_ids_for_pdb(self): |
| LOW | esm/utils/structure/protein_complex.py | 377 | def find_assembly_ids_with_chain(self, id: str) -> list[str]: |
| LOW | esm/utils/structure/protein_complex.py | 679 | def _sanity_check_complexes_are_comparable(self, other: ProteinComplex): |
| LOW | esm/utils/structure/protein_complex.py | 1219 | def protein_chain_to_protein_complex(chain: ProteinChain) -> ProteinComplex: |
| LOW | esm/utils/structure/normalize_coordinates.py | 34 | def get_protein_normalization_frame(coords: Tensor) -> Affine3D: |
| LOW | esm/utils/structure/predicted_aligned_error.py | 37 | def compute_predicted_aligned_error( |
| LOW | esm/utils/structure/molecular_complex_test.py | 105 | def test_from_mmcif_ligand_on_separate_chain(): |
| LOW | esm/utils/structure/molecular_complex_test.py | 127 | def test_to_mmcif_entity_categories(): |
| LOW | esm/utils/structure/molecular_complex_test.py | 138 | def test_blob_roundtrip_preserves_chain_separation(): |
| LOW | esm/utils/structure/molecular_complex_test.py | 155 | def test_blob_roundtrip_preserves_atom_counts(): |
| LOW | esm/utils/structure/molecular_complex_test.py | 175 | def test_to_mmcif_entity_types_correct(): |
| 67 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | esm/models/esmfold2/constants.py | 6 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 8 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 15 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 17 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 55 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 57 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 164 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 166 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 201 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 203 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 302 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/constants.py | 304 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 60 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 62 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 107 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 109 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 186 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 188 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 668 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 670 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 818 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 820 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 1463 | # ============================================================================= |
| MEDIUM | esm/models/esmfold2/prepare_input.py | 1465 | # ============================================================================= |
| MEDIUM | esm/sdk/experimental/guided_generation.py | 107 | # ---------------------------------------------- |
| MEDIUM | esm/sdk/experimental/guided_generation.py | 109 | # ---------------------------------------------- |
| MEDIUM | esm/sdk/experimental/guided_generation.py | 119 | # ---------------------------------------------- |
| MEDIUM | esm/sdk/experimental/guided_generation.py | 121 | # ---------------------------------------------- |
| MEDIUM | cookbook/snippets/esmc.py | 21 | # ================================================================ |
| MEDIUM | cookbook/snippets/esmc.py | 23 | # ================================================================ |
| MEDIUM | cookbook/snippets/esmc.py | 63 | # ================================================================ |
| MEDIUM | cookbook/snippets/esmc.py | 65 | # ================================================================ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/utils/generation.py | 37 | |
| LOW | esm/utils/generation.py | 66 | |
| LOW | esm/utils/generation.py | 130 | |
| LOW | esm/utils/sequential_dataclass.py | 97 | |
| LOW | esm/utils/residue_constants.py | 1116 | |
| LOW | esm/utils/sampling.py | 133 | |
| LOW | esm/utils/forge_context_manager.py | 88 | |
| LOW | esm/utils/constants/esm3.py | 105 | |
| LOW | esm/utils/structure/mmcif_parsing.py | 74 | |
| LOW | esm/utils/structure/mmcif_parsing.py | 119 | |
| LOW | esm/utils/structure/mmcif_parsing.py | 175 | |
| LOW | esm/utils/structure/mmcif_parsing.py | 357 | |
| LOW | esm/utils/structure/mmcif_parsing.py | 422 | |
| LOW | esm/utils/structure/input_builder.py | 82 | |
| LOW | esm/utils/structure/input_builder.py | 156 | |
| LOW | esm/utils/structure/molecular_complex.py | 443 | |
| LOW | esm/utils/structure/molecular_complex.py | 786 | |
| LOW | esm/utils/structure/molecular_complex.py | 948 | |
| LOW | esm/utils/structure/molecular_complex.py | 1181 | |
| LOW | esm/utils/structure/protein_chain.py | 81 | |
| LOW | esm/utils/structure/protein_chain.py | 891 | |
| LOW | esm/utils/structure/protein_chain.py | 1005 | |
| LOW | esm/utils/structure/protein_complex.py | 799 | |
| LOW | esm/utils/structure/molecular_complex_test.py | 304 | |
| LOW | esm/models/esmfold2/conformers.py | 268 | |
| LOW | esm/models/esmfold2/processor.py | 45 | |
| LOW | esm/models/esmfold2/paired_msa.py | 86 | |
| LOW | esm/models/esmfold2/prepare_input.py | 157 | |
| LOW | esm/models/esmfold2/prepare_input.py | 329 | |
| LOW | esm/models/esmfold2/prepare_input.py | 673 | |
| LOW | esm/models/esmfold2/prepare_input.py | 688 | |
| LOW | esm/models/esmfold2/prepare_input.py | 823 | |
| LOW | esm/models/esmfold2/prepare_input.py | 963 | |
| LOW | esm/models/esmfold2/prepare_input.py | 1103 | |
| LOW | esm/models/esmfold2/prepare_input.py | 1143 | |
| LOW | esm/models/esmfold2/output.py | 18 | |
| LOW | esm/models/esmfold2/output.py | 129 | |
| LOW | esm/tokenization/residue_tokenizer.py | 73 | |
| LOW | esm/sdk/forge.py | 116 | |
| LOW | esm/sdk/api.py | 56 | |
| LOW | esm/sdk/api.py | 165 | |
| LOW | esm/widgets/utils/prompting.py | 386 | |
| LOW | esm/widgets/components/results_visualizer.py | 21 | |
| LOW | esm/widgets/components/results_visualizer.py | 55 | |
| LOW | esm/widgets/components/sequence_prompt_selector.py | 13 | |
| LOW | esm/widgets/components/sequence_prompt_selector.py | 96 | |
| LOW | esm/widgets/components/structure_prompt_selector.py | 19 | |
| LOW | esm/widgets/components/structure_prompt_selector.py | 94 | |
| LOW | esm/widgets/components/structure_prompt_selector.py | 309 | |
| LOW | esm/widgets/views/prediction.py | 14 | |
| LOW | esm/widgets/views/prediction.py | 80 | |
| LOW | esm/widgets/views/esm3_generation_launcher.py | 21 | |
| LOW | esm/widgets/views/esm3_generation_launcher.py | 133 | |
| LOW | esm/widgets/views/inverse_folding.py | 14 | |
| LOW | esm/widgets/views/inverse_folding.py | 54 | |
| LOW | esm/widgets/views/esm3_prompt_preview.py | 74 | |
| LOW | esm/widgets/views/esm3_prompt_preview.py | 133 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/utils/types.py | 1 | |
| LOW | esm/utils/msa/msa.py | 1 | |
| LOW | esm/utils/msa/__init__.py | 1 | |
| LOW | esm/utils/msa/__init__.py | 1 | |
| LOW | esm/utils/msa/__init__.py | 1 | |
| LOW | esm/utils/structure/aligner.py | 1 | |
| LOW | esm/utils/structure/mmcif_parsing.py | 1 | |
| LOW | esm/utils/structure/affine3d.py | 1 | |
| LOW | esm/utils/structure/molecular_complex.py | 1 | |
| LOW | esm/utils/structure/protein_structure.py | 1 | |
| LOW | esm/utils/structure/protein_chain.py | 1 | |
| LOW | esm/utils/structure/protein_complex.py | 1 | |
| LOW | esm/models/esm3.py | 1 | |
| LOW | esm/models/esmc.py | 1 | |
| LOW | esm/models/esmfold2/conformers.py | 7 | |
| LOW | esm/models/esmfold2/__init__.py | 1 | |
| LOW | esm/models/esmfold2/__init__.py | 2 | |
| LOW | esm/models/esmfold2/__init__.py | 3 | |
| LOW | esm/models/esmfold2/__init__.py | 3 | |
| LOW | esm/models/esmfold2/__init__.py | 4 | |
| LOW | esm/models/esmfold2/__init__.py | 4 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 5 | |
| LOW | esm/models/esmfold2/__init__.py | 16 | |
| LOW | esm/models/esmfold2/__init__.py | 16 | |
| LOW | esm/models/esmfold2/__init__.py | 16 | |
| LOW | esm/models/esmfold2/types.py | 9 | |
| LOW | esm/models/esmfold2/types.py | 10 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/types.py | 11 | |
| LOW | esm/models/esmfold2/prepare_input.py | 7 | |
| LOW | esm/sdk/forge.py | 1 | |
| LOW | esm/sdk/api.py | 1 | |
| LOW | esm/sdk/experimental/__init__.py | 1 | |
| LOW | esm/sdk/experimental/__init__.py | 1 | |
| LOW | esm/sdk/experimental/__init__.py | 1 | |
| LOW | esm/sdk/experimental/__init__.py | 6 | |
| LOW | esm/sdk/experimental/__init__.py | 6 | |
| LOW | esm/sdk/experimental/constrained_generation.py | 1 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/utils/forge_context_manager.py | 137 | except Exception as e: |
| LOW | esm/utils/structure/mmcif_parsing.py | 71 | except Exception as e: |
| LOW | esm/utils/structure/mmcif_parsing.py | 115 | except Exception: |
| LOW | esm/utils/structure/mmcif_parsing.py | 164 | except Exception: |
| LOW | esm/utils/structure/mmcif_parsing.py | 468 | except Exception: |
| LOW | esm/utils/structure/molecular_complex.py | 472 | except Exception: |
| LOW | esm/utils/structure/molecular_complex.py | 536 | except Exception: |
| LOW | esm/utils/structure/molecular_complex.py | 944 | except Exception: |
| LOW | esm/utils/structure/molecular_complex.py | 1016 | except Exception as e: |
| LOW | esm/models/esmfold2/conformers.py | 59 | except Exception as e: |
| LOW | esm/sdk/forge.py | 909 | except Exception as e: |
| LOW | esm/sdk/retry.py | 34 | except Exception: |
| MEDIUM | esm/sdk/retry.py | 31 | def log_retry_attempt(retry_state): |
| LOW | esm/sdk/sagemaker.py | 46 | except Exception as e: |
| LOW | esm/sdk/sagemaker.py | 108 | except Exception as e: |
| LOW | esm/sdk/base_forge_client.py | 128 | except Exception as e: |
| LOW | esm/sdk/base_forge_client.py | 158 | except Exception as e: |
| LOW | esm/widgets/utils/protein_import.py | 110 | except Exception as e: |
| MEDIUM | esm/widgets/utils/protein_import.py | 112 | wrapped_print(f"Error: {e}") |
| LOW | esm/widgets/utils/protein_import.py | 149 | except Exception as e: |
| MEDIUM | esm/widgets/utils/protein_import.py | 151 | wrapped_print(f"Error: {e}") |
| MEDIUM | esm/widgets/utils/protein_import.py | 133 | def on_upload(self, _): |
| LOW | esm/widgets/components/structure_prompt_selector.py | 190 | except Exception as e: |
| LOW | esm/widgets/components/structure_prompt_selector.py | 331 | except Exception as e: |
| LOW | esm/widgets/components/function_annotator.py | 123 | except Exception as e: |
| MEDIUM | esm/widgets/components/function_annotator.py | 125 | print(f"Error: {e}") |
| LOW | esm/widgets/views/prediction.py | 149 | except Exception as e: |
| MEDIUM | esm/widgets/views/prediction.py | 80 | def on_click_predict(_): |
| LOW | esm/widgets/views/esm3_generation_launcher.py | 185 | except Exception: |
| LOW | esm/widgets/views/inverse_folding.py | 86 | except Exception as e: |
| MEDIUM | esm/widgets/views/inverse_folding.py | 54 | def on_click_inverse_fold(_): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | esm/utils/residue_constants.py | 494 | # Create a fast lookup dict for bond lengths. |
| MEDIUM | esm/utils/residue_constants.py | 870 | # Define a restype name for all unknown residues. |
| MEDIUM | esm/utils/structure/mmcif_parsing.py | 303 | # Create a basic mapping based on the chain_data |
| MEDIUM | esm/utils/structure/molecular_complex.py | 576 | # Create a mapping from chain_id to numeric indices |
| MEDIUM | esm/models/esm3.py | 391 | # The following methods are for the ESM3InferenceClient interface |
| MEDIUM | esm/widgets/components/function_annotator.py | 33 | # Create a text box input and a list of children to select from |
| MEDIUM | cookbook/snippets/sae_example.py | 19 | # Create a protein |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | esm/utils/residue_constants.py | 798 | Maps the given sequence into a one-hot encoded matrix. Args: sequence: An amino acid sequence. mapping: |
| HIGH | esm/models/esm3.py | 283 | Performs forward pass through the ESM3 model. Check utils to see how to tokenize inputs from raw data. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/utils/structure/mmcif_parsing.py | 259 | # Check if there are duplicate residue numbers in this chain |
| LOW | esm/utils/structure/molecular_complex.py | 294 | # Check if token is a standard 3-letter amino acid code |
| LOW | esm/utils/structure/molecular_complex.py | 455 | # Check if input is a file path or mmCIF string content |
| LOW | esm/utils/structure/molecular_complex.py | 1051 | # Check if both tokens have atoms |
| LOW | esm/utils/structure/molecular_complex.py | 1119 | # Check if both tokens have atoms |
| LOW | esm/models/esmfold2/prepare_input.py | 226 | # Check if standard residue (has predefined atom list) |
| LOW | esm/widgets/components/sequence_prompt_selector.py | 123 | a = 0.5 # Set alpha to 0.5 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | cookbook/snippets/esm3.py | 204 | "To try this script with a Forge/Biohub Platform API, please run ESM_API_KEY=your_api_key python esm3.py" |
| HIGH | cookbook/snippets/esmc.py | 137 | "To try this script with a Forge/Biohub Platform API, please run ESM_API_KEY=your_api_key python esm3.py" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/utils/misc.py | 281 | # For MPS, just return a no-op context manager (nullcontext) since MPS does not support autocast. |
| MEDIUM | esm/utils/structure/molecular_complex.py | 343 | # Normalize to uppercase and strip whitespace for robust matching |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | esm/layers/rotary.py | 1 | # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. |
| LOW | esm/utils/residue_constants.py | 1 | # Copyright 2025 EvolutionaryScale |