Skip to content

Commit ea3abdd

Browse files
author
hning86
committed
auto updated from HaiGPU
1 parent 2e4eb87 commit ea3abdd

File tree

8 files changed

+3248
-3225
lines changed

8 files changed

+3248
-3225
lines changed

01.getting-started/01.train-within-notebook/01.train-within-notebook.ipynb

Lines changed: 807 additions & 814 deletions
Large diffs are not rendered by default.

01.getting-started/01.train-within-notebook/score.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def run(raw_data):
2121
data = json.loads(raw_data)['data']
2222
data = np.array(data)
2323
result = model.predict(data)
24-
return json.dumps({"result": result.tolist()})
24+
25+
# you can return any data type as long as it is JSON-serializable
26+
return result.tolist()
2527
except Exception as e:
2628
result = str(e)
27-
return json.dumps({"error": result})
29+
return result
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/samples/

0 commit comments

Comments
 (0)