-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[train] bump test_torch_trainer timeout #57873
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
base: master
Are you sure you want to change the base?
[train] bump test_torch_trainer timeout #57873
Conversation
Signed-off-by: Matthew Deng <[email protected]>
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.
Code Review
This pull request addresses test timeouts for test_torch_trainer
on Python 3.12 by increasing the test size from small
to medium
. This is a valid approach. However, I've suggested a more precise solution using Bazel's select
functionality to apply the larger timeout only when building with Python 3.12. This would avoid increasing the timeout for other Python versions, contributing to better CI efficiency. See my comment for an example implementation.
py_test( | ||
name = "test_torch_trainer", | ||
size = "small", | ||
size = "medium", |
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.
A more targeted fix for the Python 3.12 timeouts would be to use Bazel's select
statement. This would apply the medium
size only for the Python 3.12 build, while other versions would continue to use the small
size, which can help keep CI runs fast.
Here's an example of how you could implement this:
First, define a config_setting
(if one doesn't already exist for your toolchain):
# In a relevant BUILD file (e.g., the root BUILD file)
config_setting(
name = "is_py312",
flag_values = {
"@bazel_tools//tools/python:python_version": "PY3.12",
},
)
Then, use select
in this py_test
definition:
py_test(
name = "test_torch_trainer",
size = select({
"//path/to:is_py312": "medium",
"//conditions:default": "small",
}),
...
)
Signed-off-by: Matthew Deng <[email protected]>
…ewdeng/ray into test-torch-trainer-timeout
Description
Bump from small to medium due to timeouts happening specifically in py3.12 tests.