MCPcopy Create free account

hub / github.com/huggingface/sentence-transformers / functions

Functions4,575 in github.com/huggingface/sentence-transformers

Methodtest_truncation_applies_to_parsed_columns
(self, documents: Dataset)
tests/util/test_dataset.py:148
Methodtest_tuple_modality
(self)
tests/base/test_modality.py:1138
Methodtest_tuple_modality_preserves_processor_inputs_ordering
Content items should follow processor_inputs key order, not the modality tuple order.
tests/base/test_modality.py:1147
Methodtest_tuple_rows_count_as_lists
(self, documents: Dataset)
tests/util/test_dataset.py:171
Methodtest_two_element_text_still_routed_to_pair
A 2-element text input keeps routing to query/document roles (#3840).
tests/base/test_modality.py:1184
Methodtest_two_element_video_not_routed_to_pair
A 2-frame video (2 image paths) stays one video message, not a query/document pair (#3840).
tests/base/test_modality.py:1171
Functiontest_two_labels_with_large_batch
With 2 labels and batch_size=32, each batch should have exactly 32 samples with both labels.
tests/base/samplers/test_group_by_label_batch_sampler.py:150
Methodtest_two_tuple_explicit_id_col
(self, documents: Dataset)
tests/util/test_dataset.py:244
Functiontest_tying_preserves_decoder_lm_head
The decoder's weight-tied LM head must stay bound to the shared input embeddings. Tying the encoder *to* the decoder keeps all three as one tensor
tests/sentence_transformer/losses/test_denoising_auto_encoder.py:52
Methodtest_uint64_ids_resolve_without_precision_loss
(self, ids: list[int])
tests/util/test_dataset.py:507
Methodtest_uint64_missing_ids_do_not_wrap_or_round
(self, missing_id: int)
tests/util/test_dataset.py:519
Functiontest_unchanged_ranking
(num_positives: int, documents: list[str])
tests/cross_encoder/evaluation/test_reranking.py:167
Functiontest_uneven_positives_match_expected_rows
( queries: list[str], passages: list[str], static_retrieval_mrl_en_v1_model: SentenceTransformer,
tests/util/test_hard_negatives.py:1086
Methodtest_unknown_explicit_id_col
(self, queries: Dataset)
tests/util/test_dataset.py:273
Methodtest_unknown_explicit_value_col
(self, queries: Dataset)
tests/util/test_dataset.py:277
Functiontest_unknown_target_and_global_disabling
(loader, monkeypatch, embeddings)
tests/test_kernels.py:931
Methodtest_unmapped_columns_dropped_and_default_labels_kept
(self, queries: Dataset, documents: Dataset)
tests/util/test_dataset.py:185
Functiontest_unmet_requirements_raise_when_loading
(stsb_bert_tiny_model: SentenceTransformer, tmp_path: Path)
tests/base/test_model.py:1988
Methodtest_unpad_inputs_false_forces_padding
Setting unpad_inputs=False should disable flattening regardless of prerequisites.
tests/base/modules/test_transformer.py:2270
Methodtest_unpad_inputs_none_auto_detects
Setting unpad_inputs=None (default) should auto-detect.
tests/base/modules/test_transformer.py:2283
Methodtest_unpad_inputs_omitted_from_config_when_inferred
Inferred unpad_inputs (None) should not appear in the saved config JSON.
tests/base/modules/test_transformer.py:1937
Methodtest_unpad_inputs_save_load_roundtrip
Explicitly set unpad_inputs should appear in the saved config and survive a roundtrip.
tests/base/modules/test_transformer.py:1948
Methodtest_unpad_inputs_setter_re_evaluates
Setting unpad_inputs after init should re-evaluate can_flatten_inputs.
tests/base/modules/test_transformer.py:2290
Methodtest_unpad_inputs_true_warns_when_prerequisites_not_met
Setting unpad_inputs=True should warn if prerequisites are not met.
tests/base/modules/test_transformer.py:2276
Methodtest_unrecognized_modality_key_raises_without_metadata_hint
(self)
tests/base/test_modality.py:235
Methodtest_unrecognized_modality_keys_of_mixed_types_still_raise_valueerror
(self)
tests/base/test_modality.py:245
Methodtest_unset_never_reaches_legacy_preprocess_fns
(self)
tests/base/test_data_collator.py:220
Methodtest_unsourced_decoder_is_not_hashable
(self)
tests/base/test_model_card.py:1153
Methodtest_unsupported_message_modality
Should raise ValueError when 'message' modality is not in modality_config.
tests/base/modules/test_transformer.py:1302
Functiontest_unsupported_modality
(static_embedding: StaticEmbedding)
tests/sentence_transformer/modules/test_static_embedding.py:189
Methodtest_unsupported_modality_error
Passing an unsupported modality should raise ValueError.
tests/base/modules/test_transformer.py:559
Methodtest_unsupported_modules_and_backends
(self)
tests/cross_encoder/test_model.py:1402
Methodtest_unsupported_type_raises
(self)
tests/base/test_modality.py:291
Functiontest_untied_weights_are_independent
Without tying, the encoder and decoder keep independent storage.
tests/sentence_transformer/losses/test_denoising_auto_encoder.py:67
Methodtest_url_with_encoded_spaces_still_detected
URLs with %20 (encoded spaces) are valid and should still be detected.
tests/base/test_modality.py:341
Methodtest_url_with_spaces_not_image
(self)
tests/base/test_modality.py:59
Methodtest_url_without_image_extension
(self)
tests/base/test_modality.py:42
Functiontest_use_auth_token_and_token_raises
Passing both token and use_auth_token should raise ValueError.
tests/base/test_model.py:425
Functiontest_use_auth_token_warns
Passing use_auth_token should emit a FutureWarning.
tests/base/test_model.py:414
Methodtest_use_cache_default_and_override
(self, use_cache)
tests/base/modules/test_transformer.py:111
Functiontest_use_faiss_on_cpu_is_not_capped
FAISS on CPU has no 2048-document limit, so the same arguments must mine instead of raising.
tests/util/test_hard_negatives.py:1443
Functiontest_user_constructed_model_with_prefix_prompts_round_trips
()
tests/multi_vector_encoder/test_model.py:1260
Methodtest_uses_multi_vector_encoder_class_name
(self)
tests/multi_vector_encoder/test_model_card.py:47
Methodtest_uses_multi_vector_encoder_class_name
(self)
tests/multi_vector_encoder/test_model_card.py:139
Functiontest_valid_initialization_no_warnings
Test that valid initialization with model dimension included produces no warnings.
tests/sentence_transformer/losses/test_matryoshka.py:139
Functiontest_valid_initialization_with_weights
Test that valid initialization with custom weights works correctly.
tests/sentence_transformer/losses/test_matryoshka.py:150
Methodtest_valid_modality_config
(self)
tests/base/modules/test_transformer.py:514
Functiontest_validation_errors
Invalid samples raise clear errors.
tests/cross_encoder/evaluation/test_reranking.py:97
Functiontest_validation_uses_untruncated_dimension
(mve_bert_tiny_model, caplog)
tests/multi_vector_encoder/losses/test_matryoshka.py:225
Methodtest_variable_width_string_ids
(self)
tests/util/test_dataset.py:457
Functiontest_verbose_mode
Test that verbose=True prints statistics.
tests/util/test_hard_negatives.py:1671
Methodtest_video_collection_metadata_matches_each_content_item
(self, container, wrapped_frames)
tests/base/test_modality.py:676
Methodtest_video_column_detected
A model supporting 'video' modality picks VideoDecoder examples from Video columns.
tests/base/test_model_card.py:1438
Methodtest_video_decoder_column_stats
VideoDecoder columns produce duration/resolution/fps stats.
tests/base/test_model_card.py:1457
Methodtest_video_decoder_converted
(self)
tests/base/test_model_card.py:1221
Methodtest_video_decoder_duplicate_deduplicated
Identical VideoDecoders (same metadata hash) are saved only once.
tests/base/test_model_card.py:1298
Methodtest_video_decoder_placeholder
(self)
tests/base/test_model_card.py:1249
Methodtest_video_decoder_preserves_extension
Source file extension is preserved (e.g. .webm).
tests/base/test_model_card.py:1282
Methodtest_video_decoder_with_source_path
VideoDecoder with a real source file copies it to assets/.
tests/base/test_model_card.py:1262
Methodtest_video_decoder_without_source_path_decoded_and_saved
VideoDecoder with path=None falls back to decode → VideoDict → av encoding.
tests/base/test_model_card.py:1476
Methodtest_video_dict
(self)
tests/base/test_model_card.py:177
Methodtest_video_dict_placeholder
(self)
tests/base/test_model_card.py:269
Methodtest_video_dict_saved_as_mp4
VideoDict saved to assets/ as .mp4 file.
tests/base/test_model_card.py:394
Methodtest_video_dict_unwraps_array_and_collects_metadata
(self)
tests/base/test_modality.py:610
Methodtest_video_frame_detection_checks_every_item
(self, container)
tests/base/test_modality.py:1006
Methodtest_video_frames_stay_one_content_item
(self, container, frame_type, paired, tmp_path)
tests/base/test_modality.py:977
Methodtest_video_https_url
(self)
tests/base/test_modality.py:154
Methodtest_video_metadata_filled_for_frame_list_video
(self, wrapped_frames)
tests/base/test_modality.py:640
Methodtest_video_metadata_key_dropped_when_no_sample_carries_it
(self)
tests/base/test_modality.py:668
Methodtest_video_metadata_stays_aligned_when_mixing_wrapped_and_raw
A raw video before a dict-wrapped one must not shift the metadata onto the wrong video. https://github.com/huggingface/sentence-transformers/
tests/base/test_modality.py:620
Methodtest_video_metadata_with_metadata_less_path_raises
(self)
tests/base/test_modality.py:710
Methodtest_video_ndarray_inputs
(self)
tests/base/test_modality.py:594
Methodtest_video_url_detected_when_supported
(self)
tests/base/test_modality.py:311
Methodtest_video_url_falls_back_to_text_when_unsupported
(self)
tests/base/test_modality.py:302
Methodtest_video_url_in_text_batch_becomes_message_when_supported
A batch of texts with one video URL should become 'message' if video is supported.
tests/base/test_modality.py:385
Methodtest_video_url_in_text_batch_stays_text_when_unsupported
A batch of texts with one video URL should remain 'text' if video is not supported.
tests/base/test_modality.py:380
Methodtest_video_url_with_spaces_not_video
(self)
tests/base/test_modality.py:95
Methodtest_videos
(self)
tests/base/modules/test_transformer.py:2408
Methodtest_vision_encoder_cache
(self, config_kwargs, vision_cache, text_cache)
tests/base/modules/test_transformer.py:372
Functiontest_ward_batched_shapes_and_gradients
(loader, provider)
tests/test_kernels.py:412
Functiontest_ward_default_provider_is_opt_in
(loader, options)
tests/test_kernels.py:499
Functiontest_ward_inherits_model_default_kernels
(loader, path, model_enabled, pooler_enabled)
tests/test_kernels.py:605
Functiontest_ward_model_inheritance_and_pooler_overrides
(loader, path, selection)
tests/test_kernels.py:514
Functiontest_ward_model_settings_configure_existing_pooler_once
(loader, monkeypatch, path)
tests/test_kernels.py:630
Functiontest_ward_pooling_controls_keep_reference_behavior
(loader, monkeypatch, pooling_options)
tests/test_kernels.py:440
Functiontest_ward_round_trip_and_runtime_only_config
(loader, tmp_path, round_trip)
tests/test_kernels.py:471
Functiontest_warmup_arguments_are_compatible_across_transformers_versions
Check that warmup_steps / warmup_ratio end up in the expected field. We parametrize over different user inputs and branch expectations based on t
tests/sentence_transformer/test_training_args.py:129
Methodtest_warn_on_unsupported_attention_config
( self, caplog, monkeypatch, param, value, support_flag,
tests/base/modules/test_transformer.py:404
Functiontest_warns_about_non_persistent_spawned_dataloader_workers
The warning must not depend on whether the start method was set explicitly or is the platform default, so both routes through ``_workers_are_spawn
tests/sentence_transformer/test_training_args.py:190
Methodtest_warns_on_id_like_columns
(self, caplog)
tests/base/test_data_collator.py:169
Methodtest_warns_on_wrong_order
(self, caplog)
tests/base/test_data_collator.py:142
Methodtest_warns_only_once_per_column_set
(self, caplog)
tests/base/test_data_collator.py:149
Functiontest_weightedmean_empty_sequence
()
tests/sentence_transformer/modules/test_pooling.py:590
Functiontest_weightedmean_missing_or_mismatched_mask
(attention_mask: torch.Tensor | None)
tests/sentence_transformer/modules/test_pooling.py:581
Functiontest_weightedmean_padding_invariance
(padding_side: str, include_prompt: bool, device: str)
tests/sentence_transformer/modules/test_pooling.py:552
Functiontest_weights_length_mismatch_raises
()
tests/multi_vector_encoder/losses/test_token_pooling.py:340
Functiontest_weights_length_mismatch_raises
()
tests/multi_vector_encoder/losses/test_matryoshka.py:165
Functiontest_weights_length_mismatch_raises_error
Test that length mismatch between weights and dims raises ValueError.
tests/sentence_transformer/losses/test_matryoshka.py:69
Methodtest_widget_examples_all_empty
(self)
tests/base/test_model_card.py:154
Methodtest_widget_examples_prefer_shortest_rows
(self)
tests/base/test_model_card.py:120
← previousnext →4,401–4,500 of 4,575, ranked by callers