substra / substra-tools Goto Github PK
View Code? Open in Web Editor NEWPython wrappers to interact with a Substra backend
Home Page: https://docs.substra.org
License: Apache License 2.0
Python wrappers to interact with a Substra backend
Home Page: https://docs.substra.org
License: Apache License 2.0
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)
This would avoid telling our users to use an hardcoded path.
We could use a generator to load them when needed, it will be needed to avoid running out of memory.
To be updated:
In function.py we have 2 different execute
functions, and it's really difficult when calling for instance function.execute([
to know which one is used, we have to track the function
object type.
I propose to rename one of them, like execute_function
for the one in wrapper or execute_cli
for the one running the cli
Don't make it backward compatible: it will complexify the code.
We could define a few serializers in substra-tools to avoid users writing their own.
We could create numpy; json and pickle serializers to start with.
Proposition of API:
class MyAglo(tools.Algo):
model_serializer = tools.serializers.NUMPY
def train():
...
Note: we should not break the existing API; we should still be able to define manually the load and save methods.
As substratools is now open source we don't need to build and provide docker images.
End users could directly install subtratools through pip and don't need to create a Dockerfile inheriting from substratools.
It will allow them to choose the base image.
One of the issue is that currently substra-backend relies on the fact that the working directory inside the container is /sandbox
(hardcoded value).
That's the reason why to get rid of the substratools, we must first ensure that:
We will then be able to update all the Dockerfile and stop inheriting from substratools images.
EDIT:
One of the issue is that currently substra-backend relies on the fact that the working directory inside the container is /sandbox
(hardcoded value).
Tasks to be done:
Substratools should follow the same rules as the substra package: release on pypi when creating git tags.
The description of the package substratools is not fetched from the setup.py
file whereas it is working for the substra package. On both projects, the uploader had a travis token added before.
Any idea why this is happening?
It would be great to have description='Python tools to submit algo on the Substra platform'
displayed to the world!
This would allow us to check that the version has been correctly incremented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.