Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .travis/python3.7+.release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ if [[ "$#" -gt 0 ]]; then
shift
fi

apt-get -y -qq update && apt-get -y -qq install $PYTHON_VERSION
apt-get -y -qq update && apt-get -y -qq install python $PYTHON_VERSION
python get-pip.py -q
python -m pip --version
python -m pip install -q grpcio-tools

$PYTHON_VERSION get-pip.py -q
$PYTHON_VERSION -m pip --version

Expand Down
3 changes: 2 additions & 1 deletion .travis/wheel.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ run_test() {
CPYTHON_VERSION=$($entry -c 'import sys; print(str(sys.version_info[0])+str(sys.version_info[1]))')
(cd wheelhouse && $entry -m pip install *-cp${CPYTHON_VERSION}-*.whl)
$entry -m pip install -q pytest boto3 google-cloud-pubsub==0.39.1 pyarrow==0.11.1 pandas==0.19.2
(cd tests && $entry -m pytest -v --import-mode=append $(find . -type f \( -iname "test_*.py" ! -iname "test_*_eager.py" \)))
(cd tests && $entry -m pytest -v --import-mode=append $(find . -type f \( -iname "test_*.py" ! \( -iname "test_*_eager.py" -o -iname "test_grpc.py" \) \)))
(cd tests && $entry -m pytest -v --import-mode=append $(find . -type f \( -iname "test_*_eager.py" \)))
(cd tests && $entry -m pytest -v --import-mode=append $(find . -type f \( -iname "test_grpc.py" \)))
}

PYTHON_VERSION=python
Expand Down
2 changes: 1 addition & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ if python -c "import tensorflow" &> /dev/null; then
else
pip install tensorflow
fi

python -m pip install grpcio-tools
python config_helper.py
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def has_ext_modules(self):
os.path.join(datapath, "tensorflow_io")):
if (not fnmatch.fnmatch(rootname, "*test*") and
not fnmatch.fnmatch(rootname, "*runfiles*")):
for filename in fnmatch.filter(filenames, "*.so"):
for filename in [
f for f in filenames if fnmatch.fnmatch(
f, "*.so") or fnmatch.fnmatch(f, "*.py")]:
src = os.path.join(rootname, filename)
dst = os.path.join(
rootpath,
Expand Down
20 changes: 10 additions & 10 deletions tensorflow_io/cifar/kernels/cifar_dataset_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ limitations under the License.
namespace tensorflow {
namespace data {
namespace {
class CIFAR10Input: public DataInput<int64> {
class CIFAR10Input: public FileInput<int64> {
public:
Status ReadRecord(io::InputStreamInterface& s, IteratorContext* ctx, std::unique_ptr<int64>& state, int64 record_to_read, int64* record_read, std::vector<Tensor>* out_tensors) const override {
Status ReadRecord(io::InputStreamInterface* s, IteratorContext* ctx, std::unique_ptr<int64>& state, int64 record_to_read, int64* record_read, std::vector<Tensor>* out_tensors) const override {
if (state.get() == nullptr) {
state.reset(new int64(0));
}
Expand All @@ -45,7 +45,7 @@ class CIFAR10Input: public DataInput<int64> {
}
return Status::OK();
}
Status FromStream(io::InputStreamInterface& s) override {
Status FromStream(io::InputStreamInterface* s) override {
return Status::OK();
}
void EncodeAttributes(VariantTensorData* data) const override {
Expand All @@ -56,9 +56,9 @@ class CIFAR10Input: public DataInput<int64> {
protected:
};

class CIFAR100Input: public DataInput<int64> {
class CIFAR100Input: public FileInput<int64> {
public:
Status ReadRecord(io::InputStreamInterface& s, IteratorContext* ctx, std::unique_ptr<int64>& state, int64 record_to_read, int64* record_read, std::vector<Tensor>* out_tensors) const override {
Status ReadRecord(io::InputStreamInterface* s, IteratorContext* ctx, std::unique_ptr<int64>& state, int64 record_to_read, int64* record_read, std::vector<Tensor>* out_tensors) const override {
if (state.get() == nullptr) {
state.reset(new int64(0));
}
Expand All @@ -81,7 +81,7 @@ class CIFAR100Input: public DataInput<int64> {
}
return Status::OK();
}
Status FromStream(io::InputStreamInterface& s) override {
Status FromStream(io::InputStreamInterface* s) override {
return Status::OK();
}
void EncodeAttributes(VariantTensorData* data) const override {
Expand All @@ -96,13 +96,13 @@ REGISTER_UNARY_VARIANT_DECODE_FUNCTION(CIFAR10Input, "tensorflow::CIFAR10Input")
REGISTER_UNARY_VARIANT_DECODE_FUNCTION(CIFAR100Input, "tensorflow::CIFAR100Input");

REGISTER_KERNEL_BUILDER(Name("CIFAR10Input").Device(DEVICE_CPU),
DataInputOp<CIFAR10Input>);
FileInputOp<CIFAR10Input>);
REGISTER_KERNEL_BUILDER(Name("CIFAR100Input").Device(DEVICE_CPU),
DataInputOp<CIFAR100Input>);
FileInputOp<CIFAR100Input>);
REGISTER_KERNEL_BUILDER(Name("CIFAR10Dataset").Device(DEVICE_CPU),
InputDatasetOp<CIFAR10Input, int64>);
FileInputDatasetOp<CIFAR10Input, int64>);
REGISTER_KERNEL_BUILDER(Name("CIFAR100Dataset").Device(DEVICE_CPU),
InputDatasetOp<CIFAR100Input, int64>);
FileInputDatasetOp<CIFAR100Input, int64>);
} // namespace
} // namespace data
} // namespace tensorflow
Loading