chore(examples): xla_oracle_check defaults --model to a developer home directory
- Dominant language
- Rust
- Stars
- 467
- Forks
- 54
- Avg merge
- 4h 25m
- Merged PRs (30d)
- 310
Description
## Summary
`examples/xla_oracle_check.rs` defaults `--model` to a developer's home directory, while sibling examples using the identical `arg()` helper use portable defaults.
## Background
A hardcoded `/home/inureyes/...` default resolves on nobody else's machine, so the example fails out of the box unless the user knows to override `--model`. Sibling examples already show two portable patterns.
## Proposed Solution
One-line change following either in-tree pattern: a repo-relative model path or a `CARGO_MANIFEST_DIR` anchor. Verifiable without building the `xla-iree` feature.
## Implementation Notes
- `examples/xla_oracle_check.rs:69` (confirmed): `arg("--model", "/home/inureyes/models/qwen2.5-0.5b-bf16")`.
- Portable patterns in-tree: `examples/xla_traj_dump.rs:37` (repo-relative `models/llama-3.2-1b-4bit`), `examples/xla_batch_bench.rs:90-96` (`env!("CARGO_MANIFEST_DIR")` anchor).
- The same file's `--oracle` default (`:70`, `/tmp/qwen_oracle.json`) is machine-neutral and fine.
## Acceptance Criteria
- [ ] No example defaults to a path outside the repository conventions.
---
## Original Suggestion
### Title: chore(examples): xla_oracle_check defaults --model to a developer home directory
`examples/xla_oracle_check.rs` defaults `--model` to a developer's home directory, while sibling examples with the identical `arg()` helper use portable defaults.
## Evidence
- `examples/xla_oracle_check.rs:69` — `arg("--model", "/home/inureyes/models/qwen2.5-0.5b-bf16")`
- Portable patterns in-tree: `examples/xla_traj_dump.rs:37` (repo-relative `models/llama-3.2-1b-4bit`), `examples/xla_batch_bench.rs:90-96` (`env!("CARGO_MANIFEST_DIR")` anchor)
- The same file's `--oracle` default (`:70`) is `/tmp/qwen_oracle.json` — machine-neutral, fine
## Suggested fix
One-line change following either in-tree pattern. The edit is verifiable without building the `xla-iree` feature.
## Acceptance criteria
- [ ] No example defaults to a path outside the repository conventions
Contributor guide
Research direction
Open examples/xla_oracle_check.rs around line 69 and compare its --model default with examples/xla_traj_dump.rs and examples/xla_batch_bench.rs. Replace the developer-specific path with one of the portable in-tree patterns, then verify the example no longer defaults outside repository conventions without building the xla-iree feature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100