Skip to content

fix: make feature ingestion spawn-safe - #6465

Open
lucasjia-aws wants to merge 1 commit into
aws:master-v2from
lucasjia-aws:fix/5312-feature-store-spawn-v2
Open

lucasjia-aws wants to merge 1 commit into
aws:master-v2from
lucasjia-aws:fix/5312-feature-store-spawn-v2

Conversation

@lucasjia-aws

@lucasjia-aws lucasjia-aws commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Feature Store pandas ingestion currently uses the pathos processing pool with the platform default start method and local worker callables. Fork mode can deadlock on recent macOS releases, while the local initializer and lambda are unsafe under spawn.

This change supplies an explicit multiprocess spawn context to the pathos pool and moves the initializer and worker wrapper to module scope. Existing amap, restart, close, and clear lifecycle behavior is preserved.

Testing

  • Added coverage for spawn-context wiring, process count, initializer behavior, picklable worker identity, asynchronous results, and pathos cleanup.
  • Ran the complete affected Feature Store unit test file: 58 passed.
  • Spawn, pickling, and lifecycle tests passed with real processes.
  • Black, Flake8, and git diff --check passed.
  • Built the SageMaker 2.257.7 wheel and source distribution successfully.
  • No AWS integration tests or AWS calls were run.

Related change

The companion V3 fix is published on #6464.

Fixes #5312

Create the pathos processing pool with a local multiprocess spawn context and move worker callables to module scope for pickling.

Preserve the existing amap, restart, close, and clear lifecycle.

Fixes aws#5312

This branch was successfully deployed

1 active deployment
auto-approve — 89c51296 Deployed Oct 13, 2026 by lucasjia-aws via wait-for-approval #256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant