<commit_before># TensorFlow Estimator - Trainer Package Template 

The purpose of this repository is to provide a template of how you can package a TensorFlow training model to submit it to Cloud ML Engine. The template makes it easier to organise your code, and to adapt it to your dataset. In more details, the template covers the following functionality:
* Metadata to define your dataset, along with the problem type (classification vs regression).
* Standard implementation of input, parsing, and serving functions.
* Automatic feature columns creation based on the metadata (and normalisation stats).
* Wide & Deep model construction using canned estimators.
* Create custom estimator using standardised model_fn.
* Train, evaluate, and export the model.
* Parameterisation of the experiment.

Although the template provides standard implementation to different functionality, you can customise these parts with your own implementation.


### Repository Structure
1. **template**: The directory includes 1) trainer template withh all the python modules to adapt to your data, 2) setup.py, and 3) confg.yaml file for hyper-parameter tuning and specifying the Cloude MLE scale-tier.

2. **scripts**: The directory includes scripts to 1) train the model locally, 2) train the model on Cloud ML Engine, 
and 3) deploy the model on GCP as well as to make prediction (inference) using the deployed model.

3. **examples**: Currently three different examples are included, 1) classification, using the [Census Income](https://archive.ics.uci.edu/ml/datasets/Census+Income) (UCI Machine Learning Repository) dataset, 2) regression, using the [House Pricing](https://www.kaggle.com/apratim87/housingdata/data) (Kaggle) dataset,
and 3) regression, with a custom estimator, using [Natality Baby Weight](https://catalog.data.gov/dataset?tags=birth-weight) (data.gov) dataset.

The examples show how the template is adapted given a dataset. The datasets are found in the examples' folders (under "data" sub-directory).


### Trainer Template Modules
<commit_msg>Fixed typo<commit_after># TensorFlow Estimator - Trainer Package Template 

The purpose of this repository is to provide a template of how you can package a TensorFlow training model to submit it to Cloud ML Engine. The template makes it easier to organise your code, and to adapt it to your dataset. In more details, the template covers the following functionality:
* Metadata to define your dataset, along with the problem type (classification vs regression).
* Standard implementation of input, parsing, and serving functions.
* Automatic feature columns creation based on the metadata (and normalisation stats).
* Wide & Deep model construction using canned estimators.
* Create custom estimator using standardised model_fn.
* Train, evaluate, and export the model.
* Parameterisation of the experiment.

Although the template provides standard implementation to different functionality, you can customise these parts with your own implementation.


### Repository Structure
1. **template**: The directory includes 1) trainer template with all the python modules to adapt to your data, 2) setup.py, and 3) confg.yaml file for hyper-parameter tuning and specifying the Cloude MLE scale-tier.

2. **scripts**: The directory includes scripts to 1) train the model locally, 2) train the model on Cloud ML Engine, 
and 3) deploy the model on GCP as well as to make prediction (inference) using the deployed model.

3. **examples**: Currently three different examples are included, 1) classification, using the [Census Income](https://archive.ics.uci.edu/ml/datasets/Census+Income) (UCI Machine Learning Repository) dataset, 2) regression, using the [House Pricing](https://www.kaggle.com/apratim87/housingdata/data) (Kaggle) dataset,
and 3) regression, with a custom estimator, using [Natality Baby Weight](https://catalog.data.gov/dataset?tags=birth-weight) (data.gov) dataset.

The examples show how the template is adapted given a dataset. The datasets are found in the examples' folders (under "data" sub-directory).


### Trainer Template Modules

{'fraction_non_alphanumeric': 0.06965416463711642, 'fraction_numerical': 0.006819288845591817, 'mean_word_length': 5.093471810089021, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5869502', 'n_tokens_mistral': 1048, 'n_tokens_neox': 977, 'n_words': 537}