How to use the mlpm.server.aidserver.solver function in mlpm

To help you get started, we’ve selected a few mlpm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github autoai-org / AID / components / mlserve / runner_example.py View on Github external
self.predictor = ''
        self.acc = Metrics()

    def infer(self, data):
        print(data)
        return {'data': [0, 1, 2, 3]}

    def train(self, data):
        epochs = int(data['epochs'])
        for i in range(epochs):
            print(i)
        print(data)
        return data

solver = ExampleSolver()
aidserver.solver = solver