Skip to content

Commit

Permalink
feat(thematos/models): Add TrainSummaryConfig in config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Aug 13, 2023
1 parent ef40b3f commit bfe7517
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/thematos/models/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List, Optional, Tuple
import sys
from typing import Any, List, Optional, Tuple

from hyfi.composer import BaseModel
from hyfi.composer import BaseModel, Field

from thematos.plots import WordCloud

Expand Down Expand Up @@ -29,6 +30,22 @@ class TrainConfig(BaseModel):
iterations: int = 100


class TrainSummaryConfig(BaseModel):
_config_group_ = "/model/summary"
_config_name_ = "topic_train"

initial_hp: bool = Field(
True, description="whether to show the initial parameters at model creation"
)
params: bool = Field(
True, description="whether to show the current parameters of the model"
)
topic_word_top_n: int = Field(
10, description="the number of words by topic to display"
)
flush: bool = Field(False, description="whether to forcibly flush the stream")


class WordcloudConfig(BaseModel):
_config_group_ = "/model/plot"
_config_name_ = "wordcloud"
Expand Down

0 comments on commit bfe7517

Please sign in to comment.