fix(agent-challenge): allow PyPI index for agent dependency install - #62
Conversation
Host-local evaluation has egress to PyPI; --no-index caused instant empty-index failures for real agent deps (e.g. litellm>=1.55.0). Drop offline-only pip flags and use network-sane retries/timeouts.
📝 WalkthroughWalkthroughThe own-runner dependency installation changed from offline-only pip behavior to PyPI-capable resolution with three retries and a 30-second timeout. Dockerfile comments and evaluation tests were updated to reflect the new settings and retained best-effort execution. ChangesAgent dependency installation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/challenges/agent-challenge/Dockerfile (1)
137-139: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winAlign the Docker pre-bake strategy with pip’s isolation mode.
Pip’s normal PEP 517 flow creates a temporary isolated build environment and installs build dependencies there;
--no-build-isolationis the mode that relies on preinstalled build dependencies. (pip.pypa.io) Therefore, the globally pre-bakedsetuptools/hatchling/other backends will not provide the claimed benefit for modernpyproject.tomlbuilds.
packages/challenges/agent-challenge/Dockerfile#L137-L139: update the comment/strategy so it does not claim global backend pre-baking accelerates isolated builds.packages/challenges/agent-challenge/src/agent_challenge/evaluation/runner.py#L2016-L2016: document or implement a controlled wheel/cache/index strategy for isolated build requirements if the pre-bake is intended to remain.🤖 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 `@packages/challenges/agent-challenge/Dockerfile` around lines 137 - 139, Align the pre-bake strategy with pip’s isolated PEP 517 builds: in packages/challenges/agent-challenge/Dockerfile lines 137-139, revise the comment/strategy so it no longer claims globally installed backends accelerate isolated builds; in packages/challenges/agent-challenge/src/agent_challenge/evaluation/runner.py line 2016, document or implement a controlled wheel, cache, or index strategy for isolated build requirements if the pre-bake remains. Use the existing runner._own_runner_script context and make no unrelated changes.
🤖 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 `@packages/challenges/agent-challenge/Dockerfile`:
- Around line 137-139: Align the pre-bake strategy with pip’s isolated PEP 517
builds: in packages/challenges/agent-challenge/Dockerfile lines 137-139, revise
the comment/strategy so it no longer claims globally installed backends
accelerate isolated builds; in
packages/challenges/agent-challenge/src/agent_challenge/evaluation/runner.py
line 2016, document or implement a controlled wheel, cache, or index strategy
for isolated build requirements if the pre-bake remains. Use the existing
runner._own_runner_script context and make no unrelated changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 522989df-ee9b-4418-8ee1-549b2c767026
📒 Files selected for processing (3)
packages/challenges/agent-challenge/Dockerfilepackages/challenges/agent-challenge/src/agent_challenge/evaluation/runner.pypackages/challenges/agent-challenge/tests/test_evaluation.py
Summary
--no-index/--no-build-isolationfrom the own_runner agent pip install so miner deps (e.g.litellm>=1.55.0) resolve from PyPI at evaluation time.--retries 3 --default-timeout 30).runner.pyand the agent-challenge Dockerfile.Changes
--no-indexwas the sole blocker (instant empty-index fail, not DNS retries).Test plan
test_own_runner_script_pip_installs_use_pypi_with_sane_retriesUV_CACHE_DIR=/var/tmp/uv-cache uv run pytest packages/challenges/agent-challenge/tests/test_evaluation.py -q(59 passed)uv run ruff check src packages/challenges--no-index/--no-build-isolationon this install pathCI
Notes
-k "runner or install or own_runner"for submission statusreceivedexist onmain(miner env gate) and are out of scope.Summary by CodeRabbit