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
18 changes: 9 additions & 9 deletions docs/tutorials/bigtable.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"source": [
"import tensorflow as tf\n",
"import numpy as np\n",
"import tensorflow_io.bigtable as bt\n",
"import tensorflow_io as tfio\n",
"import random\n",
"\n",
"random.seed(10)"
Expand Down Expand Up @@ -268,7 +268,7 @@
"# If using your bigtable instance replace the project_id, instance_id \n",
"# and the name of the table with suitable values.\n",
"\n",
"client = bt.BigtableClient(project_id=\"test-project\", instance_id=\"test-instance\")\n",
"client = tfio.bigtable.BigtableClient(project_id=\"test-project\", instance_id=\"test-instance\")\n",
"train_table = client.get_table(\"t1\")"
]
},
Expand Down Expand Up @@ -298,7 +298,7 @@
},
"outputs": [],
"source": [
"row_set = bt.row_set.from_rows_or_ranges(bt.row_range.infinite())\n",
"row_set = tfio.bigtable.row_set.from_rows_or_ranges(tfio.bigtable.row_range.infinite())\n",
"\n",
"train_dataset = train_table.read_rows([\"cf1:c1\"],row_set, output_type=tf.string)\n",
"\n",
Expand Down Expand Up @@ -364,9 +364,9 @@
},
"outputs": [],
"source": [
"row_range_below_300 = bt.row_range.right_open(\"row000\", \"row300\")\n",
"row_range_below_300 = tfio.bigtable.row_range.right_open(\"row000\", \"row300\")\n",
"\n",
"my_row_set = bt.row_set.from_rows_or_ranges(row_range_below_300, \"row585\", \"row832\")\n",
"my_row_set = tfio.bigtable.row_set.from_rows_or_ranges(row_range_below_300, \"row585\", \"row832\")\n",
"print(my_row_set)"
]
},
Expand All @@ -390,8 +390,8 @@
},
"outputs": [],
"source": [
"my_truncated_row_set = bt.row_set.intersect(my_row_set,\n",
" bt.row_range.right_open(\"row200\", \"row700\"))\n",
"my_truncated_row_set = tfio.bigtable.row_set.intersect(my_row_set,\n",
" tfio.bigtable.row_range.right_open(\"row200\", \"row700\"))\n",
"print(my_truncated_row_set)"
]
},
Expand Down Expand Up @@ -426,8 +426,8 @@
"\n",
"start = datetime(2020, 10, 10, 12, 0, 0)\n",
"end = datetime(2100, 10, 10, 13, 0, 0)\n",
"from_datetime = bt.filters.timestamp_range(start, end)\n",
"from_posix_timestamp = bt.filters.timestamp_range(int(start.timestamp()), int(end.timestamp()))\n",
"from_datetime = tfio.bigtable.filters.timestamp_range(start, end)\n",
"from_posix_timestamp = tfio.bigtable.filters.timestamp_range(int(start.timestamp()), int(end.timestamp()))\n",
"print(\"from_datetime:\", from_datetime)\n",
"\n",
"print(\"from_posix_timestamp:\", from_posix_timestamp)"
Expand Down
3 changes: 2 additions & 1 deletion tensorflow_io/python/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,7 @@
from tensorflow_io.python.api import audio
from tensorflow_io.python.api import version
from tensorflow_io.python.api import experimental
from tensorflow_io.python.api import bigtable

if os.environ.get("GENERATING_TF_DOCS", ""):
# Mark these as public api for /tools/docs/build_docs.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Cloud Bigtable Client for TensorFlow.
"""tensorflow_io.bigtable"""

This package allows TensorFlow to interface directly with Cloud Bigtable
for high-speed data loading.

@@BigtableClient
@@BigtableTable
@@RowRange
@@RowSet


"""


from tensorflow.python.util.all_util import remove_undocumented
from tensorflow_io.python.ops.bigtable.bigtable_dataset_ops import BigtableClient
from tensorflow_io.python.ops.bigtable.bigtable_dataset_ops import BigtableTable
import tensorflow_io.python.ops.bigtable.bigtable_version_filters as filters
import tensorflow_io.python.ops.bigtable.bigtable_row_set as row_set
import tensorflow_io.python.ops.bigtable.bigtable_row_range as row_range

_allowed_symbols = [
"BigtableClient",
"BigtableTable",
"filters",
"row_set",
"row_range",
]

remove_undocumented(__name__, _allowed_symbols)