-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Yamato inference tests #4066
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
Merged
Merged
Yamato inference tests #4066
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
41db7c8
better errors for missing constants
b1c0f24
run inference in yamato after training
75e45dd
add extension
9b434da
debug subprocess args
b729418
fix exe path
44ec116
search for executable
aa40f45
fix dumb bug
18cc5e4
-batchmode
d732061
fail if inference fails
9e4e415
install tf2onnx on yamato
947f93a
allow onnx for overrides (expect to fail now)
094373e
enable logs
563b084
fix commandline arg
4c64e23
catch exception from SetModel and exit
a304163
cleanup error message
56e0279
Merge remote-tracking branch 'origin/master' into onnx-inference-tests
11b3817
model artifacts, logs as artifacts, fix pip
d171bca
don't run onnx
f0f7512
cleanup and comment
d5f1e2a
update extension handling
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,6 +149,16 @@ public static IEnumerable<string> CheckModel(Model model, BrainParameters brainP | |
return failedModelChecks; | ||
} | ||
|
||
foreach (var constantName in TensorNames.RequiredConstants) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This prevents null-reference exceptions when trying to load models without the expected constants in them (which was happening for onnx files before a fix on master). This can be moved to another PR, but it's a nice to have. |
||
{ | ||
var tensor = model.GetTensorByName(constantName); | ||
if (tensor == null) | ||
{ | ||
failedModelChecks.Add($"Required constant \"{constantName}\" was not found in the model file."); | ||
return failedModelChecks; | ||
} | ||
} | ||
|
||
var modelApiVersion = (int)model.GetTensorByName(TensorNames.VersionNumber)[0]; | ||
var memorySize = (int)model.GetTensorByName(TensorNames.MemorySize)[0]; | ||
var isContinuousInt = (int)model.GetTensorByName(TensorNames.IsContinuousControl)[0]; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I added support to allow overriding with .onnx files, but later found out that that we need to make some other changes in the import code to support this. Waiting to hear back from the Barracuda team the best way to handle this.