test: Add Training Hub RayJob E2E tests (RHOAIENG-63702, RHOAIENG-65214)#2988
Conversation
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughWalkthroughAdds Training Hub-specific distributed workload configuration and a reusable ODH test runner keyword, then introduces four Robot Framework RayJob scenarios covering SFT, OSFT, LoRA, and GRPO configurations. ChangesTraining Hub RayJob testing
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RobotSuite
participant DistributedWorkloadsResource
participant ODHBinary
RobotSuite->>DistributedWorkloadsResource: Run Training Hub ODH test
DistributedWorkloadsResource->>ODHBinary: Execute scenario with Training Hub environment
ODHBinary-->>DistributedWorkloadsResource: Return exit code
DistributedWorkloadsResource-->>RobotSuite: Pass or fail test
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1c10e90 to
9d9c7bd
Compare
|
you would need a separate file, e.g. if you add your tests to the existing Also note that ray image is outdated, because we haven't used these tests lately. can you make sure that the Ray image is the latest one please? |
Thanks for review @pawelpaszki I've updated to add a separate file. The image being used is the new training hub flavour. PTAL, thank you |
| ... env:TEST_TIMEOUT_SHORT=5m | ||
| ... env:TEST_TIMEOUT_MEDIUM=15m | ||
| ... env:TEST_TIMEOUT_LONG=30m | ||
| ... env:TEST_TIMEOUT_GPU_PROVISIONING=40m |
| ... DistributedWorkloads | ||
| ... TrainingRay | ||
| ... TrainingHub | ||
| Run DistributedWorkloads Training Hub ODH Test TestSftRayJobSingleGpu ${RAY_TRAINING_HUB_IMAGE} ${NOTEBOOK_IMAGE_3.12} |
| ... DistributedWorkloads | ||
| ... TrainingRay | ||
| ... TrainingHub | ||
| Run DistributedWorkloads Training Hub ODH Test TestOsftRayJobSingleGpu ${RAY_TRAINING_HUB_IMAGE} ${NOTEBOOK_IMAGE_3.12} |
| ... DistributedWorkloads | ||
| ... TrainingRay | ||
| ... TrainingHub | ||
| Run DistributedWorkloads Training Hub ODH Test TestLoraRayJobSingleGpu ${RAY_TRAINING_HUB_IMAGE} ${NOTEBOOK_IMAGE_3.12} |
| ... DistributedWorkloads | ||
| ... TrainingRay | ||
| ... TrainingHub | ||
| Run DistributedWorkloads Training Hub ODH Test TestGrpoRayJobSingleNodeMultiGpu ${RAY_TRAINING_HUB_IMAGE} ${NOTEBOOK_IMAGE_3.12} |
Add 4 Robot test cases for SFT, OSFT, LoRA, and GRPO Training Hub RayJob tests with a new keyword that passes the required env vars including TEST_TIER, Training Hub image, and S3 prefix. Signed-off-by: Fiona-Waters <fiwaters6@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
3111841 to
d3053af
Compare
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ods_ci/tests/Resources/Page/DistributedWorkloads/DistributedWorkloads.resource (1)
305-334: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRename the
${TEST_NAME}argument to avoid overwriting a reserved variable.Robocop static analysis flags that the argument
${TEST_NAME}overwrites the Robot Framework reserved variable containing the current test case name. Renaming this argument prevents potential side effects and clears the linting warning.♻️ Proposed refactor to rename the argument
- [Arguments] ${TEST_NAME} ${DW_RAY_IMAGE} ${NOTEBOOK_IMAGE} - Log To Console "Running Training Hub test: ${TEST_NAME}" - ${result} = Run Process ./${ODH_BINARY_NAME} -test.run ${TEST_NAME} + [Arguments] ${test_name_arg} ${DW_RAY_IMAGE} ${NOTEBOOK_IMAGE} + Log To Console "Running Training Hub test: ${test_name_arg}" + ${result} = Run Process ./${ODH_BINARY_NAME} -test.run ${test_name_arg} ... shell=true ... stderr=STDOUT ... env:TEST_TIER=Examples-CUDA ... env:TEST_TIMEOUT_SHORT=5m ... env:TEST_TIMEOUT_MEDIUM=15m ... env:TEST_TIMEOUT_LONG=30m ... env:TEST_TIMEOUT_GPU_PROVISIONING=40m ... env:TEST_OUTPUT_DIR=%{WORKSPACE}/distributed-workloads-odh-logs ... env:TEST_RAY_IMAGE=${DW_RAY_IMAGE} ... env:TEST_RAY_TRAINING_HUB_IMAGE=${DW_RAY_IMAGE} ... env:ODH_NAMESPACE=${APPLICATIONS_NAMESPACE} ... env:NOTEBOOK_USER_NAME=${NOTEBOOK_USER_NAME} ... env:NOTEBOOK_USER_TOKEN=${NOTEBOOK_USER_TOKEN} ... env:NOTEBOOK_IMAGE=${NOTEBOOK_IMAGE} ... env:AWS_DEFAULT_ENDPOINT=${AWS_DEFAULT_ENDPOINT} ... env:AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} ... env:AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} ... env:AWS_STORAGE_BUCKET=${AWS_STORAGE_BUCKET} ... env:AWS_STORAGE_BUCKET_MNIST_DIR=${AWS_STORAGE_BUCKET_MNIST_DIR} ... env:AWS_STORAGE_BUCKET_RAY_TRAINING_HUB_DIR=${AWS_STORAGE_BUCKET_RAY_TRAINING_HUB_DIR} ... env:PIP_INDEX_URL=${PIP_INDEX_URL} ... env:PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST} ... timeout=45 min Log To Console ${result.stdout} Check missing Go test ${result.stdout} IF ${result.rc} != 0 - FAIL ${TEST_NAME} failed + FAIL ${test_name_arg} failed END🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ods_ci/tests/Resources/Page/DistributedWorkloads/DistributedWorkloads.resource` around lines 305 - 334, Rename the `${TEST_NAME}` argument in the distributed workload keyword to a non-reserved name, then update its uses in the console log, `Run Process` invocation, and failure message. Keep the test execution behavior unchanged while avoiding the Robot Framework reserved current-test-name variable.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@ods_ci/tests/Resources/Page/DistributedWorkloads/DistributedWorkloads.resource`:
- Around line 305-334: Rename the `${TEST_NAME}` argument in the distributed
workload keyword to a non-reserved name, then update its uses in the console
log, `Run Process` invocation, and failure message. Keep the test execution
behavior unchanged while avoiding the Robot Framework reserved current-test-name
variable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 7f54723a-826b-48bf-a27a-c4b89da23c99
📒 Files selected for processing (2)
ods_ci/tests/Resources/Page/DistributedWorkloads/DistributedWorkloads.resourceods_ci/tests/Tests/0600__distributed_workloads/test-run-training-hub-rayjob-tests.robot
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Fiona-Waters, pawelpaszki, sutaakar The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/lgtm |
b93b0a7
into
red-hat-data-services:master



Summary
Add ods-ci integration for Training Hub RayJob E2E tests covering SFT, OSFT, LoRA, and GRPO algorithms on Ray. These tests depend on the corresponding Go tests in distributed-workloads#851.
Changes
TestSftRayJobSingleGpu,TestOsftRayJobSingleGpu,TestLoraRayJobSingleGpu,TestGrpoRayJobSingleNodeMultiGpuRun DistributedWorkloads Training Hub ODH Testkeyword withTEST_TIER=Examples-CUDA, Training Hub image, S3 prefix, and extended GPU timeoutsRAY_TRAINING_HUB_IMAGEandAWS_STORAGE_BUCKET_RAY_TRAINING_HUB_DIRvariablesDependencies
Qwen2.5-1.5B-Instructmodel and GRPO dataset subset pre-staged underray-training-hub/prefix for disconnected environmentsTest Plan
./run_robot_test.sh --include TrainingHub --skip-oclogin trueon a cluster with NVIDIA GPUsodhbinary from the DW branchMade with Cursor