Skip to content

Commit

Permalink
Fix MultiAEMessage constructor (#780)
Browse files Browse the repository at this point in the history
- Set default values in MultiAEMessage constructor
- Fix keyword constructor arg in DFPTraining

Fixes #779

Authors:
  - Eli Fajardo (https://github.com/efajardo-nv)
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: #780
  • Loading branch information
efajardo-nv authored Mar 20, 2023
1 parent 5bae77f commit 7ea4d49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def on_data(self, message: MultiDFPMessage):
model.fit(train_df, epochs=self._epochs, val=validation_df, run_validation=run_validation)
logger.debug("Training AE model for user: '%s'... Complete.", user_id)

output_message = MultiAEMessage(message.meta,
output_message = MultiAEMessage(meta=message.meta,
mess_offset=message.mess_offset,
mess_count=message.mess_count,
model=model)
Expand Down
9 changes: 4 additions & 5 deletions morpheus/messages/multi_ae_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@ class MultiAEMessage(MultiMessage):
"""

model: AutoEncoder
# train_loss_scores: cp.ndarray
train_scores_mean: float = 0.0
train_scores_std: float = 1.0
train_scores_mean: float
train_scores_std: float

def __init__(self,
*,
meta: MessageMeta,
mess_offset: int = 0,
mess_count: int = -1,
model: AutoEncoder,
train_scores_mean: float,
train_scores_std: float):
train_scores_mean: float = 0.0,
train_scores_std: float = 1.0):
super().__init__(meta=meta, mess_offset=mess_offset, mess_count=mess_count)

self.model = model
Expand Down

0 comments on commit 7ea4d49

Please sign in to comment.