Skip to content

Commit

Permalink
Merge pull request #28 from yongtang/docs
Browse files Browse the repository at this point in the history
Update docs for installation
  • Loading branch information
yongtang authored Dec 17, 2018
2 parents a2589ab + daa53b0 commit 63ea552
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 16 deletions.
49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,56 @@
TensorFlow I/O is a collection of file systems and file formats that are not
available in TensorFlow's built-in support.

## Developing

The TensorFlow I/O package (`tensorflow-io`) could be built from source:
```sh
$ docker run -it -v ${PWD}:/working_dir -w /working_dir tensorflow/tensorflow:custom-op
$ # In docker
$ ./configure.sh
$ bazel build build_pip_pkg
$ bazel-bin/build_pip_pkg artifacts
```

A package file `artifacts/tensorflow_io-*.whl` will be generated after a build is successful.
At the moment TensorFlow I/O supports 4 data sources:
- `tensorflow_io.ignite`: Data source for Apache Ignite and Ignite File System (IGFS).
- `tensorflow_io.kafka`: Apache Kafka stream-processing support.
- `tensorflow_io.kinesis`: Amazon Kinesis data streams support.
- `tensorflow_io.hadoop`: Hadoop SequenceFile format support.

## Installation

Once a package file `artifacts/tensorflow_io-*.whl` is ready, installation could be done through:
The `tensorflow-io` package could be installed with pip directly:
```
$ pip install working_dir/artifacts/tensorflow_io-*.whl
$ pip install tensorflow-io
```

The related module could be imported with python:
The related module such as Kafka could be imported with python:
```
$ python
Python 2.7.6 (default, Nov 13 2018, 12:45:42)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow_io.kafka import KafkaDataset
>>> import tensorflow as tf
>>> import tensorflow_io.kafka as kafka
>>>
>>> dataset = kafka.KafkaDataset(["test:0:0:4"], group="test", eof=True)
>>> iterator = dataset.make_initializable_iterator()
>>> init_op = iterator.initializer
>>> get_next = iterator.get_next()
>>>
>>> with tf.Session() as sess:
... print(sess.run(init_op))
... for i in range(5):
... print(sess.run(get_next))
>>>
```

Note that python has to run outside of repo directory itself, otherwise python may not
be able to find the correct path to the module.

## Developing

The TensorFlow I/O package (`tensorflow-io`) could be built from source:
```sh
$ docker run -it -v ${PWD}:/working_dir -w /working_dir tensorflow/tensorflow:custom-op
$ # In docker
$ ./configure.sh
$ bazel build build_pip_pkg
$ bazel-bin/build_pip_pkg artifacts
```

A package file `artifacts/tensorflow_io-*.whl` will be generated after a build is successful.

## License

[Apache License 2.0](LICENSE)
21 changes: 21 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Release 0.1.0

Initial release of TensorFlow I/O.

## Major Features
* `tensorflow_io.ignite`: Data source for Apache Ignite and File System (IGFS).
* `tensorflow_io.kafka`: Apache Kafka stream-processing support.
* `tensorflow_io.kinesis`: Amazon Kinesis data streams support.
* `tensorflow_io.hadoop`: Hadoop SequenceFile format support.

## Thanks to our Contributors

This release contains contributions from many people:

Anjali Sridhar, Anton Dmitriev, Artem Malykh, Brennan Saeta, Derek Murray,
Gunhan Gulsoy, Jacques Pienaar, Jianwei Xie, Jiri Simsa, knight, Loo Rong Jie,
Martin Wicke, Michael Case, Sergei Lebedev, Sourabh Bajaj, Yifei Feng,
Yong Tang, Yuan (Terry) Tang, Yun Peng

We are also grateful to all who filed issues or helped resolve them, asked and
answered questions, and were part of inspiring discussions.

0 comments on commit 63ea552

Please sign in to comment.