Shortcuts

ts.torch_handler.unit_tests.test_utils package

Submodules

ts.torch_handler.unit_tests.test_utils.mock_context module

Mocks for adding model context without loading all of Torchserve

class ts.torch_handler.unit_tests.test_utils.mock_context.MockContext(model_pt_file='model.pt', model_dir='ts/torch_handler/unit_tests/models/tmp', model_file='model.py', gpu_id='0', model_name='mnist', model_yaml_config_file=None)[source]

Bases: object

Mock class to replicate the context passed into model initialize

get_request_header(idx, exp)[source]

Module contents

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources