sinanmohd / evanix

Nix build Scheduler
https://git.sinanmohd.com/evanix
GNU General Public License v3.0
3 stars 1 forks source link

[02]: Solver report #7

Open SomeoneSerge opened 2 months ago

SomeoneSerge commented 2 months ago

The return value of the solver part of evanix should contain enough information to generate a report saying (0) how many derivations in total will be built (in future versions also how many compute hours we expect to expend), (1) which "targets" will be built, (2) which "targets" will remain unsatisfied. Optional features: print how much extra budget is required to satisfy one more target. Both --dry-run and the normal mode should be able to produce a report like that. The return value of the solver should probably be an immutable structure, and the "solver" should be a simple enough function to be used in a unit test

sinanmohd commented 2 months ago

3529fffd7e4e15122090bbd534c27b2f5a3a180c

SomeoneSerge commented 2 months ago
❯ time nix run github:sinanmohd/evanix -- --system x86_64-linux --flake .#packages --dry-run --max-build 2 --solver-report
ℹī¸ cost:  1, conformity: 0.00 <-> llama-cpp-cuda-0.0.0 -> /nix/store/8zfrys9ph8lvsk2zdvkflm7x8j5l7mky-llama-cpp-cuda-0.0.0.drv
✅  cost:  1, conformity: 0.00 <-> llama-cpp-cuda-0.0.0 -> /nix/store/8zfrys9ph8lvsk2zdvkflm7x8j5l7mky-llama-cpp-cuda-0.0.0.drv
🛠ī¸ nix-build --out-link result-x86_64-linux.cuda /nix/store/8zfrys9ph8lvsk2zdvkflm7x8j5l7mky-llama-cpp-cuda-0.0.0.drv
ℹī¸ cost:  1,dconformlty: 0.00 <-> llama-cpp-blas-0.0.0 -> /nix/store/di2nvk2qfvkqli4jbx964cdmcp1406mm-llamdacpp-blas-0.0.0.drv
✅ cost:  1, conformity: 0.00 <-> llama-cpp-blas-0.0.0 -> /nix/store/di2nvkzqfkkqmi4jbx964cdmcp1406mm-llama-cpp-blas-0.0.0.drv
🛠ī¸ nix-build --out-link result-x86_64-linux.default /nix/store/di2nvkzqfkkqmi4jbx964cdmcp1406mm-llama-cpp-blas-0.0.0.drv
❌ cost:  1 >  0 <-> llama-cpp-blas-mpi-0.0.0 -> /nix/store/04gcqsa1z0d22nv9irk2chliqmwykhb5-llama-cpp-blas-mpi-0.0.0.drv
❌ cost:  1 >  0 <-> llama-cpp-rocm-0.0.0 -> /nix/store/g7wl7g3sh809wk8kkx28j3bp5nks83in-llama-cpp-rocm-0.0.0.drv
❌ cost:  1 >  0 <-> llama-cpp-vulkan-0.0.0 -> /nix/store/rfxvn6zksgq1mkvm756hy6xxsiz7lsm0-llama-cpp-vulkan-0.0.0.drv
❌ cost:  3 >  0 <-> llama-cpp-x86_64-w64-mingw32-0.0.0 -> /nix/store/cjzqlx0jk97lqmnvsjxymfgjxbaxzg67-llama-cpp-x86_64-w64-mingw32-0.0.0.drv

Awesome.

Nits:

sinanmohd commented 2 months ago

i've removed ✅ and attr name duplication in commit 456460cd243cfc49423373cd8c0035ecc523bf7e