-
Notifications
You must be signed in to change notification settings - Fork 61
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
Feature/add test pytorch imported models #79
base: main
Are you sure you want to change the base?
Feature/add test pytorch imported models #79
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
- Coverage 96.72% 96.63% -0.09%
==========================================
Files 29 29
Lines 2318 2437 +119
==========================================
+ Hits 2242 2355 +113
- Misses 76 82 +6 ☔ View full report in Codecov by Sentry. |
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.
Nice, this is looking great!
Would it be possible to also add in the scripts that you used to generate the .json and .csv files? That can be a helpful reference in case we want to expand our tests in the future. It would be nice if the scripts were as minimal as possible, but in case some more dependencies are needed, then maybe adding some comments about how to get the required dependencies would be enough.
CMakeLists.txt
Outdated
@@ -1,5 +1,6 @@ | |||
cmake_minimum_required(VERSION 3.1) | |||
project(RTNeural VERSION 1.0.0) | |||
set(CMAKE_CXX_STANDARD 17) |
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.
RTNeural is intended to be compatible with C++14, so we shouldn't be setting this in the top-level CMakeList.
const std::string pytorch_tf_model = "models/pytorch_imported.json"; | ||
const std::string pytorch_x = "test_data/pytorch_x.csv"; | ||
const std::string pytorch_y = "test_data/pytorch_y.csv"; | ||
constexpr double threshold = 1.0e-12; |
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.
Nice!
Script is here. Problem is that currently a CoreAudioML submodule would be needed at least since:
Let me know if it's okay. Refactoring the code to avoid these deps would probably divert from what we want to do.
Yup, committed by mistake, reverted. |
Sure, having the |
@jatinchowdhury18 hello I would like to discuss this PR: I've seen that RTNeural introduces apis for importing pytorch models. On my end I've embedded engine validation inside the plugin. Btw if you think it's still cool to have it I can provide the missing files so that we can merge. Thanks a lot! |
@MaxPayne86 Sure thing! My idea with some of the more recent commits was to add an interface that could be used to load PyTorch models directly from the But anyway, for finishing up this PR, I think the steps would be:
That would be fantastic, and thanks again for all your work on this! |
No description provided.