Commit 0e874c0
Update predict.py (GoogleCloudPlatform#4897)
* Update predict.py
Calling the discovery API for every prediction is bad practice, leads to high latency, and also users will very quickly hit the quota imposed on the CRUD server. We've had multiple customers hit this issue, and I can only assume that they are copying and pasting this code.
I think a class would be more elegant here, but this quick fix should at least get us started along a better path.
* Add extra line break before function (for linter)
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: Alec Glassford <alecglassford@google.com>1 parent 8d4ad77 commit 0e874c0
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
0 commit comments