Substra/substra-tools

Add documentation on how to test manually algo / opener scripts

Closed this issue · 0 comments

This is an alternative to the run-local command.

Example of python sripts to test an algo/opener:

import tensorflow as tf
import algo.algo as algo
import dataset.opener as opener
o = opener.Opener()
X = o.get_X(["dataset/train/train1"])
y = o.get_y(["dataset/train/train1"])
a = algo.ModelComp(local_folder='./sandbox/local/')
pred, model = a.train(X, y, None, None, 0)