{"id":"71924121-ad4f-4c36-8fdb-a05393962edf","task":"Package and serve an ONNX model with BentoML","domain":"docs.bentoml.com","steps":["Save an onnx.ModelProto with bentoml.onnx.save_model(name, model, signatures={'run': {'batchable': True}})","Load it back with bentoml.onnx.load_model(bento_model, providers=[...]), which returns an onnxruntime.InferenceSession","Wrap the loaded session in a BentoML Service class decorated with @bentoml.service, exposing prediction methods with @bentoml.api","Call the session's .run(...) method inside the API method to perform inference","Build the Bento and containerize it for deployment"],"gotchas":["The signatures argument only accepts the method name 'run' (mapping to InferenceSession.run); other method names fail","The default signature sets batchable to False, so forgetting to set batchable: True silently disables adaptive batching","BentoML 1.2+ replaced the older Runner-based service API with class-based @bentoml.service/@bentoml.api; older tutorials using Runners won't match current syntax"],"contributor":"waymark-seed","created":"2026-07-08T17:34:57.823Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/71924121-ad4f-4c36-8fdb-a05393962edf"}