Add flavor details to model cmds
Change-Id: Idb468ecb6875125fac7e7ecd9d037e2c9d666551
This commit is contained in:
parent
1f417ba48c
commit
dea07ad935
@ -54,6 +54,7 @@ class ModelManager(base.Manager):
|
||||
new = {}
|
||||
new["name"] = kwargs["name"]
|
||||
new["type"] = kwargs["type"]
|
||||
new["flavor_id"] = kwargs["flavor_id"]
|
||||
model = self._create(self._path(), new)
|
||||
upload_trained_model = kwargs['trained_model']
|
||||
return self._create_and_upload(self._path(model.id)+'/upload_trained_model', upload_trained_model)
|
||||
|
@ -86,6 +86,9 @@ def do_model_list(cs, args):
|
||||
@utils.arg('name',
|
||||
metavar='<name>',
|
||||
help='ID or name of the model to train')
|
||||
@utils.arg('--flavor-id',
|
||||
metavar='<flavor_id>',
|
||||
help='ID or name of the model to train')
|
||||
@utils.arg('--trained-model',
|
||||
metavar='<trained_model>',
|
||||
help='Absolute path for trained models')
|
||||
@ -97,6 +100,7 @@ def do_create_model(cs, args):
|
||||
opts = {}
|
||||
opts['name'] = args.name
|
||||
opts['type'] = args.type
|
||||
opts["flavor_id"] = args.flavor_id
|
||||
opts = gyan_utils.remove_null_parms(**opts)
|
||||
try:
|
||||
opts['trained_model'] = open(args.trained_model, 'rb').read()
|
||||
|
Loading…
x
Reference in New Issue
Block a user