migrate

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CogRequirementsFile = "cog_requirements.txt"
View Source
const MigrateV1V1FastPythonFile = "migrate_v1_v1fast.py"

Variables

View Source
var IgnoredRunCommands = map[string]bool{
	"curl -o /usr/local/bin/pget -L \\\"https://github.com/replicate/pget/releases/latest/download/pget_$(uname -s)_$(uname -m)\\\" && chmod +x /usr/local/bin/pget": true,
	"curl -o /usr/local/bin/pget -L \"https://github.com/replicate/pget/releases/latest/download/pget_$(uname -s)_$(uname -m)\" && chmod +x /usr/local/bin/pget":     true,
	"curl -o /usr/local/bin/pget -L \\\"https://github.com/replicate/pget/releases/latest/download/pget_$(uname -s)_$(uname -m)\\\"":                                 true,
	"curl -o /usr/local/bin/pget -L \"https://github.com/replicate/pget/releases/latest/download/pget_$(uname -s)_$(uname -m)\"":                                     true,
	"chmod +x /usr/local/bin/pget": true,
}

Functions

func MigrationToStr

func MigrationToStr(migration Migration) (string, error)

func OverwrightYAML added in v0.14.10

func OverwrightYAML(sourceYaml []byte, destinationYaml []byte) ([]byte, error)

Types

type Migration

type Migration int
const (
	MigrationV1 Migration = iota
	MigrationV1Fast
)

type Migrator

type Migrator interface {
	Migrate(ctx context.Context, configFilename string) error
}

func NewMigrator

func NewMigrator(from Migration, to Migration, interactive bool, logCtx *coglog.MigrateLogContext) (Migrator, error)

type MigratorV1ToV1Fast

type MigratorV1ToV1Fast struct {
	Interactive bool
	// contains filtered or unexported fields
}

func NewMigratorV1ToV1Fast

func NewMigratorV1ToV1Fast(interactive bool, logCtx *coglog.MigrateLogContext) *MigratorV1ToV1Fast

func (*MigratorV1ToV1Fast) Migrate

func (g *MigratorV1ToV1Fast) Migrate(ctx context.Context, configFilename string) error

type PredictorType added in v0.14.10

type PredictorType int
const (
	PredictorTypePredict PredictorType = iota
	PredictorTypeTrain
)

Jump to

Keyboard shortcuts

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