Skip to content

[Docs] Inconsistent docstrings, missing arguments, and typos in models/ #2579

@AlejandroPG06

Description

@AlejandroPG06

Description

I noticed several inconsistencies in the documentation within the keras_hub/src/models/ directory. These include arguments present in __init__ methods but missing from the corresponding class docstrings, errors in code examples, and various typographical errors spread across multiple model files.

Summary of issues identified

Missing arguments in docstrings

  • MistralBackbone: The dropout argument is missing from the Args section.
  • FluxBackbone: Five arguments are missing from the Args section:
    • image_shape
    • text_shape
    • image_ids_shape
    • text_ids_shape
    • y_shape

Code examples

  • PaliGemmaBackbone: The usage example contains a typo (images_size instead of image_size), which causes the example to fail if executed.

Typos & grammar

  • roatary instead of rotary (GPT-OSS, Llama3, Mixtral).
  • traingular instead of triangular (Mixtral).
  • Polling instead of Pooling in error messages (HGNetV2, VGG, ImageClassifier).
  • done a float32 instead of done in float32 (PaliGemma, CLIP, SigLIP, DinoV2/DinoV3, etc.).
  • value user for instead of value used for (Gemma, Gemma3).
  • fucntion instead of function.

I have fixed these docstrings locally to match the actual code definitions and prepared a pull request to address all these instances.

Metadata

Metadata

Assignees

Labels

GemmaGemma model specific issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions