Skip to content

Commit

Permalink
Fixed options dublicate in documentation for EmbeddingInitializerField (
Browse files Browse the repository at this point in the history
#4022)

Co-authored-by: m.habedank <[email protected]>
  • Loading branch information
mhabedank and m.habedank authored Aug 6, 2024
1 parent 341a8bc commit d386fa5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ludwig/schema/common_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,13 @@ def WeightsInitializerField(
def EmbeddingInitializerField(
default: Optional[str] = None, description: str = None, parameter_metadata: ParameterMetadata = None
) -> Field:
initializers_str = ", ".join([f"`{i}`" for i in initializer_registry.keys()])
description = description or "Initializer for the embedding matrix."
full_description = f"{description} Options: {initializers_str}."
parameter_metadata = parameter_metadata or COMMON_METADATA["embedding_initializer"]
return schema_utils.StringOptions(
list(initializer_registry.keys()),
default=default,
allow_none=True,
description=full_description,
description=description,
parameter_metadata=parameter_metadata,
)

Expand Down

0 comments on commit d386fa5

Please sign in to comment.