train

package
v0.2.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusCreated    = "Created"
	StatusProcessing = "Processing"
	StatusCompleted  = "Completed"
	StatusFailed     = "Failed" // Added for handling failure cases
)

Task statuses

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	ID               string
	DataPath         string
	TrainingDataPath string
	Status           string
}

Task represents a task with an ID, data path, training data path, and status

type TrainManager

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

TrainManager manages tasks.

func NewTrainManager

func NewTrainManager() *TrainManager

NewTrainManager initializes a new TrainManager

func (*TrainManager) CreateTask

func (tm *TrainManager) CreateTask(ctx context.Context, dataPath, trainingDataPath string) (string, error)

CreateTask creates a new task and returns its ID

func (*TrainManager) GetTaskStatus

func (tm *TrainManager) GetTaskStatus(ctx context.Context, taskID string) (string, error)

GetTaskStatus retrieves the status of a task by its ID

Jump to

Keyboard shortcuts

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