Skip to content

Commit

Permalink
Rename literal offloading flags and enable offloading in local config (
Browse files Browse the repository at this point in the history
…#5754)

* Rename literal offloading flags and enable offloading in local config

Signed-off-by: Eduardo Apolinario <[email protected]>

* Run `make -C flytepropeller generate`

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario authored Sep 18, 2024
1 parent 312910d commit fd841ba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
2 changes: 2 additions & 0 deletions flyte-single-binary-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ propeller:
create-flyteworkflow-crd: true
kube-config: $HOME/.flyte/sandbox/kubeconfig
rawoutput-prefix: s3://my-s3-bucket/data
literal-offloading-config:
enabled: true

server:
kube-config: $HOME/.flyte/sandbox/kubeconfig
Expand Down
8 changes: 4 additions & 4 deletions flytepropeller/pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,17 @@ type Config struct {
CreateFlyteWorkflowCRD bool `json:"create-flyteworkflow-crd" pflag:",Enable creation of the FlyteWorkflow CRD on startup"`
NodeExecutionWorkerCount int `json:"node-execution-worker-count" pflag:",Number of workers to evaluate node executions, currently only used for array nodes"`
ArrayNode ArrayNodeConfig `json:"array-node-config,omitempty" pflag:",Configuration for array nodes"`
LiteralOffloadingConfig LiteralOffloadingConfig `json:"literalOffloadingConfig" pflag:",config used for literal offloading."`
LiteralOffloadingConfig LiteralOffloadingConfig `json:"literal-offloading-config" pflag:",config used for literal offloading."`
}

type LiteralOffloadingConfig struct {
Enabled bool
// Maps flytekit and union SDK names to minimum supported version that can handle reading offloaded literals.
SupportedSDKVersions map[string]string
SupportedSDKVersions map[string]string `json:"supported-sdk-versions" pflag:",Maps flytekit and union SDK names to minimum supported version that can handle reading offloaded literals."`
// Default, 10Mbs. Determines the size of a literal at which to trigger offloading
MinSizeInMBForOffloading int64
MinSizeInMBForOffloading int64 `json:"min-size-in-mb-for-offloading" pflag:",Size of a literal at which to trigger offloading"`
// Fail fast threshold
MaxSizeInMBForOffloading int64
MaxSizeInMBForOffloading int64 `json:"max-size-in-mb-for-offloading" pflag:",Size of a literal at which to fail fast"`
}

// IsSupportedSDKVersion returns true if the provided SDK and version are supported by the literal offloading config.
Expand Down
8 changes: 4 additions & 4 deletions flytepropeller/pkg/controller/config/config_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions flytepropeller/pkg/controller/config/config_flags_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fd841ba

Please sign in to comment.