Skip to content

Commit

Permalink
[Bug fix] use default_factory to provide default value in dataclasses…
Browse files Browse the repository at this point in the history
… in energon MultiModalSampleConfig (#11041)

Signed-off-by: Guyue Huang <[email protected]>
Co-authored-by: Guyue Huang <[email protected]>
  • Loading branch information
guyueh1 and Guyue Huang authored Oct 28, 2024
1 parent f27a982 commit 869625e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/collections/multimodal/data/energon/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class LLaVATemplateConfig(BaseConversationTemplateConfig):

@dataclass
class MultiModalSampleConfig:
image_token: ImageToken = ImageToken()
image_token: ImageToken = field(default_factory=ImageToken)
ignore_place_holder: int = -100
conversation_template_config: LLaVATemplateConfig = LLaVATemplateConfig()
conversation_template_config: LLaVATemplateConfig = field(default_factory=LLaVATemplateConfig)
image_following_text: bool = True

0 comments on commit 869625e

Please sign in to comment.