dataset

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MonitorDataSourceIntervalSeconds is interval time of monitoring data source
	MonitorDataSourceIntervalSeconds = 60
	// KindName is kind of dataset resource
	KindName = "dataset"
	// CSVFormat is commas separated value format with a extra header.
	// It can be used in structured data scenarios.
	CSVFormat = "csv"
	// TXTFormat is line separated format.
	// It can be used in unstructured data scenarios.
	TXTFormat = "txt"
)

Variables

This section is empty.

Functions

func GetSamples

func GetSamples(url string) ([]string, error)

GetSamples gets samples in a file

Types

type DataSource

type DataSource struct {
	TrainSamples    []string
	NumberOfSamples int
	Header          string
}

DataSource defines config for data source

type Dataset

type Dataset struct {
	*sednav1.Dataset
	DataSource *DataSource `json:"dataSource"`
	Done       chan struct{}
	URLPrefix  string
	Storage    storage.Storage
}

Dataset defines config for dataset

type Manager

type Manager struct {
	Client            clienttypes.ClientI
	DatasetMap        map[string]*Dataset
	VolumeMountPrefix string
}

DatasetManager defines dataset manager

func New

New creates a dataset manager

func (*Manager) AddWorkerMessage

func (dm *Manager) AddWorkerMessage(message workertypes.MessageContent)

func (*Manager) Delete

func (dm *Manager) Delete(message *clienttypes.Message) error

Delete deletes dataset config in db

func (*Manager) GetDataset

func (dm *Manager) GetDataset(name string) (*Dataset, bool)

GetDatasetChannel gets dataset

func (*Manager) GetName

func (dm *Manager) GetName() string

func (*Manager) Insert

func (dm *Manager) Insert(message *clienttypes.Message) error

Insert inserts dataset to db

func (*Manager) Start

func (dm *Manager) Start() error

Start starts dataset manager

Jump to

Keyboard shortcuts

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