In this article
Local mode tests code in the current interpreter; container execution supplies a separate validation boundary even when the backend runs on the same laptop.
The laptop supplies an undeclared dependency
A preprocessing task passes locally because its interpreter already contains a tokenizer package. Its configured container omits that package, so the same task fails after submission to a backend. The local result was valid evidence about Python logic, but it did not exercise the software environment declared for container execution.
This guide concerns Flyte 2 and its TaskEnvironment model. Establish the SDK generation before following examples: older flytekit task and workflow patterns describe a different programming interface and should not be mixed silently with this one.
Local and remote describe execution boundaries
The run-mode guide defines local execution as running inside the current Python process without a container. Remote execution uses a backend and container scheduling. A devbox can be remote in this sense while physically running on the developer’s own machine.
That terminology matters when diagnosing missing files or packages. Physical distance is not the decisive distinction; crossing into another runtime environment is. A container on the same laptop can expose undeclared dependencies that an in-process call hides.
The environment is a declaration to validate
The TaskEnvironment guide separates hardware resources from software image configuration. Review both for a model task. Available host memory does not establish accelerator memory, and a task function’s successful import locally does not establish the contents of its image.
Connect the model’s runtime artifacts through an artifact release manifest. Code, weights and tokenizer configuration can all be individually available yet incompatible when assembled in a different environment.
Launch mode and code version are separate choices
The task launch guide distinguishes temporary preparation from executing a permanently deployed task. Confirm which code version the test exercised as well as where it ran. A container test of an earlier deployment cannot validate an unsubmitted local edit.
Record the selected task identity, image and input artifact together. This allows a later reviewer to separate a packaging defect from changed model behavior or an input mismatch.
Use complementary evidence
Keep the fast local test for transformation logic, then perform a small container run that imports the intended dependencies and reads the real artifact format. The tests answer different questions and can both be useful.
Finally examine CPU and GPU responsibilities for the actual workload. A successful container startup is a necessary runtime observation, but it does not itself prove that accelerator initialization or representative inference succeeded.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.