tf-estimator-tutorials: a reference notebook set for TensorFlow's estimator APIs
This repository includes tutorials on how to use the TensorFlow estimator APIs to perform various ML tasks, in a systematic and standardised way
At a glance
- What is it?
- This repository collects Jupyter notebooks that demonstrate canned and custom TensorFlow estimators across classification, regression, clustering, time series, image and text tasks. It is a teaching corpus pinned to TensorFlow 1.7, not a library, and its value depends on whether you are still working inside the estimator API era.
- Who is it for?
- Adopt this repository if you maintain an existing TensorFlow 1.x codebase built on tf.estimator and need worked examples of input_fn pipelines, feature_column construction, tf.Transform and TFMA. Do not adopt it as a starting point for new work: the README pins several tutorials to TF v1.7, the roadmap items such as early stopping and DynamicRnnEstimator are listed as coming soon rather than delivered, and the repository ships no releases.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 131 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What the estimator tutorials actually cover
The repository is a collection of Jupyter notebooks, and the README frames the goal as using the TensorFlow estimator APIs to perform various ML tasks in a systematic and standardised way. The task list is broad: classification, regression, k-means clustering, AR time-series models, autoencoding for dimensionality reduction, RNN and LSTM sequence models, CNN image classification, and text classification with embeddings, CNN and RNN variants. The intended audience is someone who already knows what an estimator is and wants a worked reference for the surrounding machinery. That machinery is the real subject: input pipelines, feature columns, serving signatures. A reader looking for a tutorial on model architecture choices will find the notebooks thinner than the README's task list suggests, because the emphasis sits on the estimator plumbing rather than on the networks themselves.
The metadata-driven feature_column pattern
The most reusable idea in the repository is a metadata-driven approach to building feature columns. Instead of hand-writing every column, the notebooks describe constructing numerical columns, categorical columns with a vocabulary, categorical columns with hash buckets, and categorical columns with identity from a shared description. The README also lists implicit feature engineering performed at column definition time: crossing, embedding, indicators and bucketization. Two details are worth singling out because they are easy to get wrong elsewhere. First, normalizer_fn in numeric_column() is used to scale numeric features from pre-computed statistics, for Min-Max or Standard scaling, which means the statistics are computed ahead of training rather than fitted inside the graph. Second, weight_column is demonstrated both in canned estimators and inside the loss function of custom estimators. The trade-off in the metadata approach is that the description becomes a second schema you must keep in sync with your data, and nothing in the README describes validation of that schema.
Input pipelines: three generations in one repository
The README lists input_fn implementations built on three different mechanisms: tf.estimator.inputs.pandas_input_fn, tf.train.string_input_producer, and the tf.data.Dataset APIs reading both .csv and .tfrecords (tf.example) files. For time series it adds tf.contrib.timeseries.RandomWindowInputFn and WholeDatasetInputFn. Having all three in one place is genuinely useful for anyone migrating an older codebase, since the pandas path, the queue-runner path and the Dataset path have different performance and lifecycle behaviour. It is also a maintenance signal. The string_input_producer path belongs to the queue-based input era that tf.data replaced, and a repository that teaches both is teaching history alongside the current API. Preprocessing is folded into the read step: the README mentions sin, sqrt, polynomial expansion, Fourier transform, log, boolean comparisons, Euclidean distance and custom formulas applied as part of input_fn. Putting transforms there keeps the model graph simpler, at the cost of making the pipeline harder to reuse outside training.
Getting the notebooks running
The README gives one instruction for setup: follow the directions in INSTALL if you need help setting up your environment. That file is the authoritative source and the README does not reproduce its contents, so treat it as the first thing to read rather than a formality. Beyond that, the repository provides no package, no entry point and no CLI. You open the notebooks in Jupyter and run cells. The version constraints matter more than usual here: the README explicitly tags the tf.Transform, TensorFlow Model Analysis (TFMA) and tf.Hub text feature column embedding tutorials as TF v1.7. It also references tf.contrib.learn.experiment and tf.contrib.timeseries, both of which live under tf.contrib, the namespace TensorFlow removed in 2.0. If your environment is TensorFlow 2.x, these notebooks will not run as written, and the fixes are not mechanical because the estimator and contrib APIs changed shape rather than just name. The serving section uses export_savedmodel with csv and json inputs, which is the part most likely to still be legible if you are porting concepts rather than code.
Where this repository stops being the right tool
The README's Coming Soon list is the clearest statement of the boundary. Early stopping, DynamicRnnEstimator and variable-length sequences, collaborative filtering for recommendation models, topic models, and Keras examples are all listed as future work, not as existing content. If your task is any of those, this repository does not cover it today. There is a second, structural limitation. The repository has no releases, so there is no versioned snapshot to pin against; the notebooks change on the default branch and your only version anchor is the TensorFlow version mentioned in the README text. For a teaching corpus that is tolerable. For anything you intend to depend on, it is not, because a notebook that runs today can break on a dependency bump with no changelog to explain what moved. The estimator API itself is also in a different position than when these notebooks were written: tf.estimator still exists in TensorFlow 2.x, but the contrib modules the tutorials rely on do not, so the repository is partly a record of an API surface that has since been split apart.
How this compares with Keras and the tf.data guides
The natural alternative for new work is the Keras sequential and functional API, which the README itself lists under Coming Soon, meaning this repository does not yet show it. The difference in approach is concrete. An estimator separates four things: the input_fn, the feature columns, the model_fn returning an EstimatorSpec, and the train/evaluate/export lifecycle driven by train_and_evaluate with trainSpec and evalSpec. Keras folds the first two into dataset objects and the last into fit and save. That separation is exactly why the estimator pattern suits production pipelines with a serving contract: the exported SavedModel signature is declared as part of the model definition, and the README's serving section shows csv and json inputs against it. It is also why the pattern is verbose. If you do not need the explicit serving signature or the distributed train_and_evaluate loop, Keras will get you to a working model with far less scaffolding, and the feature column machinery here, including crossing and bucketization, has direct equivalents in Keras preprocessing layers that you configure in Python rather than in a column description.
Maintenance cost and licence
The repository is licensed Apache-2.0, which permits commercial use, modification and redistribution provided you keep the licence and notices intact and state significant changes. That is the standard permissive arrangement, and it is the same licence TensorFlow itself uses, so there is no compatibility question when you copy a notebook cell into a TensorFlow project. The practical maintenance cost is not the licence but the drift. Every tf.contrib reference in these notebooks is a future breakage point, and the README's own version tags tell you which tutorials were written against TF v1.7. If you fork the notebooks to keep them running, budget for the contrib removals first, then for the tf.data migration of the string_input_producer examples. There is no release process to follow and no upgrade guide, so the fork becomes yours to maintain from the moment you change a cell. Note that the repository is not archived, so the default branch can still change under you.
Editorial conclusion
Adopt this repository if you maintain an existing TensorFlow 1.x codebase built on tf.estimator and need worked examples of input_fn pipelines, feature_column construction, tf.Transform and TFMA. Do not adopt it as a starting point for new work: the README pins several tutorials to TF v1.7, the roadmap items such as early stopping and DynamicRnnEstimator are listed as coming soon rather than delivered, and the repository ships no releases. Verify first that your TensorFlow version matches the one each notebook assumes, and read INSTALL before running anything, because the setup instructions are the only environment guidance the repository provides.
Community notes