Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile.jupyter
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM python:3.12-slim

ENV PATH="/root/.local/bin:$PATH"
ENV PYTHONPATH="/app/flightpaths/flights"
# Used for the notebook server
WORKDIR /app

# pipx needed for uv installation script
# ssh client needed for installing private modelbench dependencies
# git needed dvc
RUN apt-get update && apt-get install -y pipx openssh-client git && \
RUN apt-get update && apt-get install -y pipx openssh-client git graphviz && \
pipx install uv
COPY pyproject.toml uv.lock README.md ./

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies = [
"scikit-learn>=1.5.0,<2.0.0",
"pandas>=2.2.2,<4",
"modelbench @ git+https://github.com/mlcommons/modelbench.git",
"graphviz>=0.20,<1",
]

[project.scripts]
Expand Down
17 changes: 17 additions & 0 deletions src/modelplane/evaluator/context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from typing import Any


class EvalContext:
"""Context state passed around during DAG execution."""

def __init__(self, prompt: str, response: str) -> None:
self.prompt = prompt
self.response = response
self._parent_outputs = {}

def set_parent_outputs(self, outputs: dict[str, Any]) -> None:
self._parent_outputs = outputs

def parent_outputs(self) -> list[Any]:
"""Return the NodeOutput for a specific node, or None if it was skipped."""
return list(self._parent_outputs.values())
Loading
Loading