Repository navigation
feat(clear): MLflow trace fetch, SPARC support, PyPI clear-eval - #104
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: ✨ Finishing Touches🧪 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 |
e5c384e to
31ae737
Compare
|
@ruivieira can you take a look at this PR for any additional feedback or merge? |
ruivieira
left a comment
There was a problem hiding this comment.
Thanks for the PR @suppathak .
I've left a comment on the MLFlow / multi-tenancy contract. Thank you!
| callbacks.report_status( | ||
| JobStatusUpdate(status=JobStatus.RUNNING, phase=JobPhase.LOADING_DATA) | ||
| ) | ||
| # Allow job to override the MLflow workspace (e.g. when EvalHub sidecar |
There was a problem hiding this comment.
One concern on the mlflow_workspace / mlflow_route_url bypass: allowing the adapter to override the sidecar-injected workspace and talk directly to MLflow breaks the multi-tenancy contract.
The sidecar exists precisely to ensure jobs can only access resources within their own tenant namespace. Would it be acceptable to restrict MLflow trace fetching to the same workspace as the job? That would keep the adapter within the platform's tenancy boundaries and avoid the need for the bypass entirely.
There was a problem hiding this comment.
Thanks @ruivieira .
Here is why we did this: when we deployed MLflow on Red Hat OpenShift AI, the EvalHub sidecar automatically injects MLFLOW_WORKSPACE set to the tenant namespace (in our case redhat-ods-applications). The problem is, MLflow doesn't have a workspace matching that namespace name. There are multiple workspaces available, and we uploaded our traces to the default workspace, but there's just no workspace called redhat-ods-applications.
So when the adapter runs and tries to fetch traces from MLflow, it's looking in a workspace that doesn't exist, and it comes back empty. The traces are there in default, but the sidecar is forcing all requests to go to redhat-ods-applications which has nothing.
The override was the workaround we found to make the end-to-end flow work, telling the adapter to use default instead and bypassing the sidecar's workspace injection.
Happy to hear if there's a better way to handle this on the platform side. for example, having the sidecar pick up the workspace from a job parameter rather than always defaulting to the namespace name.
There was a problem hiding this comment.
@ruivieira, let me know if you have any thought on this comment above. Thank you.
- Fetch traces from MLflow via eval-hub-sdk client (parameters.mlflow_traces_experiment_name) - Re-inject mlflow.spanType/Inputs/Outputs into span attributes after SDK normalization so CLEAR's preprocessor identifies LLM calls - Add mlflow_workspace parameter to override sidecar-injected workspace and bypass proxy when traces live in a different workspace - Switch to clear-eval[tool-calls]>=2.0.0 from PyPI (includes SPARC) - Set parameters.separate_tools: true to enable SPARC tool-call analysis - Update README, Containerfile, and meta/job.json accordingly
31ae737 to
7779336
Compare
Summary
eval-hub-sdkclient (parameters.mlflow_traces_experiment_name)mlflow.spanType/Inputs/Outputsinto span attributes after SDK normalization so CLEAR's preprocessor correctly identifies LLM callsmlflow_workspaceparameter to override sidecar-injected workspace (OpenShift AI)clear-eval[tool-calls]>=2.0.0from PyPI (includes SPARC/tool-call analysis)parameters.separate_tools: trueto enable SPARC modeChanges
main.pyrequirements.txtclear-eval[tool-calls]>=2.0.0ContainerfileREADME.mdmeta/job.jsonDependencies
traces.create()Test plan
main.pyMade with Cursor