Skip to content

Commit

Permalink
#144 - formatted code by black
Browse files Browse the repository at this point in the history
  • Loading branch information
Stifo committed Oct 27, 2023
1 parent 9accbd7 commit d430de1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deepaas/api/v2/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
Filename of the original file being uploaded.
"""


def _get_handler(model_name, model_obj): # noqa
args = webargs.core.dict2schema(model_obj.get_train_args())
args.opts.ordered = True
Expand All @@ -72,14 +73,14 @@ def build_train_response(uuid, training):
ret["args"] = training["args"]
ret["uuid"] = uuid

for (key, val) in ret["args"].items():
for key, val in ret["args"].items():
if isinstance(val, web.FileField):
aux = UploadedFileInfo(
name=val.name,
content_type=val.content_type,
original_filename=val.filename,
)
ret['args'][key] = aux
ret["args"][key] = aux

if training["task"].cancelled():
ret["status"] = "cancelled"
Expand Down

0 comments on commit d430de1

Please sign in to comment.