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 (NVIDIA#11041)

Signed-off-by: Guyue Huang <[email protected]>
Co-authored-by: Guyue Huang <[email protected]>
  • Loading branch information
2 people authored and XuesongYang committed Jan 18, 2025
1 parent a89e0e8 commit dab3116
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 dab3116

Please sign in to comment.