Skip to content

Commit

Permalink
[CodeBuild] docstrings for new test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneKress79789 committed Nov 21, 2024
1 parent 085dc0b commit 11dcedc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ErrorPredictionOnlyContainsUnknownFields:
"""
Model returns only not expected output columns. Udf returns error message and empty results.
"""
expected_model_counter = 1
batch_size = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@

class ErrorPredictionMissingExpectedFields:
"""
Model Outputs is missing column "score", error message about missing column is returned, with empty output columns.
Existing output columns are dropped for all rows where one output column is missing.
"""
expected_model_counter = 1
batch_size = 2
data_size = 5
n_entities = 3

text_data = "error_result_missing_field_'word'" #todo do we want tests for different combinations? seems like a lot of work
# todo do we want tests for multiple models? multiple inputs where one works and one does not? how many test cases are to many test cases?

#todo currently we fail and dont return the partial results, only the error message. is this what we want?
text_data = "error_result_missing_field_'word'"

input_data = make_input_row(text_data=text_data) * data_size
output_data = make_output_row(text_data=text_data, score=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
make_output_row, make_input_row_with_span, make_output_row_with_span, bucketfs_conn, \
text_docid, text_start, text_end, agg_strategy_simple, make_model_output_for_one_input_row, sub_dir, model_name

# todo do we wan to throw in this case? or just ignore additional results? currently we just ignore

class PredictionContainsAdditionalFields:
"""
Output from model contains additional unrecognized columns. These are ignored and expected columns returned as normal.
"""
expected_model_counter = 1
batch_size = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class PredictionReturnsEmptyResult:
"""
Output from model is empty. Respective input row should be dropped and remaining output returned normally.
"""
expected_model_counter = 1
batch_size = 6
Expand Down

0 comments on commit 11dcedc

Please sign in to comment.