Atlas is a terminal-native AI coding agent paired with TensorFlow and Keras 3 in 2026, where tf.function graph tracing and tf.data pipelines are what actually make training fast. You run atlas in a project with a pyproject.toml that pins tensorflow and keras, and Atlas reads your Keras model definitions, tf.data input pipeline, and any custom training_step overrides before it proposes a change.
Why TensorFlow developers use Atlas
TensorFlow developers use Atlas because a slow training run in TensorFlow and Keras 3 is almost never a slow model. Atlas indexes code by AST declarations using tree-sitter, not blind line windows, so your Keras model definitions and any custom training_step overrides are retrieved as declarations.
The two things that decide TensorFlow throughput sit on either side of the model: whether your Python is being traced into a graph by tf.function, and whether your tf.data input pipeline is feeding the accelerator fast enough to keep it busy. Neither shows up as an error. A retracing warning scrolls past, a pipeline stalls between batches, and the run simply takes three times as long as it should. Atlas indexes the model class, its training_step override, and the pipeline construction as separate declarations, which is what lets it reason about the interaction rather than about a file.
Keras models and tf.data pipelines day to day
Day to day, Atlas reads your Keras 3 model definitions, tf.data input pipeline, and any custom training_step overrides. Atlas searches code with hybrid semantic and keyword retrieval fused by reciprocal rank fusion, which is how a layer definition and the pipeline feeding it surface from one question.
A TensorFlow project spreads a single training run across several files: the Keras model, the tf.data pipeline that maps and batches examples, a custom training_step if you subclass, and a script that ties them together. The interesting questions cross all of them. Which map function is running in Python instead of as a graph op? Where does the pipeline materialize the whole dataset in memory? Keyword retrieval pins the literal calls, tf.function, tf.data, prefetch, cache. Semantic retrieval finds the code that behaves like a bottleneck without naming itself one. Fusing both is what makes the answer complete.
Wrapping hot loops in tf.function and killing retracing
Ask Atlas to wrap a hot Python loop in tf.function and explain the retracing warnings it removes, the first thing to fix in a slow TensorFlow training script in 2026. Atlas drafts a plan in a read-only plan agent and asks before switching to a build agent, so the tracing analysis comes before the edit.
tf.function turns Python into a graph, and the graph is where TensorFlow gets fast. The trap is retracing: pass a Python integer instead of a tensor, or vary the input shape, and TensorFlow rebuilds the graph on every call, which is slower than not using tf.function at all. The warning tells you it happened but not why. Atlas reads the function, identifies which arguments are causing the retrace, and explains the fix, whether that is an input_signature, casting a Python value to a tensor, or moving a branch out of the traced body. The plan comes first, then the edit.
Making tf.data feed the accelerator with prefetch and cache
Atlas adds tf.data prefetch and cache stages, then measures the step time before and after. Measuring is the point: in 2026 a TensorFlow input pipeline change that is not measured is a guess, and prefetch overlaps data preparation with training rather than making either step faster on its own.
An accelerator that waits on the input pipeline is idle, and idle hardware is the most expensive thing in a training run. A cache stage keeps a dataset in memory after the first epoch so the expensive parsing and decoding happen once. A prefetch stage lets the pipeline prepare the next batch while the current one trains. The order of the stages matters, and putting cache after an expensive random augmentation destroys the augmentation. Atlas proposes the stage placement against the pipeline it actually read, then measures the step time before and after so the change is justified by a number.
Testing and reviewing TensorFlow changes
Atlas runs pytest behind a permission prompt and formats the diff with black. Every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs, which matters in a Keras 3 repository where a stray command can start a training job on a GPU you are paying for.
Permission rules earn their keep in machine learning work. Allow pytest and let it run freely. Keep anything that launches a full training run, touches a checkpoint directory, or writes to cloud storage behind an ask rule. Atlas computes a unified diff for every file edit and surfaces it for approval before writing, so a change to a training_step or a tf.data pipeline is reviewed before it lands. Atlas snapshots file changes as git patches so edits can be diffed and rolled back, which means an experiment that made things slower is reverted cleanly rather than reconstructed from memory.
Keeping TensorFlow research code private
Atlas can build its code index with local Ollama embeddings, keeping code off third-party servers, which matters in 2026 when your Keras model definitions are the research. Atlas lets you switch the active model and provider on the fly with favorites and recents, so you can pick per task from the terminal.
Indexing a TensorFlow project encodes the model architecture, the training loop, and the data pipeline, which together are the contribution. Running that embedding step against a local Ollama model keeps it in house. Model choice then follows the task: a fast model to add a tf.data prefetch stage or a pytest case, a stronger one to work out why a tf.function is retracing on every call despite an input_signature. Atlas fans out work to subagents that can run in the foreground or in parallel background sessions, so a long analysis does not block the next question.
Getting started
- 01Run atlas in a project with a pyproject.toml that pins tensorflow and keras
- 02Let Atlas read your Keras model definitions, tf.data input pipeline, and any custom training_step overrides
- 03Ask Atlas to wrap a hot Python loop in tf.function and explain the retracing warnings it removes
- 04Let Atlas add tf.data prefetch and cache stages, then measure the step time before and after
- 05Have Atlas run pytest behind a permission prompt and format the diff with black
Frequently asked questions
- can an AI coding agent speed up TensorFlow training?
- Yes. Ask Atlas to wrap a hot Python loop in tf.function and explain the retracing warnings it removes, and to add tf.data prefetch and cache stages, then measure the step time before and after so the change is backed by a number.
- how do I set up Atlas on a TensorFlow project?
- Run atlas in a project with a pyproject.toml that pins tensorflow and keras. Atlas reads your Keras model definitions, tf.data input pipeline, and any custom training_step overrides before proposing an edit.
- why does my tf.function keep retracing?
- Retracing usually means a Python value or a changing input shape is being passed where a tensor with a stable signature is expected. Atlas reads the function, identifies the argument causing the retrace, and explains the fix before editing.
- how do I make a tf.data pipeline faster?
- Let Atlas add tf.data prefetch and cache stages against the pipeline it actually read. Stage order matters, since a cache placed after a random augmentation freezes that augmentation, so Atlas proposes the placement rather than applying a template.
- can Atlas run pytest on a TensorFlow codebase?
- Yes. Atlas runs pytest behind a permission prompt and formats the diff with black. Every tool call is permission-gated against allow, ask, and deny rules, so a full training run never starts without your explicit allow.
- can Atlas index TensorFlow research code without uploading it?
- Yes. Atlas can build its code index with local Ollama embeddings, keeping code off third-party servers, so your Keras model definitions and training pipeline stay on your own hardware.
- does Atlas understand custom Keras training_step overrides?
- Atlas reads any custom training_step overrides as part of the model declaration, which is what lets it reason about the interaction between your training loop, tf.function graph tracing, and the tf.data pipeline feeding it.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Diagnose a Hanging or Long-Running Command in TensorFlow with Atlas in 2026
TensorFlow developers in 2026 can use Atlas to diagnose whether a build or script is genuinely slow or silently blocked on input, getting it unstuck quickly.
Run Atlas Headless in CI with TensorFlow in 2026
Automate TensorFlow model optimization and testing in CI pipelines using Atlas. Learn to run Atlas headless with `uv`, `pytest`, and `black` for machine-readable output in 2026.
Migrate a Deprecated API Across Every Callsite in TensorFlow with Atlas in 2026
Efficiently migrate deprecated TensorFlow APIs across your entire codebase with Atlas. Leverage `lsp`, `todowrite`, and `apply_patch` for a complete, verified transition in 2026.
Audit a TensorFlow Repository with Parallel Subagents in Atlas (2026)
Sweep your TensorFlow and Keras 3 codebase for issues without context window limits. Atlas uses parallel subagents and real tools like pytest and black for efficient, safe audits.
Review a pull request in TensorFlow with Atlas in 2026
Accelerate TensorFlow pull request reviews in 2026 with Atlas. Catch subtle bugs by leveraging deep code context, `pytest`, `uv`, and `black` integration.
Upgrade a Dependency and Fix Breakage in TensorFlow with Atlas in 2026
TensorFlow developers in 2026 can use Atlas to upgrade dependencies like Keras 3, automatically fixing compile and test failures. Atlas drives uv for package management, reads pytest output, and formats with black.
Automate GitHub Issue and Pull Request Triage in TensorFlow with Atlas in 2026
Streamline GitHub issue and pull request triage for TensorFlow projects using Atlas in 2026. Safely automate responses for trusted users, integrating with `uv`, `pytest`, and `black`.
Document a TensorFlow Module with a README in 2026
Atlas helps TensorFlow developers in 2026 generate accurate READMEs by reading live code, using `lsp` for APIs, and `bash` to verify samples. Ensure your TensorFlow documentation reflects current implementation, not