Correct SDK symbols and CLI commands against the API reference - #28
Merged
Conversation
Audited every flyte.* symbol and `flyte` CLI command/option/arg in the skills
against the official SDK and CLI API references (and the installed SDK). Fixes:
SDK symbols (verified: each corrected form imports/instantiates):
- flyte.RetryPolicy(min_attempts=) / retry_policy= -> flyte.RetryStrategy(count=)
on @env.task(retries=...) [flyte-sdk-optimize]
- flyte.TypeEngine.register -> flyte.types.TypeEngine.register, and
`from flyte.extend import TypeTransformer, DefaultMappingTypeTransformer`
-> `from flyte.types import TypeTransformer` (extend has neither) [flyte-sdk-types]
- flyte.Image.from_image(...) -> flyte.Image.from_base(...) [app, ship, ml: 14x]
- flyte.AppEndpoint("x") -> flyte.app.AppEndpoint(app_name="x") [flyte-sdk-app]
- flyte.Parameter.mount(...)/.env_var(...) (not real factories) ->
flyte.app.Parameter(name=..., mount=.../env_var=...) [flyte-sdk-app]
- flyte.ScalingConfig(min_replicas/max_replicas/target_cpu/...) ->
flyte.app.Scaling(replicas=(1,10), scaledown_after=timedelta(...)) [flyte-sdk-app]
- flyte.abort(run) -> run.abort(); removed flyte.logs(run) and the invalid
caching=flyte.CachingOptions(...) kwarg on with_runcontext [flyte-sdk-run]
CLI commands/options (the real tree is `flyte <verb> <noun>`):
- flyte run list/get/watch -> flyte get run; flyte run outputs/download ->
flyte get io; flyte logs -> flyte get logs (--no-system -> --filter-system,
dropped nonexistent --raw); flyte abort <run> -> flyte abort run <run> [flyte-sdk-run]
- flyte app get -> flyte get app; flyte activate/deactivate ->
flyte update app --activate/--deactivate; flyte secret create ->
flyte create secret [flyte-sdk-app]
- flyte trigger create <task> --cron -> flyte create trigger <task> <name>
--schedule [flyte-sdk-agent]
Verified: top-level + deeper-path symbol audit clean, all corrected constructors
instantiate against the installed SDK, static lint 20/20.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #25/#27. Audited every
flyte.*symbol andflyteCLI command/option/arg used in the skills against the official SDK and CLI API references, cross-checked against the installed SDK. Found a batch of symbols/commands that don't exist or have the wrong shape — agents following them generate non-working code.SDK symbols
Each corrected form was verified to import and instantiate against the SDK.
flyte.RetryPolicy(min_attempts=3)+retry_policy=@env.task(retries=flyte.RetryStrategy(count=3))flyte.TypeEngine.registerflyte.types.TypeEngine.registerfrom flyte.extend import TypeTransformer, DefaultMappingTypeTransformerfrom flyte.types import TypeTransformer(extend exports neither;DefaultMappingTypeTransformerdoesn't exist)flyte.Image.from_image(...)×14flyte.Image.from_base(...)flyte.AppEndpoint("x")flyte.app.AppEndpoint(app_name="x")(kw-only)flyte.Parameter.mount(...)/.env_var(...)flyte.app.Parameter(name=..., mount=... / env_var=...)(those aren't factory methods — they're constructor kwargs)flyte.ScalingConfig(min_replicas=, max_replicas=, target_cpu_utilization=, idle_ttl=, scale_down_delay=)flyte.app.Scaling(replicas=(1, 10), scaledown_after=timedelta(minutes=10))flyte.abort(run)run.abort()flyte.logs(run)flyte get logscaching=flyte.CachingOptions(...)onwith_runcontextCLI commands
The real tree is
flyte <verb> <noun>(e.g.flyte get run), notflyte <noun> <verb>.flyte run list/run get/run watchflyte get run [NAME]flyte run outputs/run downloadflyte get io RUN_NAMEflyte logs(--no-system,--raw)flyte get logs(--filter-system; dropped nonexistent--raw)flyte abort <run>flyte abort run <run>flyte app getflyte get appflyte activate/flyte deactivateflyte update app <name> --activate/--deactivateflyte secret createflyte create secretflyte trigger create <task> --cronflyte create trigger <task> <name> --scheduleVerification
flyte.*symbol audit across all 20 skills: clean.RetryStrategy,Image.from_base,app.AppEndpoint,app.Parameter,app.Scaling,types.TypeEngine.register).ast.parse).Notes / not in scope
kubectl -n flyte logsare false positives (flyteis the k8s namespace), left as-is.TypeTransformersave/load interface, or the exactparameters=container shape for app envs) beyond making the referenced symbols correct — those would be a deeper semantic pass if desired.🤖 Generated with Claude Code