def test_transform_serde(): transform = skil.Transform('iris_tp.json', 'baz') transform.save('transform.json') recov = skil.Transform.load('transform.json') assert recov.get_config() == transform.get_config()
def test_transform_by_id(): ws = _get_ws() exp = skil.Experiment(ws, name='test_transform') transform = skil.Transform('iris_tp.json') transform_id = transform.id tf_2 = skil.get_transform_by_id(transform_id, "CSV", exp) assert tf_2.name == transform.name
def test_transform_creation_2(): sk = skil.Skil() work_space = skil.WorkSpace(sk) exp = skil.Experiment(work_space) transform = skil.Transform('iris_tp.json', experiment=exp) transform.add_evaluation(0.42) work_space.delete() exp.delete() transform.delete()
def test_transform_service_creation(): ws = _get_ws() exp = skil.Experiment(ws) model = skil.Transform('iris_tp.json', experiment=exp) dep = skil.Deployment(ws.skil) model.deploy(dep)
def test_transform_creation_2(): ws = _get_ws() exp = skil.Experiment(ws) model = skil.Transform('iris_tp.json', experiment=exp)
def test_transform_creation_1(): model = skil.Transform('iris_tp.json')
import skil import numpy as np skil_server = skil.Skil() work_space = skil.WorkSpace(skil_server) experiment = skil.Experiment(work_space) transform = skil.Transform(transform='iris_tp.json', experiment=experiment) model = skil.Model(model='iris_model.h5', experiment=experiment) deployment = skil.Deployment(skil_server) pipeline = skil.Pipeline(deployment, model, transform) with open('iris.data', 'r') as f: data = np.array(f.readlines()) print(pipeline.predict(data))
def test_transform_creation_1(): transform = skil.Transform('iris_tp.json') transform.delete()
def test_transform_deletion(): transform = skil.Transform('iris_tp.json') transform.delete()