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

Properly calculate the offset of the column_view & apply offsets in copy_meta_ranges #423

Merged
19 commits merged into from
Oct 31, 2022
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Add add-scores test
  • Loading branch information
dagardner-nv committed Oct 29, 2022
commit 6cc99ab0b798b4bc841fa9d2277ba803fe806777
6 changes: 6 additions & 0 deletions tests/test_abp.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
from morpheus.stages.input.file_source_stage import FileSourceStage
from morpheus.stages.output.write_to_file_stage import WriteToFileStage
from morpheus.stages.postprocess.add_classifications_stage import AddClassificationsStage
from morpheus.stages.postprocess.add_scores_stage import AddScoresStage
from morpheus.stages.postprocess.serialize_stage import SerializeStage
from morpheus.stages.postprocess.validation_stage import ValidationStage
from morpheus.stages.preprocess.deserialize_stage import DeserializeStage
from morpheus.stages.preprocess.preprocess_fil_stage import PreprocessFILStage
from utils import TEST_DIRS
from utils import calc_error_val
from utils import compare_class_to_scores

# End-to-end test intended to imitate the ABP validation test
FEATURE_LENGTH = 29
Expand Down Expand Up @@ -102,12 +104,14 @@ def async_infer(callback=None, **k):
TritonInferenceStage(config, model_name='abp-nvsmi-xgb', server_url='test:0000', force_convert_inputs=True))
pipe.add_stage(MonitorStage(config, description="Inference Rate", smoothing=0.001, unit="inf"))
pipe.add_stage(AddClassificationsStage(config))
pipe.add_stage(AddScoresStage(config, prefix="score_"))
pipe.add_stage(
ValidationStage(config, val_file_name=val_file_name, results_file_name=results_file_name, rel_tol=0.05))
pipe.add_stage(SerializeStage(config))
pipe.add_stage(WriteToFileStage(config, filename=out_file, overwrite=False))

pipe.run()
compare_class_to_scores(out_file, config.class_labels, '', 'score_', threshold=0.5)
results = calc_error_val(results_file_name)
assert results.diff_rows == 0

Expand Down Expand Up @@ -145,12 +149,14 @@ def test_abp_cpp(config, tmp_path):
force_convert_inputs=True))
pipe.add_stage(MonitorStage(config, description="Inference Rate", smoothing=0.001, unit="inf"))
pipe.add_stage(AddClassificationsStage(config))
pipe.add_stage(AddScoresStage(config, prefix="score_"))
pipe.add_stage(
ValidationStage(config, val_file_name=val_file_name, results_file_name=results_file_name, rel_tol=0.05))
pipe.add_stage(SerializeStage(config))
pipe.add_stage(WriteToFileStage(config, filename=out_file, overwrite=False))

pipe.run()
compare_class_to_scores(out_file, config.class_labels, '', 'score_', threshold=0.5)
results = calc_error_val(results_file_name)
assert results.diff_rows == 0

Expand Down