[Docs] Enable fail_on_warning for the docs build in CI (#25580)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-09-24 20:30:33 +01:00
committed by GitHub
parent f84a472a03
commit 8c853050e7
20 changed files with 81 additions and 87 deletions

View File

@@ -27,36 +27,23 @@ class RadioConfig(PretrainedConfig):
specified arguments, defining the model architecture.
Args:
model_name (`str`, *optional*, defaults to "vit_base_patch16_224"):
Name of the vision transformer model (e.g., "vit_base_patch16_224").
Used to determine architecture dimensions from
`VIT_TIMM_DIM_BY_NAME`.
image_size (`int`, *optional*, defaults to 224):
The size (resolution) of each image.
patch_size (`int`, *optional*, defaults to 16):
The size (resolution) of each patch.
qkv_bias (`bool`, *optional*, defaults to True):
Whether to add a bias to the queries, keys and values.
qk_normalization (`bool`, *optional*, defaults to False):
Whether to apply normalization to queries and keys.
norm_type (`str`, *optional*, defaults to "layer_norm"):
The normalization type to use.
layer_norm_eps (`float`, *optional*, defaults to 1e-6):
The epsilon used by the layer normalization layers.
initializer_factor (`float`, *optional*, defaults to 1.0):
A factor for initializing all weight matrices.
hidden_act (`str`, *optional*, defaults to "gelu"):
The non-linear activation function in the encoder.
max_img_size (`int`, *optional*, defaults to 2048):
Maximum image size for position embeddings.
norm_mean (`tuple` or `list`, *optional*,
defaults to (0.48145466, 0.4578275, 0.40821073)):
Mean values for image normalization (RGB channels).
norm_std (`tuple` or `list`, *optional*,
defaults to (0.26862954, 0.26130258, 0.27577711)):
Standard deviation values for image normalization (RGB channels).
reg_tokens (`int`, *optional*):
Number of register tokens to use.
model_name: Name of the vision transformer model
(e.g., "vit_base_patch16_224"). Used to determine architecture
dimensions from `VIT_TIMM_DIM_BY_NAME`.
image_size: The size (resolution) of each image.
patch_size: The size (resolution) of each patch.
qkv_bias: Whether to add a bias to the queries, keys and values.
qk_normalization: Whether to apply normalization to queries and keys.
norm_type: The normalization type to use.
layer_norm_eps: The epsilon used by the layer normalization layers.
initializer_factor: A factor for initializing all weight matrices.
hidden_act: The non-linear activation function in the encoder.
max_img_size: Maximum image size for position embeddings.
norm_mean: Mean values for image normalization (RGB channels).
Defaults to (0.48145466, 0.4578275, 0.40821073)).
norm_std: Standard deviation values for image normalization
(RGB channels). Defaults to (0.26862954, 0.26130258, 0.27577711)).
reg_tokens: Number of register tokens to use.
"""
model_type = "radio"

View File

@@ -27,7 +27,7 @@ def try_get_class_from_dynamic_module(
**kwargs,
) -> Optional[type]:
"""
As [transformers.dynamic_module_utils.get_class_from_dynamic_module][],
As `transformers.dynamic_module_utils.get_class_from_dynamic_module`,
but ignoring any errors.
"""
try: