fetch_ml/internal
Jeremie Fraeys c46be7f815
refactor: Phase 4 deferred - Extract GPU utilities and execution helpers
Extracted from execution.go to focused packages:

1. internal/worker/gpu.go (60 lines)
   - gpuVisibleDevicesString() - GPU device string formatting
   - filterExistingDevicePaths() - Device path filtering
   - gpuVisibleEnvVarName() - GPU env var selection
   - Reuses GPUType constants from gpu_detector.go

2. internal/worker/execution/setup.go (108 lines)
   - SetupJobDirectories() - Job directory creation
   - CopyDir() - Directory tree copying
   - copyFile() - Single file copy helper

3. internal/worker/execution/snapshot.go (52 lines)
   - StageSnapshot() - Snapshot staging for jobs
   - StageSnapshotFromPath() - Snapshot staging from path

Updated execution.go:
- Removed 64 lines of GPU utilities (now in gpu.go)
- Reduced from 1,082 to ~1,018 lines
- Still contains main execution flow (runJob, executeJob, etc.)

Build status: Compiles successfully
2026-02-17 14:03:11 -05:00
..
api refactor: Migrate all test imports from api to api/ws package 2026-02-17 13:52:20 -05:00
audit feat(tracking): add pluggable tracking backends and audit support 2026-01-05 12:33:57 -05:00
auth feat(api): refactor websocket handlers; add health and prometheus middleware 2026-01-05 12:31:07 -05:00
config refactor: Phase 3 - fix config/storage boundaries 2026-02-17 12:49:53 -05:00
container feat(jupyter): improve runtime management and update security/workflow docs 2026-01-05 12:37:27 -05:00
controller Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
domain refactor: extract domain types and consolidate error system (Phases 1-2) 2026-02-17 12:34:28 -05:00
envpool feat(worker): add integrity checks, snapshot staging, and prewarm support 2026-01-05 12:31:13 -05:00
errtypes Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
experiment feat: implement C++ native libraries for performance-critical operations 2026-02-16 20:38:04 -05:00
fileutil Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
jupyter feat(core): API, worker, queue, and manifest improvements 2026-02-12 12:05:17 -05:00
logging feat(jupyter): improve runtime management and update security/workflow docs 2026-01-05 12:37:27 -05:00
manifest feat(core): API, worker, queue, and manifest improvements 2026-02-12 12:05:17 -05:00
metrics feat(api): refactor websocket handlers; add health and prometheus middleware 2026-01-05 12:31:07 -05:00
middleware feat(api): refactor websocket handlers; add health and prometheus middleware 2026-01-05 12:31:07 -05:00
network feat(jupyter): improve runtime management and update security/workflow docs 2026-01-05 12:37:27 -05:00
prommetrics feat(api): refactor websocket handlers; add health and prometheus middleware 2026-01-05 12:31:07 -05:00
queue refactor: Phase 6 - Queue Restructure 2026-02-17 13:41:06 -05:00
resources feat(worker): add integrity checks, snapshot staging, and prewarm support 2026-01-05 12:31:13 -05:00
storage refactor: Phase 3 - fix config/storage boundaries 2026-02-17 12:49:53 -05:00
telemetry Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
tracking feat(tracking): add pluggable tracking backends and audit support 2026-01-05 12:33:57 -05:00
worker refactor: Phase 4 deferred - Extract GPU utilities and execution helpers 2026-02-17 14:03:11 -05:00