types

package
v0.0.0-...-42fb9ca Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidComputeRemoteTypes = []ComputeRemoteType{
	Firefly,
	EC2,
}
View Source
var ValidWorkspacePersistenceRemoteTypes = []WorkspacePersistenceRemoteType{
	S3,
}

Functions

This section is empty.

Types

type AddSecurityGroupPermissionsAPI

type AddSecurityGroupPermissionsAPI interface {
	AuthorizeSecurityGroupIngress(ctx context.Context,
		params *ec2.AuthorizeSecurityGroupIngressInput,
		optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
}

type AssociateRouteTableAPI

type AssociateRouteTableAPI interface {
	AssociateRouteTable(ctx context.Context,
		params *ec2.AssociateRouteTableInput,
		optFns ...func(*ec2.Options)) (*ec2.AssociateRouteTableOutput, error)
}

type AttachInternetGatewayAPI

type AttachInternetGatewayAPI interface {
	AttachInternetGateway(ctx context.Context,
		params *ec2.AttachInternetGatewayInput,
		optFns ...func(*ec2.Options)) (*ec2.AttachInternetGatewayOutput, error)
}

type ComputeRemoteConfiguration

type ComputeRemoteConfiguration struct {
	Type                 ComputeRemoteType                 `mapstructure:"type" json:"type"`
	FireflyConfiguration FireflyComputeRemoteConfiguration `mapstructure:"firefly" json:"firefly"`
	EC2Configuration     EC2ComputeRemoteConfiguration     `mapstructure:"ec2" json:"ec2"`
	JupyterAPIKey        string                            `mapstructure:"jupyter_api_key" json:"jupyter_api_key"`
}

type ComputeRemoteType

type ComputeRemoteType string
const (
	EC2     ComputeRemoteType = "ec2"
	Firefly ComputeRemoteType = "firefly"
)

type Configuration

type Configuration struct {
	SchemaVersion               string                                             `mapstructure:"schema_version" json:"schema_version"`
	ComputeRemotes              map[string]ComputeRemoteConfiguration              `mapstructure:"compute_remotes" json:"compute_remotes"`
	WorkspacePersistenceRemotes map[string]WorkspacePersistenceRemoteConfiguration `mapstructure:"workspace_remotes" json:"workspace_remotes"`
}

type CreateInternetGatewayAPI

type CreateInternetGatewayAPI interface {
	CreateInternetGateway(ctx context.Context,
		params *ec2.CreateInternetGatewayInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateInternetGatewayOutput, error)
}

type CreateKeyPairAPI

type CreateKeyPairAPI interface {
	CreateKeyPair(ctx context.Context,
		params *ec2.CreateKeyPairInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateKeyPairOutput, error)
}

type CreateRouteAPI

type CreateRouteAPI interface {
	CreateRoute(ctx context.Context,
		params *ec2.CreateRouteInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateRouteOutput, error)
}

type CreateRouteTableAPI

type CreateRouteTableAPI interface {
	CreateRouteTable(ctx context.Context,
		params *ec2.CreateRouteTableInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateRouteTableOutput, error)
}

type CreateSecurityGroupAPI

type CreateSecurityGroupAPI interface {
	CreateSecurityGroup(ctx context.Context,
		params *ec2.CreateSecurityGroupInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateSecurityGroupOutput, error)
}

type CreateServerOptions

type CreateServerOptions struct {
	Profile string `json:"profile"`
}

type CreateSubnetAPI

type CreateSubnetAPI interface {
	CreateSubnet(ctx context.Context,
		params *ec2.CreateSubnetInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateSubnetOutput, error)
}

type CreateVpcAPI

type CreateVpcAPI interface {
	CreateVpc(ctx context.Context,
		params *ec2.CreateVpcInput,
		optFns ...func(*ec2.Options)) (*ec2.CreateVpcOutput, error)
}

type DeleteInternetGatewayAPI

type DeleteInternetGatewayAPI interface {
	DeleteInternetGateway(ctx context.Context,
		params *ec2.DeleteInternetGatewayInput,
		optFns ...func(*ec2.Options)) (*ec2.DeleteInternetGatewayOutput, error)
}

type DeleteKeyPairAPI

type DeleteKeyPairAPI interface {
	DeleteKeyPair(ctx context.Context,
		params *ec2.DeleteKeyPairInput,
		optFns ...func(*ec2.Options)) (*ec2.DeleteKeyPairOutput, error)
}

type DeleteRouteTableAPI

type DeleteRouteTableAPI interface {
	DeleteRouteTable(ctx context.Context,
		params *ec2.DeleteRouteTableInput,
		optFns ...func(*ec2.Options)) (*ec2.DeleteRouteTableOutput, error)
}

type DeleteSecurityGroupAPI

type DeleteSecurityGroupAPI interface {
	DeleteSecurityGroup(ctx context.Context,
		params *ec2.DeleteSecurityGroupInput,
		optFns ...func(*ec2.Options)) (*ec2.DeleteSecurityGroupOutput, error)
}

type DeleteSubnetAPI

type DeleteSubnetAPI interface {
	DeleteSubnet(ctx context.Context,
		params *ec2.DeleteSubnetInput,
		optFns ...func(*ec2.Options)) (*ec2.DeleteSubnetOutput, error)
}

type DeleteVpcAPI

type DeleteVpcAPI interface {
	DeleteVpc(ctx context.Context,
		params *ec2.DeleteVpcInput,
		optFns ...func(*ec2.Options)) (*ec2.DeleteVpcOutput, error)
}

type DeployModelOptions

type DeployModelOptions struct {
	APIKey   string
	HostPort string
}

type DescribeInternetGatewaysAPI

type DescribeInternetGatewaysAPI interface {
	DescribeInternetGateways(ctx context.Context,
		params *ec2.DescribeInternetGatewaysInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeInternetGatewaysOutput, error)
}

type DescribeKeyPairsAPI

type DescribeKeyPairsAPI interface {
	DescribeKeyPairs(ctx context.Context,
		params *ec2.DescribeKeyPairsInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeKeyPairsOutput, error)
}

type DescribeRouteTablesAPI

type DescribeRouteTablesAPI interface {
	DescribeRouteTables(ctx context.Context,
		params *ec2.DescribeRouteTablesInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeRouteTablesOutput, error)
}

type DescribeSecurityGroupsAPI

type DescribeSecurityGroupsAPI interface {
	DescribeSecurityGroups(ctx context.Context,
		params *ec2.DescribeSecurityGroupsInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error)
}

type DescribeSubnetsAPI

type DescribeSubnetsAPI interface {
	DescribeSubnets(ctx context.Context,
		params *ec2.DescribeSubnetsInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error)
}

type DescribeVpcsAPI

type DescribeVpcsAPI interface {
	DescribeVpcs(ctx context.Context,
		params *ec2.DescribeVpcsInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error)
}

type DetachInternetGatewayAPI

type DetachInternetGatewayAPI interface {
	DetachInternetGateway(ctx context.Context,
		params *ec2.DetachInternetGatewayInput,
		optFns ...func(*ec2.Options)) (*ec2.DetachInternetGatewayOutput, error)
}

type DisassociateRouteTableAPI

type DisassociateRouteTableAPI interface {
	DisassociateRouteTable(ctx context.Context,
		params *ec2.DisassociateRouteTableInput,
		optFns ...func(*ec2.Options)) (*ec2.DisassociateRouteTableOutput, error)
}

type DockerOptions

type DockerOptions struct {
	HostPort  int
	LocalOnly bool
}

type DownloadFileResponse

type DownloadFileResponse struct {
	Content string `json:"content"`
}

type EC2ComputeRemoteConfiguration

type EC2ComputeRemoteConfiguration struct {
	Profile   string `mapstructure:"profile" json:"profile"`
	AccessKey string `mapstructure:"access_key" json:"access_key"`
	Secret    string `mapstructure:"secret" json:"secret"`
	Region    string `mapstructure:"region" json:"region"`
	Token     string `mapstructure:"token" json:"token"`
}

type EC2CreateInstanceAPI

type EC2CreateInstanceAPI interface {
	RunInstances(ctx context.Context,
		params *ec2.RunInstancesInput,
		optFns ...func(*ec2.Options)) (*ec2.RunInstancesOutput, error)
}

type EC2DescribeInstancesAPI

type EC2DescribeInstancesAPI interface {
	DescribeInstances(ctx context.Context,
		params *ec2.DescribeInstancesInput,
		optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error)
}

type EC2StartOptions

type EC2StartOptions struct {
	InstanceType string
	AmiId        string
}

type FireflyComputeRemoteConfiguration

type FireflyComputeRemoteConfiguration struct {
	Url      string `mapstructure:"url" json:"url"`
	HubToken string `mapstructure:"hub_token" json:"hub_token"`
	Username string `mapstructure:"username" json:"username"`
}

type INotebookService

type INotebookService interface {
	Start(jupyterOptions JupyterLaunchOptions, ec2Options EC2StartOptions, syncOptions WorkspaceSyncOptions)
	List()
	Stop(mountPointOrIdentifier string)
	UploadTrainingJobData()
	WaitForTrainingToComplete(timeout int)
	DownloadHyperpack()
}

type IWorkspaceService

type IWorkspaceService interface {
	Sync(localPath string, watch bool, studyName string)
	Pull(localPath string, studyName string)
	Pack(studyName string, packPath string)
}

type ImageOptions

type ImageOptions struct {
	Image   string
	RepoTag string
	Profile string
}

type ImportKeyPairAPI

type ImportKeyPairAPI interface {
	ImportKeyPair(ctx context.Context,
		params *ec2.ImportKeyPairInput,
		optFns ...func(*ec2.Options)) (*ec2.ImportKeyPairOutput, error)
}

type JupyterLaunchOptions

type JupyterLaunchOptions struct {
	Flavor        string
	APIKey        string
	HostPort      int
	PullImage     bool
	LaunchBrowser bool
	Requirements  bool
	RestartAlways bool
	S3AwsProfile  string
}

type ListServersResponse

type ListServersResponse struct {
	Admin        bool                  `json:"admin"`
	AuthState    interface{}           `json:"auth_state"`
	Created      time.Time             `json:"created"`
	Groups       []interface{}         `json:"groups"`
	Kind         string                `json:"kind"`
	LastActivity time.Time             `json:"last_activity"`
	Name         string                `json:"name"`
	Pending      interface{}           `json:"pending"`
	Server       interface{}           `json:"server"`
	Servers      map[string]ServerInfo `json:"servers"`
}

type Manifest

type Manifest struct {
	StudyName   string `yaml:"study_name"`
	ModelFlavor string `yaml:"model_flavor"`
	ProjectName string `yaml:"project_name"`
	Training    struct {
		Data struct {
			Features struct {
				Source string `yaml:"source"`
			} `yaml:"features"`
			Target struct {
				Source string `yaml:"source"`
			} `yaml:"target"`
		} `yaml:"data"`
	} `yaml:"training"`
}

type ModifySubnetAttributeAPI

type ModifySubnetAttributeAPI interface {
	ModifySubnetAttribute(ctx context.Context,
		params *ec2.ModifySubnetAttributeInput,
		optFns ...func(*ec2.Options)) (*ec2.ModifySubnetAttributeOutput, error)
}

type NamedProfileConfiguration

type NamedProfileConfiguration struct {
	AccessKey string
	Secret    string
	Token     string
	Region    string
}

type RemoteStatus

type RemoteStatus struct {
	Message string `json:"message"`
}

type S3Credentials

type S3Credentials struct {
	AccessKey    string
	AccessSecret string
	Region       string
}

type S3WorkspacePersistenceRemoteConfiguration

type S3WorkspacePersistenceRemoteConfiguration struct {
	Profile    string `mapstructure:"profile" json:"profile"`
	BucketName string `mapstructure:"bucket_name" json:"bucket_name"`
	AccessKey  string `mapstructure:"access_key" json:"access_key"`
	Secret     string `mapstructure:"secret" json:"secret"`
	Region     string `mapstructure:"region" json:"region"`
	Token      string `mapstructure:"token" json:"token"`
}

func (S3WorkspacePersistenceRemoteConfiguration) IsValid

type ServerInfo

type ServerInfo struct {
	LastActivity time.Time   `json:"last_activity"`
	Name         string      `json:"name"`
	Pending      interface{} `json:"pending"`
	ProgressURL  string      `json:"progress_url"`
	Ready        bool        `json:"ready"`
	Started      time.Time   `json:"started"`
	State        struct {
		PodName string `json:"pod_name"`
	} `json:"state"`
	URL         string   `json:"url"`
	UserOptions struct{} `json:"user_options"`
}

type TerminateInstancesAPI

type TerminateInstancesAPI interface {
	TerminateInstances(ctx context.Context,
		params *ec2.TerminateInstancesInput,
		optFns ...func(*ec2.Options)) (*ec2.TerminateInstancesOutput, error)
}

type TrainingStatus

type TrainingStatus string

type UploadDataBody

type UploadDataBody struct {
	Content  string       `json:"content"`
	Format   UploadFormat `json:"format"`
	FileType UploadType   `json:"type"`
}

type UploadFormat

type UploadFormat string

type UploadType

type UploadType string

type WorkspacePersistenceRemoteConfiguration

type WorkspacePersistenceRemoteConfiguration struct {
	Type            WorkspacePersistenceRemoteType            `mapstructure:"type" json:"type"`
	S3Configuration S3WorkspacePersistenceRemoteConfiguration `mapstructure:"s3" json:"s3"`
}

type WorkspacePersistenceRemoteType

type WorkspacePersistenceRemoteType string
const (
	S3 WorkspacePersistenceRemoteType = "s3"
)

type WorkspaceSyncOptions

type WorkspaceSyncOptions struct {
	StudyName string
	S3Config  S3WorkspacePersistenceRemoteConfiguration
}

Jump to

Keyboard shortcuts

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