ray

package
v1.0.61 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const (
	KindRayJob       = "RayJob"
	IncludeDashboard = "include-dashboard"
	NodeIPAddress    = "node-ip-address"
	DashboardHost    = "dashboard-host"
)

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(cfg *Config) error

Types

type Config

type Config struct {
	// ShutdownAfterJobFinishes will determine whether to delete the ray cluster once rayJob succeed or failed
	ShutdownAfterJobFinishes bool `json:"shutdownAfterJobFinishes,omitempty"`

	// TTLSecondsAfterFinished is the TTL to clean up RayCluster.
	// It's only working when ShutdownAfterJobFinishes set to true.
	TTLSecondsAfterFinished int32 `json:"ttlSecondsAfterFinished,omitempty"`

	// Kubernetes Service Type, valid values are 'ClusterIP', 'NodePort' and 'LoadBalancer'
	ServiceType string `json:"serviceType,omitempty"`

	// IncludeDashboard is used to start a Ray Dashboard if set to true
	IncludeDashboard bool `json:"includeDashboard,omitempty"`

	// DashboardHost the host to bind the dashboard server to, either localhost (127.0.0.1)
	// or 0.0.0.0 (available from all interfaces). By default, this is localhost.
	DashboardHost string `json:"dashboardHost,omitempty"`

	// NodeIPAddress the IP address of the head node. By default, this is pod ip address.
	NodeIPAddress string `json:"nodeIPAddress,omitempty"`

	// Remote Ray Cluster Config
	RemoteClusterConfig pluginmachinery.ClusterConfig `json:"remoteClusterConfig" pflag:"Configuration of remote K8s cluster for ray jobs"`
}

Config is config for 'ray' plugin

func GetConfig

func GetConfig() *Config

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

Jump to

Keyboard shortcuts

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