Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal update. #32

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spade_anomaly_detection/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def instantiate_and_fit_ensemble(
logging.info('Batch size for OCC ensemble: %s', batch_size)

if self.data_format == DataFormat.BIGQUERY:
logging.info('Loading training data from BigQuery.')
logging.info('Loading GMM training data from BigQuery.')
self.input_data_loader = cast(
data_loader.DataLoader, self.input_data_loader
)
Expand All @@ -310,7 +310,7 @@ def instantiate_and_fit_ensemble(
],
)
else:
logging.info('Loading training data from CSV.')
logging.info('Loading GMM training data from CSV.')
self.input_data_loader = cast(
csv_data_loader.CsvDataLoader, self.input_data_loader
)
Expand Down Expand Up @@ -348,7 +348,7 @@ def write_verbose_logs(
weights: Weights corresponding to pseudo labels - this is the alpha
parameter.
"""
updated_label_counts = pd.DataFrame(labels).value_counts()
updated_label_counts = pd.DataFrame(labels).value_counts().reset_index()
logging.info('Updated label counts %s', updated_label_counts)

if self.test_x is not None and self.test_y is not None:
Expand Down
3 changes: 2 additions & 1 deletion spade_anomaly_detection/runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def test_verbose_logging_no_error(self):
)
with self.subTest(name='LabelCountLogs'):
self._assert_regex_in(
training_logs.output, r'Updated label counts 0 90\n1 10\n'
training_logs.output,
r'Updated label counts 0 count\n0 0 90\n1 1 10',
)
with self.subTest(name='TrainFeatureShapeLogs'):
self._assert_regex_in(
Expand Down
Loading