profile
viewpoint

amygdala/tensorflow-workshop 624

This repo contains materials for use in a TensorFlow workshop.

mrry/ciel 70

A distributed execution engine for cloud computing

tensorflow/tfjs-data 63

Simple APIs to load and prepare data for use in machine learning models

mrry/skywriting 19

Language and execution engine for cloud programming

avsm/skywriting-www 4

Website for Skywriting

mrry/ciel-skywriting 4

A scripting language for distributed, parallel computation

mrry/ciel-java 2

CIEL bindings for the Java programming language

mrry/ciel-c 1

C bindings for CIEL

mrry/docs 1

TensorFlow documentation

mrry/magenta 1

Magenta: Music and Art Generation with Machine Intelligence

pull request commenttensorflow/tensorflow

improve_bfc_allocator

Hi there. Sorry for the long delay on reviewing this PR. After some internal discussion with @dubey, who works more closely on this part of the code, we've decided that the additional code complexity from the bitwise operations outweighs the performance improvement (which is uncertain, since I'd expect an optimizing compiler to find the same optimization when dividing/multiplying by a constant power of two). Therefore we're going to close this PR without accepting it.

If you can measure a performance difference with and without this change, we'd be open to reconsidering.

Xuxue1

comment created time in 18 days

PR closed tensorflow/tensorflow

improve_bfc_allocator cla: yes ready to pull size:XS

1.Modify the Roundedbytes method 2.Modify the frequently called small methods to make them inline methos

+1 -3

5 comments

1 changed file

Xuxue1

pr closed time in 18 days

issue commenttensorflow/tensorflow

tensorflow-terminate called after throwing an instance of 'std::system_error'

@Joshuaalbert It sounds like you're running into a different problem, so please open a new issue with details of how to reproduce the problem. Thanks!

creativesh

comment created time in a month

PR closed tensorflow/tensorflow

Reviewers
[core] Sparse tensor valid index check cla: yes size:XS
+3 -2

1 comment

2 changed files

gaurav1086

pr closed time in a month

pull request commenttensorflow/tensorflow

[core] Sparse tensor valid index check

Thanks for submitting a pull request to TensorFlow. Unfortunately, I don't think it improves the code in question, so I don't think it should be merged: the comment is redundant, and the logical operator change introduces an inconsistency where previously all terms were combined using the same operator.

gaurav1086

comment created time in a month

pull request commenttensorflow/tensorflow

[s3_file_system] set sync_needed_ as false after Sync()

I have no context, but the change looks sensible to me, so I'm happy to approve it.

ziliangpeng

comment created time in a month

Pull request review commenttensorflow/tensorflow

improve_bfc_allocator

 void* BFCAllocator::AllocateRaw(size_t unused_alignment, size_t num_bytes, }  // static-size_t BFCAllocator::RoundedBytes(size_t bytes) {-  size_t rounded_bytes =-      (kMinAllocationSize *-       ((bytes + kMinAllocationSize - 1) / kMinAllocationSize));+inline size_t BFCAllocator::RoundedBytes(size_t bytes) {

The inline here is causing link-time failures when building "//tensorflow/core:common_runtime_gpu_gpu_bfc_allocator_test".

Xuxue1

comment created time in a month

Pull request review commenttensorflow/tensorflow

improve_bfc_allocator

 class BFCAllocator : public VisitableAllocator {   size_t BinNumToSize(BinNum index) {     return static_cast<size_t>(256) << index;   }-  BinNum BinNumForSize(size_t bytes) {+  inline BinNum BinNumForSize(size_t bytes) {

This change has no effect because we're in a class definition. Please revert this line.

Xuxue1

comment created time in a month

issue commenttensorflow/tensorflow

ImageDataGenerator does not work with tpu

@lindong28 434 KB/worker doesn't seem like a big deal (e.g. compared to the size of some FunctionDefs), but if necessary you could compress and/or hash the kernel registrations to reduce the network traffic. A lazy protocol, where you fetch the registrations on demand, could work as well. If you do something like that then the overhead should be manageable.

Shiro-LK

comment created time in 2 months

issue closedtensorflow/tensorflow

cpu tensorflow win: 7, DLL load failed with error code -1073741795

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win 7 Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: no TensorFlow installed from (source or binary): https://www.tensorflow.org/install/pip TensorFlow version: 1.12 Python version: 3.6.8 Installed using virtualenv? pip? conda?: pip Bazel version (if compiling from source):- GCC/Compiler version (if compiling from source):- CUDA/cuDNN version: CUDA 9.2, cuDNN64_7 GPU model and memory: NVIDIA quadro 2000 graphic card, Intel Xeon. Describe the problem

Traceback (most recent call last): File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", lin e 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal .py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal .py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed with error code -1073741795

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_init_.py", line 24, in <module

from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python_init_.py", line 49, in

from tensorflow.python import pywrap_tensorflow File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", lin e 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", lin e 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal .py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal .py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\azak\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed with error code -1073741795

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

Any other info / logs

I have problem with CPU model!!!!!!!!!!!!!!!!!!

I have problem with cpu version. only 1.5 workes for me and faced error for installing CUDA 9.0. therefore I installed CUDA 9.2! what is the source of error? I tried different version of tensorflow and cuda!!!!!!

thanks.

closed time in 2 months

nouranik

issue commenttensorflow/tensorflow

cpu tensorflow win: 7, DLL load failed with error code -1073741795

Closing due to lack of recent activity.

nouranik

comment created time in 2 months

issue commenttensorflow/tensorflow

Compiling custom GPU operation on Microsoft Windows 10

Reassigning this to @gunan, as I'm not familiar with the current state of the Windows build.

alayu

comment created time in 2 months

pull request commenttensorflow/tensorflow

Add networking related headers in pip wheel

Reassigning this review to Ayush!

byronyi

comment created time in 3 months

pull request commenttensorflow/tensorflow

Increase protobuf PIP requirement to >=3.8.0

@rthadur All conflicts are now resolved.

mrry

comment created time in 4 months

push eventtensorflow/tensorflow

Kaixi Hou

commit sha b2d27b8e00bbb6feef10d8bfe91cad19889da0f1

Use fused_batch_norm in LayerNormalization

view details

Kaixi Hou

commit sha d1e2757fbd4cdb72d330f7d3fa68ce2d83625ba1

fused batch norm NHWC cannot be used on CPU

view details

Kaixi Hou

commit sha a8cc7a15f66a5ac2e20bb4cb2f9f8a2c197b2b6e

Update goldens

view details

Kaixi Hou

commit sha fd92ad7ee28882d945110f2a8638e4e6374e9181

Add test to compare layerNorm using fused impl. or not and refactor the fused layer norm to call a separator scale and offset compute

view details

Kaixi Hou

commit sha b27f7d32e5deff89fdd770a315f7e221c8b01df1

Fixed bad indentation errs

view details

Kaixi Hou

commit sha ff4c6c806388bcc449bd17120b3c41e03184f29f

Simplified some code and added some comments

view details

Kaixi Hou

commit sha 9d4fa7ff12510144096f68cb96434982153b7765

Added a get config function to reduce duplicate code

view details

Kaixi Hou

commit sha 3806ef72484ee6ca4e0ae3f9425fe0c89d88ab58

Put fused param at the end of arg list and updated goldens

view details

frreiss

commit sha 7b8ddca40b509471ae1fd17573a080b573006e8a

Improve API doc for ZipDataset

view details

autoih

commit sha 734f8f0d3c6378974dab85b8f3326bec62725cd9

relocate raise place

view details

Kaixi Hou

commit sha 55aff6d0945795e07d18c0c871e929d92830a88a

Add CPU NCHW impl + test

view details

Kaixi Hou

commit sha fc4f7eb6963aca828774136159f4bc8a4e3c98da

remove fusd param

view details

Kaixi Hou

commit sha 7de53fdd274b92417afcad09de80a9165d85abba

Merge branch 'master' of https://github.com/tensorflow/tensorflow into support_fused_bn_in_layer_norm

view details

Kaixi Hou

commit sha 2f643329b26824fadf679cf28b7cab96cf4fd040

solved conflicts

view details

Kaixi Hou

commit sha bd2b2ae44d62238e5234e0de1d477ec1a4ceae3e

added tests for non-fused layer norm

view details

Duncan Riach

commit sha 80c8e1d680ccdb6015ff7816729ae0b7fa017675

Add deterministic tf.nn.bias_add functionality, TF_DETERMINISTIC_OPS environment variable, and associated tests.

view details

R Gomathi

commit sha cefb712e679793fcbf892204e503465719a1e712

[INTEL MKL] Add Weight caching in MKL Qunatized Matmul Op

view details

Kaixi Hou

commit sha d31df357db6bd567d3379493ea81fe641ef6b2b7

Support the 3d convolution ops for auto_mixed_precision

view details

Fredrik Knutsson

commit sha bcb4ad6c5ba1ede5f00f1302a92ab3c7f5f7da73

Added CMSIS-NN specialization for fully connected op. The optimized implementation requires temporary buffer space, therefore a buffer was defined. The buffer is however a temporary solution until there's a way to add this buffer to the memory planner in the prepare phase of the op. Change-Id: I4faf9010b723e3ced6ef1a1af94f2a524df64c61

view details

Deven Desai

commit sha dcbb85d12944c902061cfb87898a62eefea5d09f

[ROCm] Change to pick up rocprim and hipcub libraries from ROCm install In newer ROCm releases, rocprim and hipcub libraries will be installed on ROCm stack by default. Therefore it will no longer be necessary to pull them from source (as a third party package). This PR contains the changes requried to pick up rocprim and hipcub from ROCM install This is essentially a cherry-pick this PR ROCmSoftwarePlatform/tensorflow-upstream#620 (authored by @whchung)

view details

push time in 4 months

create barnchtensorflow/tensorflow

branch : mrry-patch-1

created branch time in 4 months

issue commenttensorflow/tensorflow

Variable creation fails in TF-Nightly

Thanks for confirming! I just sent an PR to bump the requirement.

seanpmorgan

comment created time in 4 months

PR opened tensorflow/tensorflow

Reviewers
Increase protobuf PIP requirement to >=3.8.0

This is required in order to get https://github.com/protocolbuffers/protobuf/commit/d8c2501b43c1b56e3efa74048a18f8ce06ba07fe , which adds a RepeatedCompositeContainer.append() method.

Thanks to @seanpmorgan for raising this issue. Fixes #33348.

+1 -1

0 comment

1 changed file

pr created time in 4 months

issue commenttensorflow/tensorflow

Variable creation fails in TF-Nightly

For binaries, the PIP dependency is 'protobuf >= 3.6.1':

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/pip_package/setup.py#L64

Right enough, https://github.com/protocolbuffers/protobuf/commit/d8c2501b43c1b56e3efa74048a18f8ce06ba07fe only appears from 3.8.0 onwards.

If you do pip install -U protobuf=3.8.0 in your Linux env, does that fix the problem?

seanpmorgan

comment created time in 4 months

issue commenttensorflow/tensorflow

Variable creation fails in TF-Nightly

That's odd, because this code works in our CI. Which protobuf version are you using? It looks like RepeatedCompositeContainer.append() has been available since https://github.com/protocolbuffers/protobuf/commit/d8c2501b43c1b56e3efa74048a18f8ce06ba07fe , so we might need to bump a requirement.

seanpmorgan

comment created time in 4 months

pull request commenttensorflow/tensorflow

Force synchronization for GPU ops accessing host memory (issue #33294)

Reassigning this GPU runtime-related PR to @iganichev.

I haven't reviewed the code in detail, but I would be concerned that blocking the stream at the beginning of every kernel that takes a hostmem input might have a non-trivial performance impact. It would be helpful to include an example program that doesn't work correctly without this change.

ekuznetsov139

comment created time in 4 months

PR opened tensorflow/models

Reviewers
Update usage of tf.contrib.data to tf.data.experimental

tf.contrib has been removed in TF 2.0, so this change upgrades the tf.data-using parts of tensorflow/models to TF 2.0 compatibility. (Note that these symbols are also available in recent versions of TF 1.x.)

+20 -22

0 comment

9 changed files

pr created time in 4 months

create barnchmrry/models

branch : data_experimental

created branch time in 4 months

Pull request review commenttensorflow/community

RFC: TFX Standardized Inputs

+<!-- mdlint off(HEADERS_TOO_MANY_H1) -->++# Standardized TFX Inputs++Status        | Proposed+:------------ | :------------------------------------------------------------+**RFC #**     | [162](https://github.com/tensorflow/community/pull/162)+**Author(s)** | Zhuo Peng (zhuo@google.com), Kester Tong (kestert@google.com)+**Sponsor**   | Konstantinos Katsiapis (katsiapis@google.com)+**Updated**   | 2019-10-03++# Objective++*   To define a common in-memory data representation that:+    *   is powerful enough to encode the following logical training data format:+        flat+        ([`tf.Example`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L88)),+        sequence+        ([`tf.SequenceExample`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L298))+        or structured data (e.g.+        [Protocol Buffers](https://developers.google.com/protocol-buffers) or+        [Apache Avro](https://avro.apache.org/)).+    *   all TFX components can understand and can support their own unique use+        cases with.+*   To define an I/O abstraction layer that produces the above in-memory+    representation from supported physical storage formats, while hiding TFX’s+    choice of such storage formats from TFX users.+*   To define a bridge from the above in-memory representation to TF feedables+    (i.e. Tensors and certain+    [CompositeTensors](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/python/framework/composite_tensor.py#L1)).++# Motivation++## Fragmented in-memory data representations across TFX++A TFX component may use its input data (data generated by ExampleGen) in two+ways:++*   it may need to understand the data and conduct analysis. Usually this+    happens in [Apache Beam](https://beam.apache.org/), and does not involve a+    TF Model. For example:+    *   [TFDV](https://github.com/tensorflow/data-validation) and+        [TFT](https://github.com/tensorflow/transform) compute some statistics+        over the data.+    *   [TFMA](https://github.com/tensorflow/model-analysis) may slice the+        dataset by certain columns in the data.+*   it may feed the data to TensorFlow. Note that feeding TF alone may not+    require understanding the data. For example, TFMA may feed a TF model with+    serialized tf.Example, which may be the raw form of the data.++Currently, each TFX component has its own in-memory data representation to cover+the two use cases by a different approach:++|    | TFDV | TFT  | TFMA | BulkInference |+|:---| :--- | :--- | :--- | :------------ |+| In-memory data representation | Arrow RecordBatches | Dict[str, np.ndarray] | str (raw data records), Dict[str, np.ndarray] | str (raw data records) |+| Understand the data and conduct analysis | input data is encoded losslessly as RecordBatches. | the in-mem representation may be lossy. | Relies on the model’s input layer, and the format is Dict[str, np.ndarray]. | N/A |+| Feed TF | N/A | the in-mem representation is TF feedable. | Feed “raw data” to the model. | Feed “raw data” to the model |++This has created many issues:++*   Users of individual components need to adapt their data (if input format not+    already supported) to each component they want to use.+*   Individual components rely on unenforceable assumptions on how to interpret+    the input data consistently.+*   The complexity of adding new logical data representations (for example,+    tf.SequenceExample) scales with the number of components.++## The need for supporting new physical storage formats in TFX++Two factors drive this need:++*   TFX needs to offer users more choices of the storage format, e.g,+    [Apache Parquet](https://parquet.apache.org/).+*   TFX wants to be able to choose the optimal storage format based on user’s+    workload, in a user-transparent manner. A unified I/O abstraction would make+    it easier to support a new physical format in TFX, since one would not have+    to understand every single TFX component in order to implement such support.++## TFX interoperability with the rest of the world++If we choose a commonly available and adopted exchange format as our in-memory+representation, our users will be able to use TFX components with much less+effort on data conversion. This aligns with TFX’s long term vision.++# User Benefit++## TFX End Users++While this change is transparent to end users, it will facilitate the design and+implementation of many user-facing features, for example:++*   Columnar storage format in TFX.+*   Structured training examples.++## Individual TFX component users++We use TFXIO to refer to the proposed I/O abstraction layer. All TFX components+will start using TFXIO to ingest the data and have a unified way of representing+the data. Individual TFX component users would be able to implement TFXIO for+their own data formats / storage formats that are not supported by TFX. By+design, any such implementation will be readily accessible by all TFX+components.++## TFX developers++Developers working on TFX infrastructure will not have to understand the+internals of each component any more in order to make changes to I/O and parsing+(for example, adding support for a new storage format for the training+examples).++Developers working on TFX components would benefit from sharing common+operations against the unified in-memory representation, or even higher-level+computations. For instance, suppose that we implement a sketch-based algorithm+to compute approximate heavy hitters over this in-memory representation. We can+now share this implementation inside both TFDV and TFT for their top-K feature+value computation.++# Design Proposal++This design proposes **a common in-memory data representation**, **a way to+translate that into TF feedables** (np.ndarray or EagerTensors) and **a set of+APIs** each component can use to get both.++![alt_text](20191017-tfx-standardized-inputs/overview.png)++## Common in-memory data representation++[Apache Arrow](https://arrow.apache.org/) will be used as the common in-memory+data representation. Beam-based TFX components will accept+<code>PCollection[pyarrow.[RecordBatch](https://arrow.apache.org/docs/python/data.html#record-batches)]</code>.++Each logical data format will have its own encoding convention,+[discussed](#logical-data-encoding-in-arrow) in the detailed design.++We chose Apache Arrow because:++*   It’s Expressive enough.+    *   Lossless encoding of (conformant) tf.Example, tf.SequenceExample+    *   Can encode structured data (proto)+*   It’s a columnar format. It works well with common TFX workloads:+    *   Column (feature)-wise analysis+    *   Feed a batch of columns (features) to TensorFlow.+*   It’s OSS friendly.+    *   Community support for more storage format I/O (e.g. Apache Parquet)+    *   Friendly to other OSS data formats, both in-memory and on disk (e.g.+        Pandas)+    *   Friendly to numpy / TF: many Arrow array types share the same memory+        layout with numpy ndarrays and certain type of TF (composite) Tensors.+*   TF neutral.+    *   Leaves the possibility of supporting other ML libraries open.++## Translation from Arrow to TF feedables++The analogy to this is parsing tf.Examples into TF feedables -- extra+information is needed in this translation because a+[`Feature`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/feature.proto#L76)+can be converted to a Tensor, a SparseTensor or a+[RaggedTensor](https://www.tensorflow.org/guide/ragged_tensor) depending on the+[feature specs](https://github.com/tensorflow/tensorflow/blob/635e23a774936b5fe6fa3ef3cb6e54b55d93f324/tensorflow/python/ops/parsing_ops.py#L46-L49).+Currently this extra information is implicitly contained in the pipeline schema+(an instance of the+[TFMD Schema](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/schema.proto))+proto.++Similarly, an Arrow column can be translated to various TF feedables.+[An extension to the pipeline schema](#tensorrepresentation) is proposed to for+a user to express the intention for conversion.++The conversion can be efficient (zero-copy) in certain cases. It is+[discussed](#efficient-arrow-tensor-conversion) in the detailed design.++## Standardized Inputs APIs++We propose a set of APIs that TFX components will call, and need to be+implemented for each of the supported combination of {physical, logical} format.++```py+class TFXIO(object):+  """Abstract basic class of all Standardized TFX inputs API implementations."""+  def __init__(+      self,+      schema: Optional[tfmd.Schema]=None+  ):+    pass++  @abc.abstractmethod+  def BeamSource(self,+                 projections: Optional[List[Text]]=None+  ) -> beam.PTransform:+    """Returns a beam PTransform that produces PCollection[pa.RecordBatch].++    May NOT raise an error if the TFMD schema was not provided at construction time.++    Args:+      projections: if not None, only the specified subset of columns will be+      read.+    """++  @abc.abstractmethod+  def TensorAdapter(self) -> TensorAdapter:+    """Returns a TensorAdapter that converts pa.RecordBatch to TF inputs.++    May raise an error if the TFMD schema was not provided at construction time.+    """++  @abc.abstractmethod+  def ArrowSchema(self) -> pyarrow.Schema:+    """Returns the schema of the Arrow RecordBatch generated by BeamSource().++    May raise an error if the TFMD schema was not provided at construction time.+    """++  @abc.abstractmethod+  def TFDataset(self, ...) -> tf.data.Dataset:+    """Returns a Dataset of TF inputs.++    May raise an error if the TFMD schema was not provided at construction time.+    """+```++Where `TensorAdapter` is:++```py+class TensorAdapter(object):++  def __init__(+      self,+      arrow_schema: pyarrow.Schema,+      tensor_representations: Dict[str, TensorRepresentation]):+    """Initializer.++    Args:+      arrow_schema: the schema of the RecordBatches this adapter is to receive+        in ToBatchTensors().+      tensor_representations: keys are the names of the output tensors; values+      describe how an output tensor should be derived from a RecordBatch.+    """+++  def TypeSpecs(self) -> Dict[str, tf.TypeSpec]:+    """Returns tf.TypeSpec for each tensor in `tensor_representation`.++    TypeSpecs can be used to construct placeholders or tf.function signatures.+    """++  def ToBatchTensors(+      self, record_batch: pyarrow.RecordBatch,+      projections: Optional[List[TensorName]]=None+  ) -> Dict[str, TFFeedable]:  # TFFeedable: np.ndarrays or tf.EagerTensor+                               # (or compositions of them, i.e.+                               # CompositeTensors).+    """Converts a RecordBatch to batched TFFeedables per `tensor_representation`++    Each will conform to the corresponding TypeSpec / TensorRepresentation.++    Args:+      projections: a set of names of TFFeedables (mentioned in+      `tensor_representation`). If not None, only TFFeedables of those names+      will be converted.+    """+```++Note that we will provide a default implementation of `TensorAdapter`, but TFXIO+implementations can implement their own `TensorAdapter`. A custom+`TensorAdapter` would allow a `TFXIO` implmentation to rely on a TF graph to+do parsing -- the same graph can be used in both `BeamSource` and+`TensorAdapter`.++The default `TensorAdapter` can be constructed out of the Arrow schema (which+is required for any TFXIO implementation) and `TensorRepresentations`. The+latter is part of the TFMD schema. See [this section](#tensorrepresentation)+for details.++# Detailed Design++## Logical data encoding in Arrow++On a high level, a batch of logical entities (“examples”) is encoded into a+[`pyarrow.RecordBatch`](https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch).+Features or fields (from structured records) are encoded as columns in the+RecordBatch.++Note that+[`pyarrow.Table`](https://arrow.apache.org/docs/python/data.html#tables) offers+an abstraction similar to RecordBatch with the key difference being that a+column in a Table might contain multiple chunks of contiguous memory regions+while a column in a RecordBatch contains only one chunk. RecordBatch is chosen+because we want to enforce that TFXIO implementations produce batched data in+the most efficient way (one chunk per batch). Users of TFXIO may construct a+Table from one or more RecordBatches since easy conversion from one to the other+is supported by Apache Arrow.++This design aims to support the logical structure of tf.Example,+tf.SequenceExample or structured data like Protocol Buffers. Thus only a subset+of Arrow array types are needed. All TFX components will guarantee to understand+those types, but no more. Below is a summary of supported encodings:++| Logical representation | Arrow encoding |+| :--------------------- | :------------- |+| Feature with no value | `NullArray`                                  |+| Univalent feature (one value per example) | `FixedSizeListArray` (list_size = 1) |+| Multivalent feature (multiple values per example) | `[FixedSize]ListArray` |+| Sequence feature (list of lists of values per example) | `[FixedSize]ListArray<[FixedSize]ListArray>` |+| Proto-like structured data | `ListArray<StructArray<{subfield:ListArray<recursion>}>>` |++However the design is flexible to support more complicated logical structures,+for example, k-nested sequences (tf.SequenceExample is 2-nested).++Next we show that these encodings cover the logical data formats we aim to+support:++### tf.Example++[Conformant](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L78)+tf.Examples are assumed. I/O + parsing should throw an error upon non-conformant+instances.++A key requirement derived from the conformant-ness is for the encoding to be+able to distinguish the following two cases:++*   a feature is present, but it’s value list is empty++    ```+    {+      features {+        "my_feature": {+          bytes_list {+          }+        }+    }+    ```++*   a feature is not present++    ```+    {+      features {+      }+    }+    ```++    or++    ```+    {+      features {+        "my_feature": {}  # none of the oneof is set+      }+    }+    ```++Each feature can be encoded as:++```+[FixedSize]ListArray<int64|float32|binary>+```++Then, the feature value in case a) is encoded as an empty sub-list, while the+feature value in case b) is encoded as null.++If we know that all the lists in a `ListArray` are of equal length (from the+schema of the data, see below sections), `FixedSizeListArray` can be used to+obviate the `O(N)` space overhead for lengths of lists.++### tf.SequenceExample++[Conformant](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L184)+tf.SequenceExamples are assumed. I/O + parsing should throw an error upon+non-conformant instances.++A context feature will be encoded similarly to a feature in tf.Example. A+sequence feature will be encoded as:++```+[FixedSize]ListArray<[FixedSize]ListArray<int64|float32|binary>>+```++To avoid name conflicts with context features, all the sequence features can be+grouped into one `StructArray`:++```+StructArray<{'sequence_feature1': ListArray<ListArray<int64|float32|binary>>, ...}>+```++### Structured data (e.g. Protocol Buffers / Apache Avro)++A batch of structured records can be encoded as follows:++*   Each direct leaf field of the structure can be encoded similarly to+    tf.Example. (`ListArray` of primitive types).+*   Each sub-message can be encoded as:++    ```+    ListArray<StructArray<recursion...>>>+    ```++## Arrow to TF Feedable conversion++### TensorRepresentation++One or more Arrow columns can potentially be converted to multiple types of TF+feedables.++For example, a `ListArray<int64>` can be converted to:++*   a Tensor, if given a default value to pad+*   a SparseTensor to represent a ragged array+*   a RaggedTensor++The choice depends on user’s intents, which currently is+[implicitly](https://github.com/tensorflow/transform/blob/11afcff467f779ba6163686395582e69603987d1/tensorflow_transform/tf_metadata/schema_utils.py#L172)+expressed in the pipeline schema.++We propose to create a new [TFMD](https://github.com/tensorflow/metadata)+(TensorFlow MetaData) Proto, `TensorRepresentation` to carry those intents implicitly:++```protobuf+message TensorRepresentation {+  oneof {+    DenseTensor { … }  // column_name, dtype, shape, default_value+    VarLenSparseTensor { … }  // column_name, dtype+    SparseTensor { }  // dtype, value_column_name, indice_column_names+    VarLenRaggedTensor { … } // dtype+    RaggedTensor { } // dtype, value_column_name, row_partition_column_names, ...+    StructuredTensor { } // column_names+  }+}+```++This proto is used in two places:++*   It’s part of TFMD schema:++    ```protobuf+      message TensorRepresentationGroup {+        map<string, TensorRepresentation> tensor_representation = 2;+      };++      message Schema {+       repeated Feature feature = 1;+       // …+       map<string, TensorRepresentationGroup> tensor_representation_group = 42;+      }+    ```++    Note :++    *   `TensorRepresentationGroup` allows different instances of one TFX+        component to use different sets of `TensorRepresentation`s.+    *   `tensor_representation_group` is **optional**. If the user does not+        specify any, a default representation will be derived from+        schema.feature to keep backwards compatibility.+    *   this field is **not** a sub-message of Schema::Feature, because a TF+        feedable may comprise multiple columns++    Being part of the schema makes it possible to serialize and materialize the+    intents for other components to use, which allows TFT’s materialization+    functionality to have its own TFXIO implementation that hides the+    data/physical format from the user.++    When generating the initial schema from the statistics of the data, TFDV can+    propose a default set of `TensorRepresentationGroup`. The user may revise+    the proposal and TFDV can validate `TensorRepresentationGroup`s in a+    continuous manner.++*   The default implementation of TensorAdapter takes an optional `Dict[str,+    TensorRepresentation]` at construction time. If a TFXIO implementation+    choose to use the default TensorAdapter, it needs to provide them (may come+    directly from the Schema).++### Efficient Arrow->Tensor conversion++The key to efficient conversions is to avoid copying of data. The prerequisites+to do so are:++*   Same memory alignment+*   Same memory layout++Currently 64-byte alignment is the standard in both Tensorflow's `TensorBuffer`+and Apache Arrow's `Buffer`. Forthermore, it can be guaranteed by implementing+our own version of `arrow::MemoryPool` that is backed by a+`tensorflow::Allocator`.++The memory layout will be the same if right types are chosen at both ends thus+zero-copy conversion can be done, for example:++*   `FixedLengthListArray` (or `ListArray` of equal-length lists) -> dense+    Tensors.+*   `ListArray<ListArray<...>>` ->+    [RaggedTensors](https://github.com/tensorflow/tensorflow/blob/3c2dabf53dd085c21e38a28b467e52c566c0dfaf/tensorflow/python/ops/ragged/ragged_tensor.py#L1).+*   `ListArray<StructArray<... recursion>>` ->+    [StructuredTensors](https://github.com/tensorflow/community/blob/master/rfcs/20190910-struct-tensor.md)++In other cases, copies can be avoided for the values, but some computation is+needed:++*   `ListArray<ListArray<...>>` -> `tf.SparseTensor`+    *   Need to compute the sparse indices from `ListArray`'s list offsets.++The remaining cases require a copy:++*   `ListArray<ListArray<...>>`(of non-equal-length lists) -> dense Tensors++With TensorRepresentation available in the Schema, a TFXIO implementation may+optimize its decoder to choose the most efficient Arrow type.++#### Conversion of string features++Arrow’s string arrays (`BinaryArray`) have a different memory layout than+TensorFlow’s string Tensors, even with+[`tensorflow::tstring`](https://github.com/tensorflow/community/blob/master/rfcs/20190411-string-unification.md).+There is always some overhead in conversion, but with `tensorflow::tstring` a+Tensor of `string_view`s is possible, thus the overhead will be a function of+the number of strings being converted, instead of the lengths of the strings.++#### TF APIs for conversions++In TF 1.x we will use np.ndarray as a bridge as Arrow has zero-copy conversion+to numpy’s ndarrays. (not for string arrays).++Starting from TF 2.x, we will be able to create EagerTensors from Python+memoryview(s) so that strings can be covered.++## TFMD Schema++[The TFMD Schema](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/schema.proto)+is a pipeline-level artifact and in the scope of this proposal, it may serve two+purposes:++*   To provide optional inputs to the parsing logic for optimizations.+*   To carry user’s intents of converting data to TF feedables.++The two purposes don’t have to be served in the following cases:++*   TFDV should not require a schema to work and it does not need TF feedables.+*   Some TFXIO implementation may not need the schema for either purposes.++Therefore the TFMD schema is optional, and a TFXIO implementation:++*   should guarantee that the `BeamSource()`can return a valid+    `PCollection[RecordBatch]` without a schema.+    *   Other interfaces may raise an error when a schema was not provided.+*   does not have to require a TFMD schema for all its interfaces to work.++## (TensorFlow) Trainer integration++For TFX to freely choose the storage format for training examples for a user, we+**cannot** expose file-based or record-based interface to that user in the TF+trainer, because:++*   the user might not know how to open those files.+*   there might not be an efficient representation of a “record” (this is true+    for columnar storage formats like Apache Parquet) but only an efficient+    representation of a batch of records.++Thus we propose that to most users, the TF Trainer only exposes a handle to a+`tf.data.Dataset` of parsed (composite) Tensors.++Each `TFXIO` implementation will implement a `TFDataset()` interface to return+such a `tf.data.Dataset`. This dataset contains logically a set of batched

Can we instead return a Dataset of records, and let the user control their own batching using Dataset.batch()? For efficiency, tf.data could easily provide rewrites that push the batching (as well as projections!) down into the reader and map vectorization could push the batching closer to the source.

/cc @jsimsa @rachellim

brills

comment created time in 4 months

Pull request review commenttensorflow/community

RFC: TFX Standardized Inputs

+<!-- mdlint off(HEADERS_TOO_MANY_H1) -->++# Standardized TFX Inputs++Status        | Proposed+:------------ | :------------------------------------------------------------+**RFC #**     | [162](https://github.com/tensorflow/community/pull/162)+**Author(s)** | Zhuo Peng (zhuo@google.com), Kester Tong (kestert@google.com)+**Sponsor**   | Konstantinos Katsiapis (katsiapis@google.com)+**Updated**   | 2019-10-03++# Objective++*   To define a common in-memory data representation that:+    *   is powerful enough to encode the following logical training data format:+        flat+        ([`tf.Example`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L88)),+        sequence+        ([`tf.SequenceExample`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L298))+        or structured data (e.g.+        [Protocol Buffers](https://developers.google.com/protocol-buffers) or+        [Apache Avro](https://avro.apache.org/)).+    *   all TFX components can understand and can support their own unique use+        cases with.+*   To define an I/O abstraction layer that produces the above in-memory+    representation from supported physical storage formats, while hiding TFX’s+    choice of such storage formats from TFX users.+*   To define a bridge from the above in-memory representation to TF feedables+    (i.e. Tensors and certain+    [CompositeTensors](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/python/framework/composite_tensor.py#L1)).++# Motivation++## Fragmented in-memory data representations across TFX++A TFX component may use its input data (data generated by ExampleGen) in two+ways:++*   it may need to understand the data and conduct analysis. Usually this+    happens in [Apache Beam](https://beam.apache.org/), and does not involve a+    TF Model. For example:+    *   [TFDV](https://github.com/tensorflow/data-validation) and+        [TFT](https://github.com/tensorflow/transform) compute some statistics+        over the data.+    *   [TFMA](https://github.com/tensorflow/model-analysis) may slice the+        dataset by certain columns in the data.+*   it may feed the data to TensorFlow. Note that feeding TF alone may not+    require understanding the data. For example, TFMA may feed a TF model with+    serialized tf.Example, which may be the raw form of the data.++Currently, each TFX component has its own in-memory data representation to cover+the two use cases by a different approach:++|    | TFDV | TFT  | TFMA | BulkInference |+|:---| :--- | :--- | :--- | :------------ |+| In-memory data representation | Arrow RecordBatches | Dict[str, np.ndarray] | str (raw data records), Dict[str, np.ndarray] | str (raw data records) |+| Understand the data and conduct analysis | input data is encoded losslessly as RecordBatches. | the in-mem representation may be lossy. | Relies on the model’s input layer, and the format is Dict[str, np.ndarray]. | N/A |+| Feed TF | N/A | the in-mem representation is TF feedable. | Feed “raw data” to the model. | Feed “raw data” to the model |++This has created many issues:++*   Users of individual components need to adapt their data (if input format not+    already supported) to each component they want to use.+*   Individual components rely on unenforceable assumptions on how to interpret+    the input data consistently.+*   The complexity of adding new logical data representations (for example,+    tf.SequenceExample) scales with the number of components.++## The need for supporting new physical storage formats in TFX++Two factors drive this need:++*   TFX needs to offer users more choices of the storage format, e.g,+    [Apache Parquet](https://parquet.apache.org/).+*   TFX wants to be able to choose the optimal storage format based on user’s+    workload, in a user-transparent manner. A unified I/O abstraction would make+    it easier to support a new physical format in TFX, since one would not have+    to understand every single TFX component in order to implement such support.++## TFX interoperability with the rest of the world++If we choose a commonly available and adopted exchange format as our in-memory+representation, our users will be able to use TFX components with much less+effort on data conversion. This aligns with TFX’s long term vision.++# User Benefit++## TFX End Users++While this change is transparent to end users, it will facilitate the design and+implementation of many user-facing features, for example:++*   Columnar storage format in TFX.+*   Structured training examples.++## Individual TFX component users++We use TFXIO to refer to the proposed I/O abstraction layer. All TFX components+will start using TFXIO to ingest the data and have a unified way of representing+the data. Individual TFX component users would be able to implement TFXIO for+their own data formats / storage formats that are not supported by TFX. By+design, any such implementation will be readily accessible by all TFX+components.++## TFX developers++Developers working on TFX infrastructure will not have to understand the+internals of each component any more in order to make changes to I/O and parsing+(for example, adding support for a new storage format for the training+examples).++Developers working on TFX components would benefit from sharing common+operations against the unified in-memory representation, or even higher-level+computations. For instance, suppose that we implement a sketch-based algorithm+to compute approximate heavy hitters over this in-memory representation. We can+now share this implementation inside both TFDV and TFT for their top-K feature+value computation.++# Design Proposal++This design proposes **a common in-memory data representation**, **a way to+translate that into TF feedables** (np.ndarray or EagerTensors) and **a set of+APIs** each component can use to get both.++![alt_text](20191017-tfx-standardized-inputs/overview.png)++## Common in-memory data representation++[Apache Arrow](https://arrow.apache.org/) will be used as the common in-memory+data representation. Beam-based TFX components will accept+<code>PCollection[pyarrow.[RecordBatch](https://arrow.apache.org/docs/python/data.html#record-batches)]</code>.++Each logical data format will have its own encoding convention,+[discussed](#logical-data-encoding-in-arrow) in the detailed design.++We chose Apache Arrow because:++*   It’s Expressive enough.+    *   Lossless encoding of (conformant) tf.Example, tf.SequenceExample+    *   Can encode structured data (proto)+*   It’s a columnar format. It works well with common TFX workloads:+    *   Column (feature)-wise analysis+    *   Feed a batch of columns (features) to TensorFlow.+*   It’s OSS friendly.+    *   Community support for more storage format I/O (e.g. Apache Parquet)+    *   Friendly to other OSS data formats, both in-memory and on disk (e.g.+        Pandas)+    *   Friendly to numpy / TF: many Arrow array types share the same memory+        layout with numpy ndarrays and certain type of TF (composite) Tensors.+*   TF neutral.+    *   Leaves the possibility of supporting other ML libraries open.++## Translation from Arrow to TF feedables++The analogy to this is parsing tf.Examples into TF feedables -- extra+information is needed in this translation because a+[`Feature`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/feature.proto#L76)+can be converted to a Tensor, a SparseTensor or a+[RaggedTensor](https://www.tensorflow.org/guide/ragged_tensor) depending on the+[feature specs](https://github.com/tensorflow/tensorflow/blob/635e23a774936b5fe6fa3ef3cb6e54b55d93f324/tensorflow/python/ops/parsing_ops.py#L46-L49).+Currently this extra information is implicitly contained in the pipeline schema+(an instance of the+[TFMD Schema](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/schema.proto))+proto.++Similarly, an Arrow column can be translated to various TF feedables.+[An extension to the pipeline schema](#tensorrepresentation) is proposed to for+a user to express the intention for conversion.++The conversion can be efficient (zero-copy) in certain cases. It is+[discussed](#efficient-arrow-tensor-conversion) in the detailed design.++## Standardized Inputs APIs++We propose a set of APIs that TFX components will call, and need to be+implemented for each of the supported combination of {physical, logical} format.++```py+class TFXIO(object):+  """Abstract basic class of all Standardized TFX inputs API implementations."""+  def __init__(+      self,+      schema: Optional[tfmd.Schema]=None+  ):+    pass++  @abc.abstractmethod+  def BeamSource(self,+                 projections: Optional[List[Text]]=None+  ) -> beam.PTransform:+    """Returns a beam PTransform that produces PCollection[pa.RecordBatch].++    May NOT raise an error if the TFMD schema was not provided at construction time.++    Args:+      projections: if not None, only the specified subset of columns will be+      read.+    """++  @abc.abstractmethod+  def TensorAdapter(self) -> TensorAdapter:+    """Returns a TensorAdapter that converts pa.RecordBatch to TF inputs.++    May raise an error if the TFMD schema was not provided at construction time.+    """++  @abc.abstractmethod+  def ArrowSchema(self) -> pyarrow.Schema:+    """Returns the schema of the Arrow RecordBatch generated by BeamSource().++    May raise an error if the TFMD schema was not provided at construction time.+    """++  @abc.abstractmethod+  def TFDataset(self, ...) -> tf.data.Dataset:+    """Returns a Dataset of TF inputs.++    May raise an error if the TFMD schema was not provided at construction time.+    """+```++Where `TensorAdapter` is:++```py+class TensorAdapter(object):++  def __init__(+      self,+      arrow_schema: pyarrow.Schema,+      tensor_representations: Dict[str, TensorRepresentation]):+    """Initializer.++    Args:+      arrow_schema: the schema of the RecordBatches this adapter is to receive+        in ToBatchTensors().+      tensor_representations: keys are the names of the output tensors; values+      describe how an output tensor should be derived from a RecordBatch.+    """+++  def TypeSpecs(self) -> Dict[str, tf.TypeSpec]:+    """Returns tf.TypeSpec for each tensor in `tensor_representation`.++    TypeSpecs can be used to construct placeholders or tf.function signatures.+    """++  def ToBatchTensors(+      self, record_batch: pyarrow.RecordBatch,+      projections: Optional[List[TensorName]]=None+  ) -> Dict[str, TFFeedable]:  # TFFeedable: np.ndarrays or tf.EagerTensor+                               # (or compositions of them, i.e.+                               # CompositeTensors).+    """Converts a RecordBatch to batched TFFeedables per `tensor_representation`++    Each will conform to the corresponding TypeSpec / TensorRepresentation.++    Args:+      projections: a set of names of TFFeedables (mentioned in+      `tensor_representation`). If not None, only TFFeedables of those names+      will be converted.+    """+```++Note that we will provide a default implementation of `TensorAdapter`, but TFXIO+implementations can implement their own `TensorAdapter`. A custom+`TensorAdapter` would allow a `TFXIO` implmentation to rely on a TF graph to+do parsing -- the same graph can be used in both `BeamSource` and+`TensorAdapter`.++The default `TensorAdapter` can be constructed out of the Arrow schema (which+is required for any TFXIO implementation) and `TensorRepresentations`. The+latter is part of the TFMD schema. See [this section](#tensorrepresentation)+for details.++# Detailed Design++## Logical data encoding in Arrow++On a high level, a batch of logical entities (“examples”) is encoded into a+[`pyarrow.RecordBatch`](https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch).+Features or fields (from structured records) are encoded as columns in the+RecordBatch.++Note that+[`pyarrow.Table`](https://arrow.apache.org/docs/python/data.html#tables) offers+an abstraction similar to RecordBatch with the key difference being that a+column in a Table might contain multiple chunks of contiguous memory regions+while a column in a RecordBatch contains only one chunk. RecordBatch is chosen+because we want to enforce that TFXIO implementations produce batched data in+the most efficient way (one chunk per batch). Users of TFXIO may construct a+Table from one or more RecordBatches since easy conversion from one to the other+is supported by Apache Arrow.++This design aims to support the logical structure of tf.Example,+tf.SequenceExample or structured data like Protocol Buffers. Thus only a subset+of Arrow array types are needed. All TFX components will guarantee to understand+those types, but no more. Below is a summary of supported encodings:++| Logical representation | Arrow encoding |+| :--------------------- | :------------- |+| Feature with no value | `NullArray`                                  |+| Univalent feature (one value per example) | `FixedSizeListArray` (list_size = 1) |+| Multivalent feature (multiple values per example) | `[FixedSize]ListArray` |+| Sequence feature (list of lists of values per example) | `[FixedSize]ListArray<[FixedSize]ListArray>` |+| Proto-like structured data | `ListArray<StructArray<{subfield:ListArray<recursion>}>>` |++However the design is flexible to support more complicated logical structures,+for example, k-nested sequences (tf.SequenceExample is 2-nested).++Next we show that these encodings cover the logical data formats we aim to+support:++### tf.Example++[Conformant](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L78)+tf.Examples are assumed. I/O + parsing should throw an error upon non-conformant+instances.++A key requirement derived from the conformant-ness is for the encoding to be+able to distinguish the following two cases:++*   a feature is present, but it’s value list is empty++    ```+    {+      features {+        "my_feature": {+          bytes_list {+          }+        }+    }+    ```++*   a feature is not present++    ```+    {+      features {+      }+    }+    ```++    or++    ```+    {+      features {+        "my_feature": {}  # none of the oneof is set+      }+    }+    ```++Each feature can be encoded as:++```+[FixedSize]ListArray<int64|float32|binary>+```++Then, the feature value in case a) is encoded as an empty sub-list, while the+feature value in case b) is encoded as null.++If we know that all the lists in a `ListArray` are of equal length (from the+schema of the data, see below sections), `FixedSizeListArray` can be used to+obviate the `O(N)` space overhead for lengths of lists.++### tf.SequenceExample++[Conformant](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L184)+tf.SequenceExamples are assumed. I/O + parsing should throw an error upon+non-conformant instances.++A context feature will be encoded similarly to a feature in tf.Example. A+sequence feature will be encoded as:++```+[FixedSize]ListArray<[FixedSize]ListArray<int64|float32|binary>>+```++To avoid name conflicts with context features, all the sequence features can be+grouped into one `StructArray`:++```+StructArray<{'sequence_feature1': ListArray<ListArray<int64|float32|binary>>, ...}>+```++### Structured data (e.g. Protocol Buffers / Apache Avro)++A batch of structured records can be encoded as follows:++*   Each direct leaf field of the structure can be encoded similarly to+    tf.Example. (`ListArray` of primitive types).+*   Each sub-message can be encoded as:++    ```+    ListArray<StructArray<recursion...>>>+    ```++## Arrow to TF Feedable conversion++### TensorRepresentation++One or more Arrow columns can potentially be converted to multiple types of TF+feedables.++For example, a `ListArray<int64>` can be converted to:++*   a Tensor, if given a default value to pad+*   a SparseTensor to represent a ragged array+*   a RaggedTensor++The choice depends on user’s intents, which currently is+[implicitly](https://github.com/tensorflow/transform/blob/11afcff467f779ba6163686395582e69603987d1/tensorflow_transform/tf_metadata/schema_utils.py#L172)+expressed in the pipeline schema.++We propose to create a new [TFMD](https://github.com/tensorflow/metadata)+(TensorFlow MetaData) Proto, `TensorRepresentation` to carry those intents implicitly:++```protobuf+message TensorRepresentation {+  oneof {+    DenseTensor { … }  // column_name, dtype, shape, default_value+    VarLenSparseTensor { … }  // column_name, dtype+    SparseTensor { }  // dtype, value_column_name, indice_column_names+    VarLenRaggedTensor { … } // dtype+    RaggedTensor { } // dtype, value_column_name, row_partition_column_names, ...+    StructuredTensor { } // column_names+  }+}+```++This proto is used in two places:++*   It’s part of TFMD schema:++    ```protobuf+      message TensorRepresentationGroup {+        map<string, TensorRepresentation> tensor_representation = 2;+      };++      message Schema {+       repeated Feature feature = 1;+       // …+       map<string, TensorRepresentationGroup> tensor_representation_group = 42;+      }+    ```++    Note :++    *   `TensorRepresentationGroup` allows different instances of one TFX+        component to use different sets of `TensorRepresentation`s.+    *   `tensor_representation_group` is **optional**. If the user does not+        specify any, a default representation will be derived from+        schema.feature to keep backwards compatibility.+    *   this field is **not** a sub-message of Schema::Feature, because a TF+        feedable may comprise multiple columns++    Being part of the schema makes it possible to serialize and materialize the+    intents for other components to use, which allows TFT’s materialization+    functionality to have its own TFXIO implementation that hides the+    data/physical format from the user.++    When generating the initial schema from the statistics of the data, TFDV can+    propose a default set of `TensorRepresentationGroup`. The user may revise+    the proposal and TFDV can validate `TensorRepresentationGroup`s in a+    continuous manner.++*   The default implementation of TensorAdapter takes an optional `Dict[str,+    TensorRepresentation]` at construction time. If a TFXIO implementation+    choose to use the default TensorAdapter, it needs to provide them (may come+    directly from the Schema).++### Efficient Arrow->Tensor conversion++The key to efficient conversions is to avoid copying of data. The prerequisites+to do so are:++*   Same memory alignment+*   Same memory layout++Currently 64-byte alignment is the standard in both Tensorflow's `TensorBuffer`+and Apache Arrow's `Buffer`. Forthermore, it can be guaranteed by implementing+our own version of `arrow::MemoryPool` that is backed by a

Would this require changes in Beam to ensure that it uses our custom MemoryPool?

brills

comment created time in 4 months

Pull request review commenttensorflow/community

RFC: TFX Standardized Inputs

+<!-- mdlint off(HEADERS_TOO_MANY_H1) -->++# Standardized TFX Inputs++Status        | Proposed+:------------ | :------------------------------------------------------------+**RFC #**     | [162](https://github.com/tensorflow/community/pull/162)+**Author(s)** | Zhuo Peng (zhuo@google.com), Kester Tong (kestert@google.com)+**Sponsor**   | Konstantinos Katsiapis (katsiapis@google.com)+**Updated**   | 2019-10-03++# Objective++*   To define a common in-memory data representation that:+    *   is powerful enough to encode the following logical training data format:+        flat+        ([`tf.Example`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L88)),+        sequence+        ([`tf.SequenceExample`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L298))+        or structured data (e.g.+        [Protocol Buffers](https://developers.google.com/protocol-buffers) or+        [Apache Avro](https://avro.apache.org/)).+    *   all TFX components can understand and can support their own unique use+        cases with.+*   To define an I/O abstraction layer that produces the above in-memory+    representation from supported physical storage formats, while hiding TFX’s+    choice of such storage formats from TFX users.+*   To define a bridge from the above in-memory representation to TF feedables+    (i.e. Tensors and certain+    [CompositeTensors](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/python/framework/composite_tensor.py#L1)).++# Motivation++## Fragmented in-memory data representations across TFX++A TFX component may use its input data (data generated by ExampleGen) in two+ways:++*   it may need to understand the data and conduct analysis. Usually this+    happens in [Apache Beam](https://beam.apache.org/), and does not involve a+    TF Model. For example:+    *   [TFDV](https://github.com/tensorflow/data-validation) and+        [TFT](https://github.com/tensorflow/transform) compute some statistics+        over the data.+    *   [TFMA](https://github.com/tensorflow/model-analysis) may slice the+        dataset by certain columns in the data.+*   it may feed the data to TensorFlow. Note that feeding TF alone may not+    require understanding the data. For example, TFMA may feed a TF model with+    serialized tf.Example, which may be the raw form of the data.++Currently, each TFX component has its own in-memory data representation to cover+the two use cases by a different approach:++|    | TFDV | TFT  | TFMA | BulkInference |+|:---| :--- | :--- | :--- | :------------ |+| In-memory data representation | Arrow RecordBatches | Dict[str, np.ndarray] | str (raw data records), Dict[str, np.ndarray] | str (raw data records) |+| Understand the data and conduct analysis | input data is encoded losslessly as RecordBatches. | the in-mem representation may be lossy. | Relies on the model’s input layer, and the format is Dict[str, np.ndarray]. | N/A |+| Feed TF | N/A | the in-mem representation is TF feedable. | Feed “raw data” to the model. | Feed “raw data” to the model |++This has created many issues:++*   Users of individual components need to adapt their data (if input format not+    already supported) to each component they want to use.+*   Individual components rely on unenforceable assumptions on how to interpret+    the input data consistently.+*   The complexity of adding new logical data representations (for example,+    tf.SequenceExample) scales with the number of components.++## The need for supporting new physical storage formats in TFX++Two factors drive this need:++*   TFX needs to offer users more choices of the storage format, e.g,+    [Apache Parquet](https://parquet.apache.org/).+*   TFX wants to be able to choose the optimal storage format based on user’s+    workload, in a user-transparent manner. A unified I/O abstraction would make+    it easier to support a new physical format in TFX, since one would not have+    to understand every single TFX component in order to implement such support.++## TFX interoperability with the rest of the world++If we choose a commonly available and adopted exchange format as our in-memory+representation, our users will be able to use TFX components with much less+effort on data conversion. This aligns with TFX’s long term vision.++# User Benefit++## TFX End Users++While this change is transparent to end users, it will facilitate the design and+implementation of many user-facing features, for example:++*   Columnar storage format in TFX.+*   Structured training examples.++## Individual TFX component users++We use TFXIO to refer to the proposed I/O abstraction layer. All TFX components+will start using TFXIO to ingest the data and have a unified way of representing+the data. Individual TFX component users would be able to implement TFXIO for+their own data formats / storage formats that are not supported by TFX. By+design, any such implementation will be readily accessible by all TFX+components.++## TFX developers++Developers working on TFX infrastructure will not have to understand the+internals of each component any more in order to make changes to I/O and parsing+(for example, adding support for a new storage format for the training+examples).++Developers working on TFX components would benefit from sharing common+operations against the unified in-memory representation, or even higher-level+computations. For instance, suppose that we implement a sketch-based algorithm+to compute approximate heavy hitters over this in-memory representation. We can+now share this implementation inside both TFDV and TFT for their top-K feature+value computation.++# Design Proposal++This design proposes **a common in-memory data representation**, **a way to+translate that into TF feedables** (np.ndarray or EagerTensors) and **a set of+APIs** each component can use to get both.++![alt_text](20191017-tfx-standardized-inputs/overview.png)++## Common in-memory data representation++[Apache Arrow](https://arrow.apache.org/) will be used as the common in-memory+data representation. Beam-based TFX components will accept+<code>PCollection[pyarrow.[RecordBatch](https://arrow.apache.org/docs/python/data.html#record-batches)]</code>.++Each logical data format will have its own encoding convention,+[discussed](#logical-data-encoding-in-arrow) in the detailed design.++We chose Apache Arrow because:++*   It’s Expressive enough.+    *   Lossless encoding of (conformant) tf.Example, tf.SequenceExample+    *   Can encode structured data (proto)+*   It’s a columnar format. It works well with common TFX workloads:+    *   Column (feature)-wise analysis+    *   Feed a batch of columns (features) to TensorFlow.+*   It’s OSS friendly.+    *   Community support for more storage format I/O (e.g. Apache Parquet)+    *   Friendly to other OSS data formats, both in-memory and on disk (e.g.+        Pandas)+    *   Friendly to numpy / TF: many Arrow array types share the same memory+        layout with numpy ndarrays and certain type of TF (composite) Tensors.+*   TF neutral.+    *   Leaves the possibility of supporting other ML libraries open.++## Translation from Arrow to TF feedables

Will it be possible to translate any Arrow RecordBatch to a TF representation? e.g. Will we need to do anything special for timestamps, unions, etc.?

brills

comment created time in 4 months

Pull request review commenttensorflow/community

RFC: TFX Standardized Inputs

+<!-- mdlint off(HEADERS_TOO_MANY_H1) -->++# Standardized TFX Inputs++Status        | Proposed+:------------ | :------------------------------------------------------------+**RFC #**     | [162](https://github.com/tensorflow/community/pull/162)+**Author(s)** | Zhuo Peng (zhuo@google.com), Kester Tong (kestert@google.com)+**Sponsor**   | Konstantinos Katsiapis (katsiapis@google.com)+**Updated**   | 2019-10-03++# Objective++*   To define a common in-memory data representation that:+    *   is powerful enough to encode the following logical training data format:+        flat+        ([`tf.Example`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L88)),+        sequence+        ([`tf.SequenceExample`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L298))+        or structured data (e.g.+        [Protocol Buffers](https://developers.google.com/protocol-buffers) or+        [Apache Avro](https://avro.apache.org/)).+    *   all TFX components can understand and can support their own unique use+        cases with.+*   To define an I/O abstraction layer that produces the above in-memory+    representation from supported physical storage formats, while hiding TFX’s+    choice of such storage formats from TFX users.+*   To define a bridge from the above in-memory representation to TF feedables+    (i.e. Tensors and certain+    [CompositeTensors](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/python/framework/composite_tensor.py#L1)).++# Motivation++## Fragmented in-memory data representations across TFX++A TFX component may use its input data (data generated by ExampleGen) in two+ways:++*   it may need to understand the data and conduct analysis. Usually this+    happens in [Apache Beam](https://beam.apache.org/), and does not involve a+    TF Model. For example:+    *   [TFDV](https://github.com/tensorflow/data-validation) and+        [TFT](https://github.com/tensorflow/transform) compute some statistics+        over the data.+    *   [TFMA](https://github.com/tensorflow/model-analysis) may slice the+        dataset by certain columns in the data.+*   it may feed the data to TensorFlow. Note that feeding TF alone may not+    require understanding the data. For example, TFMA may feed a TF model with+    serialized tf.Example, which may be the raw form of the data.++Currently, each TFX component has its own in-memory data representation to cover+the two use cases by a different approach:++|    | TFDV | TFT  | TFMA | BulkInference |+|:---| :--- | :--- | :--- | :------------ |+| In-memory data representation | Arrow RecordBatches | Dict[str, np.ndarray] | str (raw data records), Dict[str, np.ndarray] | str (raw data records) |+| Understand the data and conduct analysis | input data is encoded losslessly as RecordBatches. | the in-mem representation may be lossy. | Relies on the model’s input layer, and the format is Dict[str, np.ndarray]. | N/A |+| Feed TF | N/A | the in-mem representation is TF feedable. | Feed “raw data” to the model. | Feed “raw data” to the model |++This has created many issues:++*   Users of individual components need to adapt their data (if input format not+    already supported) to each component they want to use.+*   Individual components rely on unenforceable assumptions on how to interpret+    the input data consistently.+*   The complexity of adding new logical data representations (for example,+    tf.SequenceExample) scales with the number of components.++## The need for supporting new physical storage formats in TFX++Two factors drive this need:++*   TFX needs to offer users more choices of the storage format, e.g,+    [Apache Parquet](https://parquet.apache.org/).+*   TFX wants to be able to choose the optimal storage format based on user’s+    workload, in a user-transparent manner. A unified I/O abstraction would make+    it easier to support a new physical format in TFX, since one would not have+    to understand every single TFX component in order to implement such support.++## TFX interoperability with the rest of the world++If we choose a commonly available and adopted exchange format as our in-memory+representation, our users will be able to use TFX components with much less+effort on data conversion. This aligns with TFX’s long term vision.++# User Benefit++## TFX End Users++While this change is transparent to end users, it will facilitate the design and+implementation of many user-facing features, for example:++*   Columnar storage format in TFX.+*   Structured training examples.++## Individual TFX component users++We use TFXIO to refer to the proposed I/O abstraction layer. All TFX components+will start using TFXIO to ingest the data and have a unified way of representing+the data. Individual TFX component users would be able to implement TFXIO for+their own data formats / storage formats that are not supported by TFX. By+design, any such implementation will be readily accessible by all TFX+components.++## TFX developers++Developers working on TFX infrastructure will not have to understand the+internals of each component any more in order to make changes to I/O and parsing+(for example, adding support for a new storage format for the training+examples).++Developers working on TFX components would benefit from sharing common+operations against the unified in-memory representation, or even higher-level+computations. For instance, suppose that we implement a sketch-based algorithm+to compute approximate heavy hitters over this in-memory representation. We can+now share this implementation inside both TFDV and TFT for their top-K feature+value computation.++# Design Proposal++This design proposes **a common in-memory data representation**, **a way to+translate that into TF feedables** (np.ndarray or EagerTensors) and **a set of+APIs** each component can use to get both.++![alt_text](20191017-tfx-standardized-inputs/overview.png)++## Common in-memory data representation++[Apache Arrow](https://arrow.apache.org/) will be used as the common in-memory+data representation. Beam-based TFX components will accept

Does this depend on any new functionality in Apache Beam? (I tried searching for Arrow/Beam integration information, and in the codebase, and couldn't find much, but perhaps I was looking in the wrong place....)

brills

comment created time in 4 months

Pull request review commenttensorflow/community

RFC: TFX Standardized Inputs

+<!-- mdlint off(HEADERS_TOO_MANY_H1) -->++# Standardized TFX Inputs++Status        | Proposed+:------------ | :------------------------------------------------------------+**RFC #**     | [162](https://github.com/tensorflow/community/pull/162)+**Author(s)** | Zhuo Peng (zhuo@google.com), Kester Tong (kestert@google.com)+**Sponsor**   | Konstantinos Katsiapis (katsiapis@google.com)+**Updated**   | 2019-10-03++# Objective++*   To define a common in-memory data representation that:+    *   is powerful enough to encode the following logical training data format:+        flat+        ([`tf.Example`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L88)),+        sequence+        ([`tf.SequenceExample`](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/core/example/example.proto#L298))+        or structured data (e.g.+        [Protocol Buffers](https://developers.google.com/protocol-buffers) or+        [Apache Avro](https://avro.apache.org/)).+    *   all TFX components can understand and can support their own unique use+        cases with.+*   To define an I/O abstraction layer that produces the above in-memory+    representation from supported physical storage formats, while hiding TFX’s+    choice of such storage formats from TFX users.+*   To define a bridge from the above in-memory representation to TF feedables+    (i.e. Tensors and certain+    [CompositeTensors](https://github.com/tensorflow/tensorflow/blob/abfba15cd9734cec7ecd3d0661b146fc251c842d/tensorflow/python/framework/composite_tensor.py#L1)).++# Motivation++## Fragmented in-memory data representations across TFX++A TFX component may use its input data (data generated by ExampleGen) in two+ways:++*   it may need to understand the data and conduct analysis. Usually this+    happens in [Apache Beam](https://beam.apache.org/), and does not involve a+    TF Model. For example:+    *   [TFDV](https://github.com/tensorflow/data-validation) and+        [TFT](https://github.com/tensorflow/transform) compute some statistics+        over the data.+    *   [TFMA](https://github.com/tensorflow/model-analysis) may slice the+        dataset by certain columns in the data.+*   it may feed the data to TensorFlow. Note that feeding TF alone may not+    require understanding the data. For example, TFMA may feed a TF model with+    serialized tf.Example, which may be the raw form of the data.++Currently, each TFX component has its own in-memory data representation to cover+the two use cases by a different approach:++|    | TFDV | TFT  | TFMA | BulkInference |+|:---| :--- | :--- | :--- | :------------ |+| In-memory data representation | Arrow RecordBatches | Dict[str, np.ndarray] | str (raw data records), Dict[str, np.ndarray] | str (raw data records) |+| Understand the data and conduct analysis | input data is encoded losslessly as RecordBatches. | the in-mem representation may be lossy. | Relies on the model’s input layer, and the format is Dict[str, np.ndarray]. | N/A |+| Feed TF | N/A | the in-mem representation is TF feedable. | Feed “raw data” to the model. | Feed “raw data” to the model |++This has created many issues:++*   Users of individual components need to adapt their data (if input format not+    already supported) to each component they want to use.+*   Individual components rely on unenforceable assumptions on how to interpret+    the input data consistently.+*   The complexity of adding new logical data representations (for example,

And the TF Ops that do I/O are tf.Dataset, so unless we bridge the gap between beam's PSource and tf.Dataset, we can't easily use TF OPs to do parsing.

How difficult would that be? There are a lot of custom tf.data.Dataset adapters in tensorflow/io, so there's some precedent here. Not all of them require a record-based serialization.

I'm not familiar with Beam's extension points, but other similar systems provide a way for users to provide a "mapper" that controls iteration across an individual partition (e.g. Spark's RDD.mapPartitions()).

For the TFX components that are passing their input directly into TF, there's probably some value in optimizing the path to tensors, instead of indirecting via RecordBatch.

/cc @katsiapis @yongtang @jsimsa

brills

comment created time in 4 months

issue closedtensorflow/tensorflow

After Installing Tensorflow when I TRy to verify I getting Follwing error can some body help on this

<em>Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em>

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): NO custom code or Module

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 8.1 (64 bit)

  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No mobile device

  • TensorFlow installed from (source or binary): binary

  • TensorFlow version (use command below):

    pip install tensorflow pip3 install tensorflow Currently default comes as tensorflow C:\Phyton>pip3 show tensorflow Name: tensorflow Version: 1.11.0 Summary: TensorFlow is an open source machine learning framework for everyone. Home-page: https://www.tensorflow.org/ Author: Google Inc. Author-email: opensource@google.com License: Apache 2.0 Location: c:\users\avinash.t\anaconda3\lib\site-packages Requires: termcolor, astor, tensorboard, keras-applications, numpy, grpcio, whee l, keras-preprocessing, setuptools, six, protobuf, gast, absl-py Required-by:

  • Python version: 3.6.7

  • Bazel version (if compiling from source): No compilation used

  • GCC/Compiler version (if compiling from source): No compilation used

  • CUDA/cuDNN version: No CUDA

  • GPU model and memory: No GPU

You can collect some of this information using our environment capture script You can also obtain the TensorFlow version with python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" Version is :- 1.11 When i execute the above command following error occurs

Failed to load the native TensorFlow runtime.

Describe the current behavior LOG is Posted Describe the expected behavior

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Other info / logs C:\Users\avinash.t\Anaconda3>python Python 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bi t (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import tensor Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'tensor'

import tensorflow as tf Traceback (most recent call last): File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap_ tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap_ tensorflow_internal.py", line 28, in <module> pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript ion) File "C:\Users\avinash.t\Anaconda3\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\avinash.t\Anaconda3\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: A dynamic link library (DLL) initialization routin e failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow_init_.py", line 22, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-im port File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python_init .py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap tensorflow.py", line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap_ tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap_ tensorflow_internal.py", line 28, in <module> pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\avinash.t\Anaconda3\lib\site-packages\tensorflow\python\pywrap tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript ion) File "C:\Users\avinash.t\Anaconda3\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\avinash.t\Anaconda3\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: A dynamic link library (DLL) initialization routin e failed.

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_probl ems

for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

closed time in 5 months

AvinashTiwari

issue commenttensorflow/tensorflow

After Installing Tensorflow when I TRy to verify I getting Follwing error can some body help on this

The self-check functions are once again available in the latest versions of TensorFlow (1.15 / 2.0), so please try again with a more recent version, and open a new issue if they don't work.

AvinashTiwari

comment created time in 5 months

more