DeepR
Config
The configuration module makes it possible to configure any object.
|
Raises a ValueError if item has macro parameters. |
|
Create item whose macro params present in macros are filled. |
|
Fill all params that are references, fail if not found. |
|
Instantiate item from config. |
|
True if item is a string that looks like '$macro:param'. |
|
True if item is a string that looks like '@reference'. |
|
Fill macro parameters and references in config from macros. |
Exporter
Exporters run at the end of training.
|
Base class for Exporters |
|
Overrides Checkpoint Information to point to the best checkpoint. |
|
Save Variables as Parquet, supports chunking. |
|
Saved Model Exporter |
Hook
Hooks are called regularly during training to send some information to another service.
|
Early Stopping Hook Factory |
Estimator Hook Factory |
|
|
Parametrize the creation of a LoggingTensorHook factory. |
|
Measure maximum resident memory of the current process |
|
Measure resident memory of the current process |
|
Logs steps per seconds and num_examples_per_sec. |
|
Summary Saver Hook |
Tensor Hook Factory |
Initializer
Initializers run before training.
|
Checkpoint Initializer |
Io
Io provides helpers to read/write from file systems.
Context aware HDFSFileSystem using pyarrow.hdfs. |
|
|
Context aware ParquetDataset with support for chunk writing. |
|
Equivalent of pathlib.Path for local and HDFS FileSystem |
|
Read json or jsonnet file into dictionary |
Job
Jobs are the programs that will actually run, they are composable through the pipeline job, the yarn launcher and trainer job.
|
Cleanup Checkpoints in path_model |
|
Copy Directory. |
|
Export xla compatible model metadata from a saved model |
|
Grid Sampler wrapping ParameterGrid from sklearn |
|
Interface for jobs |
|
Log Metric job |
|
Upload Configs to MLFlow |
|
Save MLFlow info to path |
|
Converts SavedModel into an optimized protobuf for inference |
|
Parameter Sampler |
|
Params tuner |
|
Pipeline, executes list of jobs in order |
|
Parameters Sampler |
|
Save Dataset Job. |
|
Train and evaluate a tf.Estimator on the current machine. |
|
Packages current environment, upload .pex and run yarn job. |
|
Run a |
Layer
Tensorflow logic is preferably defined in a Layer
for re-usability and composability. It is the equivalent of Keras, Trax, etc. layers.
It takes as input / returns a dictionary of Tensor
. This means that the __init__ method of a Layer must define which keys are used for inputs / outputs.
|
Active Mode Layer. |
|
Add two tensors of any compatible shapes. |
|
Average Layer |
|
Vanilla BPR Loss Layer. |
|
Boolean Mask Layer |
|
Click Rank Layer |
|
Concatenate tensors on axis |
|
Dense Layer |
|
Dot Product on the last dimension of the input vectors. |
|
Partitioned Embedding Layer |
|
Equal Layer |
|
Identity Layer |
|
Compare size of inputs to minimum |
|
Base class for composable layers in a deep learning network. |
Perform logical_and on two tensors of compatible shapes. |
|
|
Lookup Layer. |
|
Lookup From File Layer. |
|
Lookup From Mapping Layer. |
|
Lookup Index To String. |
|
Masked BPR Loss Layer. |
|
Not Equal Layer |
|
Apply layers in parallel on consecutive inputs. |
|
Product Layer |
|
Wrap Layer in a Node to rename inputs / outputs. |
|
Layer to extract inputs / outputs from previous layers |
|
Class to easily compose layers in a deep learning network. |
alias of |
|
|
Slice Layer |
|
Slice First Layer |
|
Slice First Layer |
|
String Join Layer |
|
Sum Layer |
|
Sparse to Dense Layer |
|
Cast tensor to float32 |
|
Weighted Average Layer |
Macros
Macros are subclasses of dictionaries that dynamically create params for configs.
|
MLFlow Macro initializes MLFlow run and sets MLFlow parameters |
Metrics
Metrics compute training and validation information during training.
|
Decay Mean Metric |
|
Finite Mean Metric |
|
Last value Metric |
|
Max value Metric |
|
Finite Mean Metric |
|
Base class for Metrics |
|
StepCounter Metric |
|
Variable Value Metric. |
Optimizer
Optimizer is the way to optimize your graph.
Interface for Optimizers |
|
|
Default Tensorflow Optimizers |
Prepro
The Prepro
classes are utilities to transform Dataset
.
The most common way to define a Prepro
is to wrap a Layer
with a Map
or Filter
transform.
|
Combines consecutive elements of a dataset into batches. |
|
Filter a dataset keeping only elements on which predicate is True |
|
Parse TF Record Sequence Example |
|
Map a function on each element of a tf.data.Dataset. |
|
Combines consecutive elements of a dataset into padded batches. |
|
Creates a dataset that prefetch element on CPU / GPU. |
|
Base class for composable preprocessing functions. |
|
Repeats a dataset so each original value is seen count times. |
|
Chain preprocessors to define complex preprocessing pipelines. |
|
Randomly shuffles the elements of a dataset. |
alias of |
|
|
Table Initializer. |
|
Creates a dataset with at most count elements. |
|
Convert dictionary of Tensors to tf.SequenceExample. |
Reader
A Reader
is the equivalent of tensorflow_dataset readers. Their __init__ method defines all the parameters necessary to create a Dataset
.
|
Reader Class for datasets using generator functions |
|
Interface for readers, similar to tensorflow_datasets |
|
Class for TFRecord Reader of tf.train.Example. |
Utils
Various functions
|
Convenient way to define fields for features. |
Context Manager to reuse Tensorflow tables. |
|
|
Return TensorType from Python, TensorFlow or NumPy type |
|
Split Iterable into Iterable chunks. |
|
Convert dictionary into object or tuple of objects. |
|
Retrieve feed tensors from graph. |
|
Retrieve fetch tensors from graph. |
Handle Exceptions Decorator. |
|
|
Import Graph Definition from protobuff into the current Graph. |
|
Create reverse table from file |
|
Convert tuple or object to dictionary. |
|
Make list of tensors the same shape |
|
Convert two 64 bit integers MSB and LSB to a 128 bit UUID. |
|
Log progress on Iterable.iterable |
|
Save variables in checkpoint |
|
Convert a 128 bit UUID to two 64 bit integers MSB and LSB. |
|
Create table from file |
|
Create table from mapping |
|
Convert nested list, tuples and generators to a flat tuple. |
Vocab
Simple helpers for vocabularies
|
Read vocabulary from file. |
|
Return vocabulary size from mapping file. |
|
Write vocabulary to file. |
Writer
A Writer
makes it possible to write dataset to disk.
|
Base class for writers. |
|
TFRecords writer. |