Preview:
# it should be ground truth instead of None
test_result = None

def test_process_sample_some_model_name():
    # initialize model
    model = InferenceModel()
    # load model weigths
    model.model_load()
    # process test sample
    ret = model.process_sample(test_image)
    # convert pydantic objects into dict
    ret = [pydantic.json.pydantic_encoder(item) for item in ret]
    # equal prediction with ground truth
    assert is_equal(ret, test_result)
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter