-
Notifications
You must be signed in to change notification settings - Fork 539
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
max_duration_ms setting does not work in Offline scenario #1397
Comments
Testing with the latest release ( |
The variable usages are a bit confusing in the loadgen code and so I do not have a full understanding of what's happening. But I believe this is the expected behavior as can be seen here. In the offline scenario, there is only a single query and all samples are part of it (but at some places in the code, samples are considered as queries). Probably this is why But, say you want to enforce max_duration=100000 ms = 100s, a way to do this will be to change the target_qps because in the Offline scenario the number of queries is approximately target_qps * 1.1 * min_duration_in_seconds and all of these always get executed. I see that, you are using the default (also minimum) target_qps of 1, so the way to enforce the max_duration will be to use min_duration setting. But if you want to do this transparently for any device without knowing its performance ahead, I don't think it is possible as of now. What we do is run a small test run, get the performance of the system, and then use that value for further runs. |
@arjunsuresh Thank you for the information. I will look into the workaround you suggested. |
You're welcome. AbortTest() should be working. Just that on a benchmarking system it cannot be used with a timer as then it can interfere with the performance results in Offline/Server scenarios. |
Can you explain this a bit more? Since the BTW, does it make sense to update/fix |
You can use AbortTest - but checking the test duration using "time" function call cannot be done during a benchmark run. Probably a timeout option like this can be used. In singlestream and multistream - a query has 1 or 8 samples. Before issuing the next query loadgen can do any operations as they won't get timed as part of the benchmark run. But in the case of offline scenario, only a single query is there containing all the samples. So, there is no free time for loadgen to call the time function and check the max_duration. |
Thank you for the explanation. We will try to implement the |
We did try to implement For reference, the implementation can be reviewed here: Can someone take a look if inference/loadgen/tests/basic.cc Lines 94 to 101 in fd6486a
|
I wanted to use the
TestSettings.max_duration_ms
to stop a bechmark run when it takes too long to finish. (see PR mlcommons/mobile_app_open#718)The setting works as expected in the
SingleStream
but not in theOffline
scenario. In theOffline
scenario, the benchmark does not stop and the result is valid.Is this behavior expected? Or is it a bug?
Log for SingleStream scenario
Log for Offline scenario
The
loadgen
version used is defined here:https://github.com/mlcommons/mobile_app_open/blob/4d82d1c186823e38a82867cc4f0116d6bfb1ea8f/WORKSPACE#L118-L129
If you need any other information. Please let me know. Thanks.
The text was updated successfully, but these errors were encountered: