scaleoutsystems / stackn

A minimalistic and pluggable machine learning platform for Kubernetes.
http://www.scaleoutsystems.com
Apache License 2.0
35 stars 13 forks source link

Model delete #31

Closed ahellander closed 4 years ago

ahellander commented 4 years ago

Is your enhancement request related to a problem? Please describe. Currently it is not possible to delete models from the CLI/API since the Django API does not expose the method, see screenshot. Skärmavbild 2020-03-31 kl  12 00 26

Describe the solution you'd like It should be possible to delete models. But we need to discuss permissions and access control for incdividual models. Some models should be read-only, for example seed models for FedML

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

dstoyanova commented 4 years ago

@ahellander

It seems like the problem was caused by an authentication/authorization issue and after introducing the token authentication, the problem is resolved. An example code for removing a model could be:

import requests
headers = {"Content-Type": "application/json", "Authorization": "Token  c7743921e23b3df63f97860e264c8deb8597a082"}
url = "http://34.231.147.144.nip.io/api/models/2/"
r = requests.delete(url, headers=headers)
r.text

which will return 'ok' and remove the object from the db.