Documentation
¶
Overview ¶
Package benchmarks owns local dataset evaluations and their frozen reports.
Index ¶
- Variables
- func Active(status string) bool
- func PublicError(err error) string
- func ValidateBaseURL(value string) error
- func ValidateConnection(c Connection) error
- type Catalog
- type Connection
- type Dataset
- type DatasetDownload
- type DatasetInventory
- type DatasetItem
- type DatasetRun
- type DatasetRuntime
- type DatasetTransfer
- type Dependencies
- type Event
- type Metric
- type Options
- type Page
- type Provenance
- type Report
- type ResolvedConnection
- type Resolver
- type Run
- type Runtime
- type RuntimeStatus
- type Sample
- type Score
- type Service
- func (s *Service) Cancel(id string) error
- func (s *Service) Catalog() Catalog
- func (s *Service) Close() error
- func (s *Service) DatasetInventory() (DatasetInventory, error)
- func (s *Service) Export(runID, reportID string) ([]byte, error)
- func (s *Service) FindReport(ctx context.Context, reportID string) (Run, error)
- func (s *Service) Get(id string) (Run, error)
- func (s *Service) ManageDataset(id, action string) (DatasetDownload, error)
- func (s *Service) Page(after string) (Page, error)
- func (s *Service) Prepare() error
- func (s *Service) Report(runID, reportID, after string) (Report, error)
- func (s *Service) Start(ctx context.Context, command StartCommand) (Run, error)
- type StartCommand
- type Target
- type WorkerRequest
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func PublicError ¶
func ValidateBaseURL ¶
func ValidateConnection ¶
func ValidateConnection(c Connection) error
Types ¶
type Catalog ¶
type Catalog struct {
SchemaVersion int `json:"schema_version"`
Datasets []Dataset `json:"datasets"`
Runtime RuntimeStatus `json:"runtime"`
}
type Connection ¶
type Connection struct {
Protocol domain.Protocol `json:"protocol"`
Model string `json:"model"`
ChannelID string `json:"channel_id"`
BaseURL string `json:"base_url"`
APIKey string `json:"api_key"`
}
func (Connection) GoString ¶
func (Connection) GoString() string
func (Connection) String ¶
func (Connection) String() string
type DatasetDownload ¶
type DatasetDownload struct {
State string `json:"state"`
Bytes int64 `json:"bytes"`
Files int `json:"files"`
Samples int `json:"samples"`
InputSHA256 string `json:"input_sha256"`
CacheSHA256 string `json:"cache_sha256"`
TaskVersion string `json:"task_version"`
UpdatedAt string `json:"updated_at"`
VerifiedAt string `json:"verified_at"`
ErrorCode string `json:"error_code"`
}
type DatasetInventory ¶
type DatasetInventory struct {
SchemaVersion int `json:"schema_version"`
Datasets []DatasetItem `json:"datasets"`
Runtime RuntimeStatus `json:"runtime"`
}
type DatasetItem ¶
type DatasetItem struct {
Dataset Dataset `json:"dataset"`
Download DatasetDownload `json:"download"`
}
type DatasetRun ¶
type DatasetRun struct {
ReportID string `json:"report_id"`
Dataset Dataset `json:"dataset"`
Status string `json:"status"`
Stage string `json:"stage"`
Total int `json:"total"`
Completed int `json:"completed"`
Failed int `json:"failed"`
InFlight int `json:"in_flight"`
Metrics []Metric `json:"metrics"`
Provenance *Provenance `json:"provenance"`
ErrorCode string `json:"error_code"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
}
type DatasetRuntime ¶
type DatasetRuntime interface {
DatasetKey(string) string
DownloadDataset(context.Context, string, string, func(DatasetTransfer) error) error
}
DatasetRuntime only prepares registered task data; it receives no model key.
type DatasetTransfer ¶
type Dependencies ¶
type Event ¶
type Event struct {
SchemaVersion int `json:"schema_version"`
RunID string `json:"run_id"`
ReportID string `json:"report_id"`
Sequence int `json:"sequence"`
Kind string `json:"kind"`
Total int `json:"total"`
Completed int `json:"completed"`
Failed int `json:"failed"`
InFlight int `json:"in_flight"`
Sample *Sample `json:"sample"`
Status string `json:"status"`
Metrics []Metric `json:"metrics"`
Provenance *Provenance `json:"provenance"`
Code string `json:"code"`
}
type Options ¶
type Options struct {
SampleLimit int `json:"sample_limit"`
Epochs int `json:"epochs"`
MaxTokens int `json:"max_tokens"`
Concurrency int `json:"concurrency"`
TimeoutSeconds int `json:"timeout_seconds"`
Temperature *float64 `json:"temperature"`
Seed int `json:"seed"`
Stream bool `json:"stream"`
ReasoningEffort string `json:"reasoning_effort"`
}
type Provenance ¶
type Provenance struct {
InspectAI string `json:"inspect_ai"`
InspectEvals string `json:"inspect_evals"`
Task string `json:"task"`
TaskVersion string `json:"task_version"`
DatasetName string `json:"dataset_name"`
DatasetLocation string `json:"dataset_location"`
InputSHA256 string `json:"input_sha256"`
}
type ResolvedConnection ¶
func DirectConnection ¶
func DirectConnection(_ context.Context, connection Connection) (ResolvedConnection, error)
type Resolver ¶
type Resolver func(context.Context, Connection) (ResolvedConnection, error)
type RuntimeStatus ¶
type Sample ¶
type Sample struct {
ID string `json:"id"`
Epoch int `json:"epoch"`
Status string `json:"status"`
Scores []Score `json:"scores"`
Input string `json:"input"`
Target string `json:"target"`
Output string `json:"output"`
InputTokens int64 `json:"input_tokens"`
OutputTokens int64 `json:"output_tokens"`
DurationMS int64 `json:"duration_ms"`
ErrorCode string `json:"error_code"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) DatasetInventory ¶
func (s *Service) DatasetInventory() (DatasetInventory, error)
func (*Service) FindReport ¶
func (*Service) ManageDataset ¶
func (s *Service) ManageDataset(id, action string) (DatasetDownload, error)
type StartCommand ¶
type StartCommand struct {
DatasetIDs []string `json:"dataset_ids"`
Connection Connection `json:"connection"`
Options Options `json:"options"`
}
func (StartCommand) GoString ¶
func (StartCommand) GoString() string
func (StartCommand) String ¶
func (StartCommand) String() string
type WorkerRequest ¶
type WorkerRequest struct {
SchemaVersion int `json:"schema_version"`
RunID string `json:"run_id"`
ReportID string `json:"report_id"`
DatasetID string `json:"dataset_id"`
Protocol domain.Protocol `json:"protocol"`
Model string `json:"model"`
BaseURL string `json:"base_url"`
APIKey string `json:"api_key"`
Options Options `json:"options"`
LogDir string `json:"log_dir"`
CacheDir string `json:"cache_dir,omitempty"`
}
func (WorkerRequest) GoString ¶
func (WorkerRequest) GoString() string
func (WorkerRequest) String ¶
func (WorkerRequest) String() string
Click to show internal directories.
Click to hide internal directories.