Skip to content

Optimized Evaluations #386

Description

@DerDennisOP

Full overhaul of Gradient's evaluation workers into a native, parallel, cache-controlled evaluator.

Today every evaluation runs a subprocess EvalWorker/EvalWorkerPool driving a single NixEvaluator over the Nix C API (nix-bindings), with a tryEval-based wildcard resolver, no parallelism across workers, and no control over the Nix eval-cache, it lives per-worker (embedded SQLite) and is thrown away on recycle, so every evaluation re-evaluates from cold and big evals blow up memory.

We want:

  • Full control over the evaluation cache.
  • The ability to split one flake's evaluation across multiple workers, with the eval cache cached into the Gradient instance so workers share it instead of each re-evaluating the same flake from scratch.
  • A native parallel evaluator (no external binary) that isolates per-attribute failures and reclaims memory without restarting the whole process.
  • Native evaluation stats/progress (no frontend in this issue, storage + proto only).

This is a from-scratch overhaul: expect breaking changes across gradient-proto, the database, and the API. Optimal results matter more than compatibility.

Builds on / references:

Detail per area in the comments below.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions