Skip to content

Commit

Permalink
Link Tiled Docs (activeloopai#2154)
Browse files Browse the repository at this point in the history
* temp fix

* add docs

* remove unrelated code

* Update docs/source/deeplake.core.link-tiled-sample.rst

* Update docs/source/deeplake.core.rst

* Update docs/source/deeplake.api.link_tiled.rst

Co-authored-by: Fayaz Rahman <fayazrahman4u@gmail.com>

* updates

---------

Co-authored-by: Fayaz Rahman <fayazrahman4u@gmail.com>
  • Loading branch information
AbhinavTuli and FayazRahman authored Feb 1, 2023
1 parent d5113d4 commit 8ed8398
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 6 deletions.
5 changes: 3 additions & 2 deletions deeplake/api/link_tiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def link_tiled(
>>> ds = deeplake.dataset("test/test_ds")
>>> ds.create_tensor("images", htype="link[image]", sample_compression="jpeg")
>>> arr = np.empty((10, 10), dtype=object)
for j, i in itertools.product(range(10), range(10)):
arr[j, i] = f"s3://my_bucket/my_image_{j}_{i}.jpeg"
>>> for j, i in itertools.product(range(10), range(10)):
... arr[j, i] = f"s3://my_bucket/my_image_{j}_{i}.jpeg"
...
>>> ds.images.append(deeplake.link_tiled(arr, creds_key="my_s3_key"))
>>> # If all images are 1000x1200x3, we now have a 10000x12000x3 image in our dataset.
"""
Expand Down
2 changes: 1 addition & 1 deletion deeplake/core/linked_tiled_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class LinkedTiledSample:
"""Represents a sample that is initialized using external links. See :meth:`deeplake.link`."""
"""Represents a sample that is initialized using external links. See :meth:`deeplake.link_tiled`."""

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions docs/source/Htypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ array([[965, 110, 262, 77],
.. _bbox-3d-htype:

3D Bounding Box Htype
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~

- :bluebold:`Sample dimensions:` ``(# bounding boxes, 9)``

Expand Down Expand Up @@ -327,7 +327,7 @@ A 3d bbox tensor can be created using
rotation angles are specified in degrees, not radians

:blue:`Appending 3d bounding boxes`
--------------------------------
-----------------------------------

- Bounding boxes can be appended as ``np.ndarrays`` or ``list`` or ``lists of arrays``.

Expand Down
1 change: 1 addition & 0 deletions docs/source/Utility-Functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Making Deep Lake Samples

read
link
link_tiled

Parallelism
~~~~~~~~~~~
Expand Down
6 changes: 6 additions & 0 deletions docs/source/deeplake.api.link_tiled.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
deeplake.api.link_tiled
=======================
.. currentmodule:: deeplake.api.link_tiled
.. function:: link_tiled(path_array: np.ndarray, creds_key: Optional[str] = None) -> LinkedTiledSample:

See :func:`deeplake.link_tiled`.
3 changes: 2 additions & 1 deletion docs/source/deeplake.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ deeplake.api
deeplake.api.info
deeplake.api.link
deeplake.api.read
deeplake.api.tiled
deeplake.api.tiled
deeplake.api.link_tiled
5 changes: 5 additions & 0 deletions docs/source/deeplake.core.linked-tiled-sample.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
deeplake.core.linked_tiled_sample
=================================
.. currentmodule:: deeplake.core.linked_tiled_sample
.. autoclass:: LinkedTiledSample
:members:
1 change: 1 addition & 0 deletions docs/source/deeplake.core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ deeplake.core
deeplake.core.sample
deeplake.core.linked_sample <deeplake.core.linked-sample>
deeplake.core.partial_sample <deeplake.core.partial-sample>
deeplake.core.link_tiled_sample <deeplake.core.linked-tiled-sample>
deeplake.core.storage
deeplake.core.index
1 change: 1 addition & 0 deletions docs/source/deeplake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ deeplake
.. autofunction:: exists
.. autofunction:: read
.. autofunction:: link
.. autofunction:: link_tiled
.. autofunction:: tiled
.. autofunction:: compute
.. autofunction:: compose

0 comments on commit 8ed8398

Please sign in to comment.