Skip to content

Commit

Permalink
Related to #240. Fixed bug: using yield instead of return operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Jan 1, 2022
1 parent 373ee7a commit 834be2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arekit/contrib/networks/core/ctx_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ def __read_for_data_type(samples_view, is_external_vocab,
pos_tags=row.PartOfSpeechTags))

rows_it = samples_view.iter_rows(
handle_rows=lambda row: InferenceContext.__parse_row(row))
handle_rows=lambda row: InferenceContext.__extract_labeled_rows(row))

labeled_sample_row_ids = list(rows_it)

return bags_collection, labeled_sample_row_ids

@staticmethod
def __parse_row(row):
def __extract_labeled_rows(row):
parsed_row = ParsedSampleRow(row)
yield parsed_row.SampleID, parsed_row.UintLabel
return parsed_row.SampleID, parsed_row.UintLabel

# endregion

0 comments on commit 834be2d

Please sign in to comment.