train

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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