-
Notifications
You must be signed in to change notification settings - Fork 106
Run model from script #787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… multiple devices). Tests pass (new feature hasn't tested yet)
…w device is introduced and use rwlock to synchronise.
…'t overflows than the tensor type in TENSORSET.
…aces that are affected)
…into ONNX_kill_switch
…om backend len (supported only for onnx now) in INFO MODULES command.
- Add a state flag to every entry in the onnx run sessions array and update it atomically, to avoid situations where main threads and bg thread both access the runOptions field. - Refactor the info_modules section, and change AI.INFO command so it must receive a module/script key. The other info will be accessible as part of the info modules command.
… instance). test info command with AI fields
Codecov Report
@@ Coverage Diff @@
## master #787 +/- ##
==========================================
+ Coverage 74.11% 80.40% +6.28%
==========================================
Files 39 52 +13
Lines 6081 7883 +1802
==========================================
+ Hits 4507 6338 +1831
+ Misses 1574 1545 -29
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks very good
few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few comments
- Add the option the include the backends api from multiple sources in c++ project.
…disAI into run_model_from_script
This PR extends the external commands that torch script already supports through RedisAI (executing unblocking Redis commands), to support the execution of RedisAI models as well by adding a new
redisAI.execute_model
command to torch script. This command receives a model name that is stored in RedisAI, a list of the input tensors and the outputs number, and returns the output tensors.This is tested by running models from torch script in all 3 backends.
This PR includes a unified arrangement of the
device_id
field indl_tensor
- this should be -1 whenever tensor is created for default CPU, otherwise torch interpreters it as if it should be sent to a different device (fordevice_id=0
, the device is considered as CPU:0 insread of CPU).Todo: figure out how (or if) to pass error message from torch extension back to RedisAI, to have more informative failing (currently a generic error message is returned)