Mohit/organized scripts#29
Conversation
…emerge_/ada/tz8rb3to, emerge_/ada/g7wez8su
- Fixed buffer overflow in init_grid_map (grid_index bounds check) - Fixed truncated binary file detection in load_map_binary - Fixed large ID overflow in save_map_binary for nuplan - Changed VLA to heap allocation in init_grid_map - Updated drive.ini settings Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Greptile SummaryThis PR reorganizes training scripts and unifies configuration terminology across the codebase. Key Changes
Issues Found
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: be81b52 |
| # Truncate large IDs to fit in int32 range | ||
| obj_id = obj.get("id", 0) | ||
| if isinstance(obj_id, int) and (obj_id > 2147483647 or obj_id < -2147483648): | ||
| obj_id = obj_id % 2147483647 | ||
| f.write(struct.pack("i", obj_id)) # id |
There was a problem hiding this comment.
ID truncation with modulo risks collisions - two large IDs (e.g., 2147483648 and 4295967295) both map to 1
| # Truncate large IDs to fit in int32 range | |
| obj_id = obj.get("id", 0) | |
| if isinstance(obj_id, int) and (obj_id > 2147483647 or obj_id < -2147483648): | |
| obj_id = obj_id % 2147483647 | |
| f.write(struct.pack("i", obj_id)) # id | |
| # Truncate large IDs to fit in int32 range - use hash to avoid collisions | |
| obj_id = obj.get("id", 0) | |
| if isinstance(obj_id, int) and (obj_id > 2147483647 or obj_id < -2147483648): | |
| obj_id = hash(obj_id) % 2147483647 |
|
|
||
| # Check if resources directory exists | ||
| binary_path = f"{map_dir}/map_000.bin" | ||
| # Check if resources directory exists (check map_001 since some datasets start at 001) | ||
| binary_path = f"{map_dir}/map_001.bin" | ||
| if not os.path.exists(binary_path): | ||
| raise FileNotFoundError( | ||
| f"Required directory {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." | ||
| f"Required file {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." |
There was a problem hiding this comment.
Changed check from map_000.bin to map_001.bin - breaks datasets that start at map_000
| # Check if resources directory exists | |
| binary_path = f"{map_dir}/map_000.bin" | |
| # Check if resources directory exists (check map_001 since some datasets start at 001) | |
| binary_path = f"{map_dir}/map_001.bin" | |
| if not os.path.exists(binary_path): | |
| raise FileNotFoundError( | |
| f"Required directory {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." | |
| f"Required file {binary_path} not found. Please ensure the Drive maps are downloaded and installed correctly per docs." | |
| # Check if resources directory exists (try both map_000 and map_001) | |
| binary_path = f"{map_dir}/map_000.bin" | |
| if not os.path.exists(binary_path): | |
| binary_path = f"{map_dir}/map_001.bin" | |
| if not os.path.exists(binary_path): | |
| raise FileNotFoundError( | |
| f"Required files not found in {map_dir}. Please ensure the Drive maps are downloaded and installed correctly per docs." | |
| ) |
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fixed transformer training bug * fixing pre commit issues --------- Co-authored-by: Charlie Peter Molony <cpm9831@torch-login-1.hpc-infra.svc.cluster.local>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Following up on Greptile bot's flag from Feb 27 (#29 (comment)): The change at If this PR merges as-is, every job pointing at the WOMD training dir will FileNotFoundError on init. This is potentially the root cause of the 78/85 (92%) crash rate in the Suggested fix per Greptile bot: binary_path = f"{map_dir}/map_000.bin"
if not os.path.exists(binary_path):
binary_path = f"{map_dir}/map_001.bin"
if not os.path.exists(binary_path):
raise FileNotFoundError(
f"Required files not found in {map_dir}. Please ensure the Drive maps are downloaded and installed correctly per docs."
)Worth applying before merge to avoid breaking adaptive_aligned-style runs. |
No description provided.