Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Copyright (c) 2020 Xiaozhe Yao & AICAMP.CO.,LTD
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
from mlpm.solver import Solver
from mlpm.metrics import Metrics
from mlpm.server import aidserver
class ExampleSolver(Solver):
def __init__(self,toml_file=None):
super().__init__(toml_file)
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