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
PA should check whether user-supplied inputs exist in the model #612
base: main
Are you sure you want to change the base?
Conversation
src/c++/perf_analyzer/data_loader.cc
Outdated
@@ -121,6 +139,17 @@ DataLoader::ReadDataFromDir( | |||
SerializeStringTensor(output_string_data, &it->second); | |||
} | |||
} | |||
|
|||
for (const auto& file : std::filesystem::directory_iterator(data_directory)) { |
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.
This is duplicated from above?
Also, I don't think it is correct. It appears that output validation files would also be valid.
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.
Thanks for catching this! I tried a lot of different approaches and must have missed this during clean-up. I'll remove it.
Can you explain the output validation file part? This may be something new to me.
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.
Oh, I think I understand. This only covers inputs. One second, I'll push a commit to cover outputs as well.
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.
Removed the duplicate and added outputs to the I/O which is checked. It builds and looks to have the same unit test failures.
If a user provides inputs that the model does not support, then an error should be returned.
A few unit tests need to be updated for this PR. They are failing due to the mocks and logic expecting incorrect behavior (e.g. missing directories to not be checked, extra inputs to be ignored).