Documentation
¶
Index ¶
- Constants
- Variables
- func JobDirFromResultPath(resultPath, evalBaseDir string) string
- func PrintExceptionDetails(w io.Writer, jobDir string)
- type CommandRunFunc
- type DockerWorkdirStager
- type DockerWorkdirStagerOptions
- type EvalOptions
- type EvalRunner
- type ExecResult
- type Options
- type ResultPathWriter
- type Server
Constants ¶
View Source
const ( DefaultEvalDatasetPath = "evals/tasks" DefaultEvalJobsDir = ".runme/evals/jobs" )
View Source
const ( ProtocolName = "runme.harbor.stdio" ProtocolVersion = "v1" )
Variables ¶
View Source
var ErrRunmeHarborMissing = errors.New("runme-harbor missing")
Functions ¶
func JobDirFromResultPath ¶
JobDirFromResultPath returns the eval job directory containing Harbor's result file.
func PrintExceptionDetails ¶
PrintExceptionDetails appends Harbor exception file details for an eval job.
Types ¶
type CommandRunFunc ¶
type DockerWorkdirStager ¶
type DockerWorkdirStager struct {
// contains filtered or unexported fields
}
func NewDockerWorkdirStager ¶
func NewDockerWorkdirStager(opts DockerWorkdirStagerOptions) (*DockerWorkdirStager, error)
func (*DockerWorkdirStager) StageDataset ¶
func (s *DockerWorkdirStager) StageDataset(datasetPath string) error
type EvalOptions ¶
type EvalOptions struct {
Agent string
TaskDir string
JobsDir string
Ask bool
AgentKwargs []string
Model string
Env string
RunmeBin string
RunmeArgs []string
RunmeHarborBin string
Debug bool
JobsDirExplicit bool
CommandRun CommandRunFunc
LookPath func(string) (string, error)
Executable func() (string, error)
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
ExtraEnv []string
Preflight bool
}
type EvalRunner ¶
type EvalRunner struct {
// contains filtered or unexported fields
}
func NewEvalRunner ¶
func NewEvalRunner(opts EvalOptions) *EvalRunner
func (*EvalRunner) Run ¶
func (r *EvalRunner) Run(args []string) error
type ExecResult ¶
type ResultPathWriter ¶
type ResultPathWriter struct {
// contains filtered or unexported fields
}
func NewResultPathWriter ¶
func NewResultPathWriter(dst io.Writer) *ResultPathWriter
NewResultPathWriter returns a writer that forwards Harbor output while capturing the result path.
func (*ResultPathWriter) ResultPath ¶
func (w *ResultPathWriter) ResultPath() string
ResultPath finalizes any pending output line and returns the last result path seen.
func (*ResultPathWriter) StdoutFile ¶
func (w *ResultPathWriter) StdoutFile() *os.File
StdoutFile returns the forwarded stdout file when Harbor output is connected to one.
Click to show internal directories.
Click to hide internal directories.