Podcast

Aggressively Helpful Platform Teams

Stefan Krawczyk, Stitch FixEpisode 49 · 51:52 · Aug 2021 · 381 views
Thumbnail for Aggressively Helpful Platform Teams Watch on YouTube
TL;DR
  1. 1

    Stitch Fix gives full-stack data scientists ownership of their work from business problem through production, then reduces their engineering burden with platform abstractions.

  2. 2

    Hamilton lets teams define dataframe columns as functions, from which the framework builds a directed acyclic graph and the resulting dataframe.

  3. 3

    Model Envelope packages a model with its inputs, outputs, dependencies, and metadata so a few configuration choices can trigger deployment through an API or batch workflow.

Summary

Stefan Krawczyk describes how Stitch Fix supports more than 130 full-stack data scientists who build and own production data products. The Data Platform team tries to preserve their autonomy while removing repeated engineering work. Its approach is to understand how teams work, find painful steps, and build abstractions with an initial partner team. Hamilton addresses dataframe generation for time-series forecasting by turning functions into a dependency graph and dataframe. Model Envelope packages serialized models, captures their API signature and environment, and uses tags and queries to decide when a model is eligible for deployment. Stefan is candid about the limits. Platform teams have difficulty measuring time saved because teams and models differ, so his team tracks adoption, deployed services, team penetration, and user willingness to recommend the tools. The conversation also covers the risks of giving scientists broad access, including accidentally starting a thousand jobs and needing more API review.

Key ideas
04:32

Stitch Fix keeps data scientists responsible for the full path to production

When Stefan joined Stitch Fix, data scientists were expected to prototype, build ETL, productionize the result, and get it running in production. Data Platform later added platforms and abstractions, so data scientists still decide what to build and retain autonomy while writing less supporting code. Stefan connects this model to faster iteration: one person can talk to the business partner, define the problem, build the solution, and get feedback without waiting for several handoffs. His lifecycle team wants to reduce model productionization to configuration, with no code where possible.

07:02

Autonomy requires experimentation, measurement, and business accountability

Stitch Fix has more than 130 full-stack data scientists, so Stefan says the company needs a first-class online experimentation system. It must support concurrent A/B tests so teams do not interfere with one another when several models reach production. Offline work still needs analysis, documentation, and sharing. Stefan also connects model work to business objectives and key results, so teams can see whether their work moves a business goal. He says model duplication has not seriously blocked Stitch Fix because models are often isolated to a team or vertical, although shared features and tables create a stronger need for reuse and central definitions.

13:01

Platform teams should start with a painful workflow and build with its users

Stefan's team works for data scientists and is usually not on a critical product delivery path. That gives it room to start new platform work without being tied to existing implementation choices. The team first communicates a vision, then studies the data science process to find the most valuable abstractions. Its first major step was outside modeling: it made backend APIs easier to create by wrapping FastAPI and letting users think in terms of functions. Combined with experimentation, this made production experiments easier. The team then moved toward models after learning that automatic deployment required a clear definition of a model, its dependencies, and its input schema.

27:06

Hamilton turns dataframe construction into a function graph

Hamilton was built for Stitch Fix's Forecasting, Estimation, and Demand team, which needed wide dataframes for time-series forecasting. Stefan says managing thousands of dataframe columns in ordinary code became cumbersome. Hamilton changes the working style: team members write functions, the framework derives a directed acyclic graph from those functions, and it builds the dataframe. The name refers to Alexander Hamilton, the team's nickname, and Hamiltonian graph concepts. Stefan describes it as a micro-framework for creating dataframes. At the time of the episode, the team was working through the internal process needed to open source it.

28:52

Model Envelope separates saving a model from deciding to deploy it

Stefan describes Model Envelope as a container for a model and the information needed to ship it. A data scientist saves the model through an API, which places it in a registry, then provides configuration or clicks through a few steps to deploy it through an API or batch workflow. The envelope captures the model's inputs, outputs, and runtime environment. Saving does not require an immediate production decision. A model can be stored first and deployed later. This separation lets the platform inspect the model and generate a simple service without embedding business logic in the model deployment path.

32:29

Model signatures and environment capture reduce deployment maintenance

Model Envelope is designed to work across Stitch Fix's different modeling approaches, including time-series forecasting, neural networks, matrix factorization, logistic and linear regression, constraint optimization, and simulation. Stefan says a model can begin as a serializable Python function. The framework can inspect primitive function parameters, or use example data for dataframe inputs, to determine the model signature. If a new feature becomes a new function parameter, the updated signature can be captured automatically. Missing production input should then produce an HTTP 400 response. The framework also captures Python dependencies and the runtime version, although it assumes a shared Linux base rather than recording every underlying system dependency.

40:21

Tags turn model validation into an automatic deployment decision

Model Envelope makes tags and metrics immutable for each saved model while allowing tags to be updated. Stitch Fix uses queries over model properties and tags to decide whether a model qualifies for deployment. A team can save a model, run validation or scoring in a separate step, then add a tag that marks the model as suitable for deployment. A rule watching for that tag can trigger the deployment. Tags also let teams find their own models without imposing one hierarchy on the company. The platform can use a tag query to select the latest model for a batch workflow, or use a specific model instance identifier.

47:47

Platform success is measured through adoption because time savings are hard to isolate

Stefan does not give a simple time-to-production number. Stitch Fix's data scientists build different models and have different levels of experience, which makes direct comparisons difficult. His team instead watches how many teams use the platform, how many services are deployed, and whether adoption grows across quarters. Model counts alone can mislead because backtesting can create a thousand models in a day. Stefan also treats positive user feedback as evidence: teams that use Model Envelope tell the platform team that it removed part of their process pain. He admits that a more precise measure would be useful but remains difficult to collect.

"We wanted them to focus on the model and then when they want to take it to production, we just need to know what the model is and what the API inputs are required."31:12
Who should watch
  • You are building an internal platform for data scientists and need a way to reduce handoffs without taking away ownership.
  • Your team is deciding whether model deployment should be tied to model saving, validation, or a later release decision.
  • You need practical examples of platform adoption metrics when direct measurements of engineering time are unreliable.