Posts

Kubernetes for ML Engineering, Part 2: Isolation — Networking and RBAC

Isolation boundaries in a shared Kubernetes cluster, who can reach what on the network, and who can do what against the API server.

Kubernetes for ML Engineering, Part 1: Why, and Two Services Talking

Why I’m learning Kubernetes for ML engineering, and getting two services talking on a local cluster.

Correlation IDs and Request Lineage Across Services

When a scientist says a dashboard was slow this morning, our logs couldn’t tell us which requests were theirs. I built a request context, stored in a ContextVar and forwarded as HTTP headers, that stamps request, session, user, and service IDs onto every log line. The post covers the middleware, why a logging filter beats a LoggerAdapter, and fixes for noisy health checks and unhelpful 403s.

Service-to-Service Auth with Cognito Scopes

Why we replaced a shared bearer token with Cognito’s client-credentials flow, so each service has its own identity and each endpoint requires a specific scope. Covers resource servers, custom scopes, token validation, and a couple of ALB rule gotchas.

Deploying Dagster to AWS ECS, Part 2: Pipelines

The per-pipeline Terraform module that plugs into the platform, with two task definitions per pipeline, Cloud Map registration so the daemon can find each code server, four IAM roles, and secrets handling.

Deploying Dagster to AWS ECS, Part 1: The Platform

The long-lived half of our Dagster deployment on AWS ECS: the daemon, read-only and admin webservers behind a Cognito-authenticated ALB, and the Terraform that ties them together. Most of the post is about networking, security groups, service discovery, and IAM, which is where most of my time went. Written for anyone running Dagster without Dagster+.

CI/CD Part 2: Docker Images and Container Registries

A three-stage Dockerfile for a Python app, and CI jobs that push the image to Gitlab’s container registry and AWS ECR.

CI/CD Part 1: Gitlab Pipelines and Package Registries

How a .gitlab-ci.yml file is put together, how to make jobs run only on certain merge request events, and how to set up .pypirc and .netrc tokens so a pipeline can build a Python package and push it to a Gitlab package registry.

Entropy and Mutual Information

A review of entropy, conditional entropy, and mutual information, with the basic proofs. I then set up how I plan to use mutual information to relate spatial mappings between cortical regions to their temporal coupling.

Jumping-Knowledge Representation Learning With LSTMs

Jumping knowledge networks let each node combine embeddings from every layer, so the effective neighborhood size can vary across the graph. I explain the influence distribution argument and the LSTM attention aggregator. Then I apply a jumping knowledge GAT to cortical segmentation, where it holds up better than a plain GAT as depth increases.