Test Model Bundle

To test that the model runs correctly, and to confirm the annotation format, users can pass in the model and load_predict_fn objects to a test function.

The test function used will vary based on what types of predictions are being returned. The API docs contain all of the supported types in test_launch_integration.py, but for this guide box annotations will be used since the example model is in that format.

This code can be run both in a Python shell and in a Jupyter notebook.

from nucleus import test_launch_integration

test_launch_integration.visualize_box_launch_bundle(img_url, load_predict_fn, model=model, load_model_fn=None, show_image=True)

In a Jupyter notebook, show_image can be set to True or False, but outside that context, it must be set to True to see the return image.