-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Throwing exception if the underlying rsp fails with an exception #1946
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
|
Out of curiosity, why we even use rsp? |
Because when we introduced benchmarking, we wanted to have them asap. And converting them to api required someone on the ml team and it was not possible at that time |
|
cc @danmosemsft @justinormont @adamsitnik |
|
Hi @Anipik thanks for writing this. Minor point... so, I see this appears to be part of something called a While we're at it, is there a reason to not make this base class abstract? |
TomFinley
left a comment
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 @Anipik !
|
@justinormont @Ivanidzo4ka can you review this one ? |
adamsitnik
left a comment
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 propose a different approach: instead of introducing a base class type with [IterationCleanup] method that checks the exit code we could add a new helper method, which would call Maml.MainCore, check the exit code and throw in the benchmark when the exception happens.
sth like:
void ExecuteMamlCommand(this string command, IHostEnvironment environment)
{
if (Maml.MainCore(environment, command, alwaysPrintStacktrace: false) < 0)
throw new Exception($"Command {command} returned error code"); // + some details if possible
}
sfilipi
left a comment
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.
![]()
The benchmarks involving rsps don't fail even when the underlying rsp has thrown an exception