Force interval events by default#5739
Conversation
Greptile SummaryThis PR flips the default value of
Confidence Score: 4/5Safe to merge; the change is intentional and test-scoped, but worth confirming all affected callers are expected to run with forced interval events. The core change is a one-line default flip in a test utility. The direct call site in source/isaaclab_tasks/test/env_test_utils.py — the default change implicitly affects all callers; the other test files that call these utilities without an explicit Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Test file calls _run_environments / _check_random_actions] --> B{force_interval_events\npassed explicitly?}
B -- Yes --> C[Use provided value]
B -- No --> D["Use default (was False, now True)"]
C --> E{force_interval_events == True?}
D --> E
E -- Yes --> F[_force_interval_events_to_fire_immediately\nsets interval_range_s to 1e-6]
E -- No --> G[Interval events use original timing]
F --> H[env.reset + env.step loop]
G --> H
Reviews (1): Last reviewed commit: "Force interval events by default" | Re-trigger Greptile |
There was a problem hiding this comment.
🤖 Isaac Lab Review Bot
Summary
This PR changes the default value of force_interval_events from False to True in two test utility functions (_run_environments and _check_random_actions). This is a test-only change that improves test coverage by ensuring interval-mode event terms fire on the first step() call during environment testing.
📋 Review
✅ What This Change Does
-
env_test_utils.py: Flips the default offorce_interval_eventsparameter fromFalsetoTruein both:_run_environments()(line 262)_check_random_actions()(line 354)
-
test_environments.py: Simplifies thetest_environmentstest by removing the explicitforce_interval_events=Trueargument (now redundant since it's the default) -
Changelog fragment: Correctly adds a
.skipchangelog entry documenting this as a test-only change
✅ Backward Compatibility Assessment
| Aspect | Impact |
|---|---|
| Production code | ✅ No impact - test utilities only |
| Existing tests calling these functions | force_interval_events=False will now fire interval events by default |
| CI/CD | ✅ Should improve test reliability |
🔍 Analysis
Why this change makes sense:
- The
force_interval_events=Truesetting forces interval-mode event terms (like randomization events) to fire immediately on the firststep(), ensuring they're exercised during testing - Previously, tests might skip exercising these events if the sampled
time_leftdidn't trigger within the test's step count - This provides more thorough test coverage by default
Potential considerations:
- Any external or downstream tests using
_run_environments()or_check_random_actions()without explicitly settingforce_interval_eventswill now get the new default behavior - This is generally beneficial for test thoroughness, but could expose previously hidden issues in event handlers
⚠️ CI Status
Note: "Installation Tests (uv)" is currently failing. Please verify this is unrelated to the changes in this PR.
📊 Verdict
| Category | Assessment |
|---|---|
| Code Quality | ✅ Clean, minimal change |
| Test Coverage Impact | ✅ Positive - more thorough by default |
| Breaking Change Risk | |
| Documentation | ✅ Changelog fragment present |
Overall: This is a sensible improvement to test defaults. The change ensures interval events are exercised in tests by default, improving coverage. The simplification of test_environments.py is a nice cleanup.
🤖 Generated by Isaac Lab Review Bot | About
Description
force_interval_eventsto be default on all test helpersintervalmode, this function is a no-op. For all others, this helps test theintervalcritical path at eachstep()call.test_environments.py,test_environments_with_stage_in_memory.py,test_environments_newton.py, andtest_factory_environments.py.Fixes:
dead_zone_thresholdsfired ~3×/env pre-Speed up environment smoke tests and cover EventManager interval handlers #5713, dropped to 0×/env after Speed up environment smoke tests and cover EventManager interval handlers #5713's 100→20 step cut, restored to 20×/env by this PR.push_robotterms never fired even in the legacy 100-step budget. This PR is the first time they're exercised in CI.Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there