Skip to content

Commit

Permalink
remove modelDB
Browse files Browse the repository at this point in the history
Signed-off-by: YujiOshima <yuji.oshima0x3fd@gmail.com>
  • Loading branch information
YujiOshima committed Oct 17, 2018
1 parent f56ae70 commit 9e24cce
Show file tree
Hide file tree
Showing 70 changed files with 26 additions and 37,646 deletions.
35 changes: 26 additions & 9 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,31 +238,48 @@ func (s *server) GetEarlyStoppingParameterList(ctx context.Context, in *pb.GetEa
}

func (s *server) SaveStudy(ctx context.Context, in *pb.SaveStudyRequest) (*pb.SaveStudyReply, error) {
err := s.msIf.SaveStudy(in)
var err error
if s.msIf != nil {
err = s.msIf.SaveStudy(in)
}
return &pb.SaveStudyReply{}, err
}

func (s *server) SaveModel(ctx context.Context, in *pb.SaveModelRequest) (*pb.SaveModelReply, error) {
err := s.msIf.SaveModel(in)
if err != nil {
log.Printf("Save Model failed %v", err)
return &pb.SaveModelReply{}, err
if s.msIf != nil {
err := s.msIf.SaveModel(in)
if err != nil {
log.Printf("Save Model failed %v", err)
return &pb.SaveModelReply{}, err
}
}
return &pb.SaveModelReply{}, nil
}

func (s *server) GetSavedStudies(ctx context.Context, in *pb.GetSavedStudiesRequest) (*pb.GetSavedStudiesReply, error) {
ret, err := s.msIf.GetSavedStudies()
ret := []*pb.StudyOverview{}
var err error
if s.msIf != nil {
ret, err = s.msIf.GetSavedStudies()
}
return &pb.GetSavedStudiesReply{Studies: ret}, err
}

func (s *server) GetSavedModels(ctx context.Context, in *pb.GetSavedModelsRequest) (*pb.GetSavedModelsReply, error) {
ret, err := s.msIf.GetSavedModels(in)
ret := []*pb.ModelInfo{}
var err error
if s.msIf != nil {
ret, err = s.msIf.GetSavedModels(in)
}
return &pb.GetSavedModelsReply{Models: ret}, err
}

func (s *server) GetSavedModel(ctx context.Context, in *pb.GetSavedModelRequest) (*pb.GetSavedModelReply, error) {
ret, err := s.msIf.GetSavedModel(in)
var ret *pb.ModelInfo = nil
var err error
if s.msIf != nil {
ret, err = s.msIf.GetSavedModel(in)
}
return &pb.GetSavedModelReply{Model: ret}, err
}

Expand All @@ -278,7 +295,7 @@ func main() {
size := 1<<31 - 1
log.Printf("Start Katib manager: %s", port)
s := grpc.NewServer(grpc.MaxRecvMsgSize(size), grpc.MaxSendMsgSize(size))
pb.RegisterManagerServer(s, &server{msIf: modelstore.NewModelDB("modeldb-backend", "6543")})
pb.RegisterManagerServer(s, &server{})
reflection.Register(s)
if err = s.Serve(listener); err != nil {
log.Fatalf("Failed to serve: %v", err)
Expand Down
14 changes: 0 additions & 14 deletions modeldb/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions modeldb/frontend/README.md

This file was deleted.

62 changes: 0 additions & 62 deletions modeldb/frontend/app.js

This file was deleted.

22 changes: 0 additions & 22 deletions modeldb/frontend/package.json

This file was deleted.

Loading

0 comments on commit 9e24cce

Please sign in to comment.