Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

dyastremsky
Copy link
Contributor

@dyastremsky dyastremsky commented Apr 25, 2024

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).

@dyastremsky dyastremsky self-assigned this Apr 25, 2024
@@ -121,6 +139,17 @@ DataLoader::ReadDataFromDir(
SerializeStringTensor(output_string_data, &it->second);
}
}

for (const auto& file : std::filesystem::directory_iterator(data_directory)) {
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants