def get_app(self): self.setupEnv() server = CEServer(Protocol.seldon_http, self.eventType, self.eventSource, 9000, self.replyUrl) model = DummyModel("name") server.register_model(model) return server.create_application()
args, _ = parser.parse_known_args() argdDict = vars(args).copy() if "alibi" in argdDict: extra = vars(args.alibi) else: extra = {} logging.info("Extra args: %s", extra) if __name__ == "__main__": method = AlibiDetectMethod(args.command) model: Data = None if method == AlibiDetectMethod.outlier_detector: model = AlibiDetectOutlierModel(args.model_name, args.storage_uri) elif method == AlibiDetectMethod.adversarial_detector: model = AlibiDetectAdversarialDetectionModel(args.model_name, args.storage_uri) elif method == AlibiDetectMethod.drift_detector: model = AlibiDetectConceptDriftModel(args.model_name, args.storage_uri, **extra) else: logging.error("Unknown method %s", args.command) os._exit(-1) CEServer( args.protocol, args.event_type, args.event_source, http_port=args.http_port, reply_url=args.reply_url, ).start(model)
def get_app(self): server = CEServer(Protocol.seldon_http, "a,b,c", "x.y.z") return server.create_application()