sipeed/picoclaw · error
load dataset
Error message
load dataset: %w
What it means
Context wrapper in runIngest around LoadDataset's error: the dataset directory could not be loaded (unreadable dir, unreadable file, or a parse failure — the underlying message distinguishes which). This wrapper only adds the 'load dataset' phase context before the error propagates to the CLI.
Solutions
- Read the wrapped cause to see whether it is the dir read, file read, or parse error and fix that
- Verify --data points at a directory of valid Locomo JSON files
- Ensure the process has read access to every file under --data
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cmd/membench/main.go:142 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/d15a331da1dc5581.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/membench/main.go:142
return []string{"legacy", "seahorse"}
default:
return []string{strings.ToLower(flagMode)}
}
}
func runIngest(cmd *cobra.Command, args []string) error {
if flagData == "" {
return fmt.Errorf("--data is required")
}
modes := modesFromFlag()
if len(modes) == 0 {
return nil
}
ctx := context.Background()
samples, err := LoadDataset(flagData)
if err != nil {
return fmt.Errorf("load dataset: %w", err)
}
log.Printf("Loaded %d samples from %s", len(samples), flagData)
for _, mode := range modes {
switch mode {
case "legacy":
legacy := NewLegacyStore()
for i := range samples {
legacy.IngestSample(&samples[i])
}
log.Printf("legacy: ingested %d samples", len(samples))
case "seahorse":
dbPath := filepath.Join(flagOut, "seahorse.db")
if err := os.MkdirAll(flagOut, 0o755); err != nil {
return fmt.Errorf("create out dir: %w", err)
}
_, err := IngestSeahorse(ctx, samples, dbPath)
if err != nil {View on GitHub (pinned to 49183d7e8d)