datasets

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDataset

func EnsureDataset(datasetName string) (string, error)

Types

type GSM8KExample

type GSM8KExample struct {
	Question string `json:"question"`
	Answer   string `json:"answer"`
}

func LoadGSM8K

func LoadGSM8K() ([]GSM8KExample, error)

type HotPotQAExample

type HotPotQAExample struct {
	ID              string          `json:"_id"`
	SupportingFacts [][]interface{} `json:"supporting_facts"`
	Context         [][]interface{} `json:"context"`
	Question        string          `json:"question"`
	Answer          string          `json:"answer"`
	Type            string          `json:"type"`
	Level           string          `json:"level"`
}

func LoadHotpotQA

func LoadHotpotQA() ([]HotPotQAExample, error)

type SimpleDataset

type SimpleDataset struct {
	// contains filtered or unexported fields
}

SimpleDataset implements core.Dataset interface for testing and examples.

func NewSimpleDataset

func NewSimpleDataset(examples []core.Example) *SimpleDataset

NewSimpleDataset creates a new SimpleDataset with the given examples.

func (*SimpleDataset) Next

func (sd *SimpleDataset) Next() (core.Example, bool)

Next returns the next example in the dataset.

func (*SimpleDataset) Reset

func (sd *SimpleDataset) Reset()

Reset resets the dataset iterator to the beginning.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL