Skip to content

Commit

Permalink
add ut (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
duanbing authored Mar 19, 2021
1 parent 633f6b6 commit 8826853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fedlearner/data_join/joiner_impl/stream_joiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, example_joiner_options, raw_data_options,
example_joiner_options.enable_negative_example_generator
if self._enable_negative_example_generator:
sf = example_joiner_options.negative_sampling_rate
fe = example_joiner_options.exampling_filter_expr
fe = example_joiner_options.negative_sampling_filter_expr
self._negative_example_generator = NegativeExampleGenerator(sf, fe)
self._reset_joiner_state(True)

Expand Down
4 changes: 3 additions & 1 deletion test/data_join/test_example_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def setUp(self):
min_matching_window=32,
max_matching_window=128,
data_block_dump_interval=30,
data_block_dump_threshold=128
data_block_dump_threshold=128,
enable_negative_example_generator=True,
negative_sampling_rate=0.8
)
if gfile.Exists(self.data_source.output_base_dir):
gfile.DeleteRecursively(self.data_source.output_base_dir)
Expand Down

0 comments on commit 8826853

Please sign in to comment.