Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST ONLY/DON'T MERGE] Tensorflow-IO DAOS Plugin #1696

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
7369e32
Skeleton in Place + Build Correctly
Sep 6, 2021
b055a0c
Merge branch 'FT-dfs-skeleton-OM' into 'devel'
omar-hmarzouk Sep 10, 2021
230aadd
Parsing Function Added and Tested Separately
Sep 10, 2021
a9b128b
Merge branch '2-parse-dfs-path' into 'devel'
omar-hmarzouk Sep 10, 2021
17a21d7
DAOS library installed as an http archive and linked
Sep 12, 2021
20900e9
Removed DAOS API call test
Sep 12, 2021
c1970e9
Linking DAOS Shared Libraries
Sep 12, 2021
6441bf0
Merge branch 'FT-daos-lib-integration-OM' into 'devel'
omar-hmarzouk Sep 12, 2021
b1c0128
Added Skeleton + Connect/Disconnect Functionality
Sep 15, 2021
e3654b9
Merge branch '4-plugin-skeleton' into 'devel'
omar-hmarzouk Sep 15, 2021
a45d6e4
Init+Cleanup+Mount+Unmount
Sep 15, 2021
903b89f
Query + Moving Class and Helpers to header file
Sep 16, 2021
477e81a
Added Path Lookup Functionality
Sep 20, 2021
ae6f84a
Support for Multiple Connections
Sep 21, 2021
9a3f111
Merge branch 'FT-filesystem-ops-OM' into 'devel'
omar-hmarzouk Sep 21, 2021
9f29eee
Directory Checking + Creation & Deletion (Singl/Recursive)
Sep 23, 2021
14073c5
Merge branch 'FT-directory-operation-OM' into 'devel'
omar-hmarzouk Sep 23, 2021
8dd9fbb
File Size Calculation
Sep 23, 2021
c8e261a
File Deletion
Sep 23, 2021
958b645
Creation of Random Access + Writable + Appendable Operations
Sep 25, 2021
96647da
Rename/Moving of File
Sep 26, 2021
038dfce
Completed FileSystem Operations Table
Sep 27, 2021
2f29df0
Merge branch 'FT-file-ops-OM' into 'devel'
omar-hmarzouk Sep 27, 2021
5b2d864
Refactor
Sep 28, 2021
b14fc84
Merge branch '10-refactor-of-dfs-plugin-class' into 'devel'
omar-hmarzouk Sep 28, 2021
10b09de
Writable File Ops Done
Sep 29, 2021
26b0f36
Merge branch 'FT-writable-file-ops-OM' into 'devel'
omar-hmarzouk Sep 29, 2021
83fd151
Random Access File Ops Done
Sep 29, 2021
6810f04
Merge branch 'FT-random-access-ops-OM' into 'devel'
omar-hmarzouk Sep 29, 2021
ec328c1
Tests Added (Bug in isDirectory and Wildcard Matching)
Oct 6, 2021
cadd6f6
Tests completed & passed & wildcard matching to be checked
Oct 10, 2021
dc664ae
Added Tutorial
Oct 14, 2021
366d63c
Tutorial tested and configured
Oct 14, 2021
8a8cabf
Implementation of Wildcard Matching
Oct 19, 2021
3614d0c
Merge branch '13-wildcard-matching' into FT-tutorial-example-OM
Oct 19, 2021
866ebd7
Merge branch '13-wildcard-matching' into 'devel'
omar-hmarzouk Oct 19, 2021
36e93cf
Merge branch 'FT-tutorial-example-OM' into 'devel'
omar-hmarzouk Oct 19, 2021
6ee86d0
Added Dummy ROM-Region
Oct 27, 2021
3745d4f
Merge branch 'FT-rom-region-dummy-OM' into 'devel'
omar-hmarzouk Oct 27, 2021
c0ba4c4
Update to DAOS1.3.106 + Decoupling of DAOS API init + Handling Pool a…
Dec 5, 2021
a764fdf
Adjusted Example + Added Build Documentation + Fixed Indentation
Dec 5, 2021
d5016e5
Refactor + Update Tests + Update Docs
Dec 6, 2021
eebe0af
Markdown updated
MernaMoawad Dec 6, 2021
9b3baf0
UNS NO_CHECK_PATH
Dec 6, 2021
7035255
Linking DAOS
Dec 7, 2021
7c1c736
Linking DAOS libraries
Dec 7, 2021
9d72efd
Updated Docs
Dec 8, 2021
b823fa1
Merge branch 'devel' of https://github.com/daos-stack/tensorflow-io-d…
Dec 8, 2021
a2cc29e
Updating Docs and moving them to docs/
Dec 8, 2021
4a8b3ec
Updated Docs
Dec 10, 2021
ba9074f
Merge branch 'devel' into FT-unified-name-space-OM
Dec 10, 2021
ea94561
UNS Supports UID and Label
Dec 12, 2021
a8f0a85
Merge branch 'FT-unified-name-space-OM' into 'devel'
omar-hmarzouk Dec 12, 2021
efbb408
Updated Tutorial + Documentation
Dec 15, 2021
5027ff7
Updated Notebook
Dec 15, 2021
62b092c
Cleared Output
Dec 15, 2021
c83c378
Output Cleared
Dec 15, 2021
b827a7b
Style and Formatting
Dec 16, 2021
de0a601
Merge branch 'tensorflow:master' into devel
omar-hmarzouk Jan 2, 2022
7840b77
PyLint modifications
Jan 4, 2022
9987dd8
Merge branch 'tensorflow:master' into devel
omar-hmarzouk Jan 4, 2022
df84926
Bazel lint
Jan 5, 2022
5ef973c
Merge branch 'devel' of https://github.com/daos-stack/tensorflow-io-d…
Jan 5, 2022
24641ce
Integrating daos build changes
Jan 30, 2022
673ffba
Linting
Jan 30, 2022
0cf005c
Replacing usage of C++ API
Jan 30, 2022
c6dab2a
Formatted DAOS notebook
Feb 2, 2022
5cf7335
Pool Connection Error Handling
Feb 22, 2022
0858a52
Synchronous Read Ahead
Mar 8, 2022
9689f99
Asynchronous read ahed
Mar 10, 2022
db74d80
Merge remote-tracking branch 'original-repo/master' into 17-read-ahea…
Apr 2, 2022
7488654
Finalize Read Ahead
Apr 3, 2022
dbf0bce
Linting
Apr 4, 2022
57ebc1e
Merge branch '17-read-ahead-buffering' into 'devel'
omar-hmarzouk Apr 4, 2022
e8cf9c0
Linting Merge
Apr 4, 2022
e3887d5
Existing File Deletion when Opened in Write Mode
May 6, 2022
3fd58df
Removing Comments
May 6, 2022
7a22a32
Read Ahead Bug Fixes
May 8, 2022
afbc18b
Event Queue De-Centralization
May 10, 2022
79b9d18
Bug Fix
May 10, 2022
fab7f15
Various fixes to the DAOS tensorflow-io plugin. (#2)
krehm Jun 5, 2022
6746017
Merge branch 'tensorflow:master' into devel
omar-hmarzouk Jun 5, 2022
b0d5ad2
Linting
Jun 5, 2022
1af1181
Optimizations Added
Jun 6, 2022
b0a7b7d
Adjustments to Reading, Single Event Queue Handle, Paths Caching, and…
Jun 6, 2022
eb90e69
Add support for dynamically loaded DAOS libraries (#4)
krehm Jun 22, 2022
5f54aee
Linting
Jun 22, 2022
c53f6a0
Various additional plugin fixes (#6)
krehm Jul 25, 2022
96ad01d
Fix nb lint issue
yongtang Jul 25, 2022
df361e5
Skip macos & windows
yongtang Jul 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,17 @@ http_archive(
],
)

http_archive(
name = "daos",
build_file = "//third_party:daos.BUILD",
sha256 = "9789a5a0065cfa4249105f1676b9eba89f68b54bc03083140549b7a8a8f615d3",
strip_prefix = "daos-2.0.2",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/daos-stack/daos/archive/refs/tags/v2.0.2.tar.gz",
"https://github.com/daos-stack/daos/archive/refs/tags/v2.0.2.tar.gz",
],
)

http_archive(
name = "dav1d",
build_file = "//third_party:dav1d.BUILD",
Expand Down
107 changes: 107 additions & 0 deletions docs/daos_tf_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# DAOS-TensorFlow IO GUIDE

## Table Of Contents

- [Features](#features)
- [Prerequisites](#prerequisites)
- [Environment Setup](#environment-setup)
- [Building](#building)
- [Testing](#testing)
- [Example](#example)

## Features

* Providing a plugin utilizing the DAOS DFS layer to provide efficient utilization for Intel's filesystem. The Read-Only Memory Region remains unsupported.

## Prerequisites

* A valid DAOS installation, currently based on [version v2.0.2](https://github.com/daos-stack/daos/releases/tag/v2.0.2)
* An installation guide and steps can be accessed from [here](https://docs.daos.io/admin/installation/)

## Environment Setup

Assuming you are in a terminal in the repository root directory:

* Install latest versions of the following dependencies by running
* Centos 8
```
$ yum install -y python3 python3-devel gcc gcc-c++ git unzip which make
```
* Ubuntu 20.04
```
$ sudo apt-get -y -qq update
$ sudo apt-get -y -qq install gcc g++ git unzip curl python3-pip
```
* Download the Bazel installer
```
$ curl -sSOL https://github.com/bazelbuild/bazel/releases/download/\$(cat .bazelversion)/bazel-\$(cat .bazelversion)-installer-linux-x86_64.sh
```
* Install Bazel
```
$ bash -x -e bazel-$(cat .bazelversion)-installer-linux-x86_64.sh
```
* Update Pip and install pytest
```
$ python3 -m pip install -U pip
$ python3 -m pip install pytest
```

## Building

Assuming you are in a terminal in the repository root directory:

* Configure and install tensorflow (the current version should be tensorflow2.6.2)
```
$ ./configure.sh
## Set python3 as default.
$ ln -s /usr/bin/python3 /usr/bin/python
```

* At this point, all libraries and dependencies should be installed.
* Make sure the environment variable **LIBRARY_PATH** includes the paths to all daos libraries
* Make sure the environment variable **LD_LIBRARY_PATH** includes the paths to:
* All daos libraries
* The tensorflow framework (libtensorflow and libtensorflow_framework)
* If not, find the required libraries and add their paths to the environment variable
```
export LD_LIBRARY_PATH="<path-to-library>:$LD_LIBARY_PATH"
```
* Make sure the environment variable **CPLUS_INCLUDE_PATH** and **C_INCLUDE_PATH** includes the paths to:
* The tensorflow headers (usually in /usr/local/lib64/python3.6/site-packages/tensorflow/include)
* If not, find the required headers and add their paths to the environment variable
```
export CPLUS_INCLUDE_PATH="<path-to-headers>:$CPLUS_INCLUDE_PATH"
export C_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$C_INCLUDE_PATH
```

* Build the project using bazel
```
bazel build --action_env=LIBRARY_PATH=$LIBRARY_PATH -s --verbose_failures --spawn_strategy=standalone //tensorflow_io/... //tensorflow_io_gcs_filesystem/...
```
This should take a few minutes. Note that sandboxing may result in build failures when using Docker Containers for DAOS due to mounting issues, if that’s the case, add **--spawn_strategy=standalone** to the above build command to bypass sandboxing. (When disabling sandbox, an error may be thrown for an undefined type z_crc_t due to a conflict in header files. Please find the crypt.h file in the bazel cache in subdirectory /external/zlib/contrib/minizip/crypt.h and add the following line to the file **typedef unsigned long z_crc_t;** then re-build)



## Testing
Assuming you are in a terminal in the repository root directory:

* Run the following command for the simple serial test to validate building. Note that any tests need to be run with the TFIO_DATAPATH flag to specify the location of the binaries.
```
$ TFIO_DATAPATH=bazel-bin python3 -m pytest -s -v tests/test_serialization.py

```

* Run the following commands to run the dfs plugin test:
```
# To create the required pool and container and export required env variables for the dfs tests.
$ source tests/test_dfs/dfs_init.sh
# To run dfs tests
$ TFIO_DATAPATH=bazel-bin python3 -m pytest -s -v tests/test_dfs.py
# For Cleanup, deletes pools and containers created for test.
$ bash ./tests/test_dfs/dfs_cleanup.sh
```

## Example

Please refer to [the DAOS notebook example in the tutorials folder in docs folder.](tutorials/daos.ipynb)