Search in sources :

Example 11 with ModelDTO

use of io.hops.hopsworks.api.modelregistry.models.dto.ModelDTO in project hopsworks by logicalclocks.

the class ModelsController method delete.

public void delete(Users user, Project project, ProvStateDTO fileState) throws DatasetException, ModelRegistryException {
    JSONObject summary = new JSONObject(fileState.getXattrs().get(MODEL_SUMMARY_XATTR_NAME));
    ModelDTO modelSummary = modelConverter.unmarshalDescription(summary.toString());
    String modelPath = Utils.getProjectPath(project.getName()) + Settings.HOPS_MODELS_DATASET + "/" + modelSummary.getName() + "/" + modelSummary.getVersion();
    deleteInternal(user, project, modelPath);
}
Also used : ModelDTO(io.hops.hopsworks.api.modelregistry.models.dto.ModelDTO) JSONObject(org.json.JSONObject)

Aggregations

ModelDTO (io.hops.hopsworks.api.modelregistry.models.dto.ModelDTO)11 AllowedProjectRoles (io.hops.hopsworks.api.filter.AllowedProjectRoles)8 ApiKeyRequired (io.hops.hopsworks.api.filter.apiKey.ApiKeyRequired)8 ProvStateDTO (io.hops.hopsworks.common.provenance.state.dto.ProvStateDTO)8 JWTRequired (io.hops.hopsworks.jwt.annotation.JWTRequired)8 Users (io.hops.hopsworks.persistence.entity.user.Users)8 ApiOperation (io.swagger.annotations.ApiOperation)8 Produces (javax.ws.rs.Produces)8 ResourceRequest (io.hops.hopsworks.common.api.ResourceRequest)7 Path (javax.ws.rs.Path)7 TagsDTO (io.hops.hopsworks.common.tags.TagsDTO)4 GET (javax.ws.rs.GET)4 AttachTagResult (io.hops.hopsworks.common.tags.AttachTagResult)2 ModelRegistryException (io.hops.hopsworks.exceptions.ModelRegistryException)2 HashMap (java.util.HashMap)2 Consumes (javax.ws.rs.Consumes)2 DELETE (javax.ws.rs.DELETE)2 PUT (javax.ws.rs.PUT)2 UriBuilder (javax.ws.rs.core.UriBuilder)2 InodeDTO (io.hops.hopsworks.api.dataset.inode.InodeDTO)1