Skip to content

Commit 9e7d365

Browse files
filipecosta90rafielantigaDvirDukhangkorland
authored
v1.0 cherry picks (#450)
* Introduced readies submodule (#377) * Introduced readies submodule * Fix in paella * Updated get_deps.sh and docs * [WIP] add C API reference to docs using auto tool (#368) * [add] add C API reference to docs using auto tool ( python3 generate_llapi_reference.py ) * [add] generating C API reference on the fly * [add] moving api_reference under Developer Nav Co-authored-by: Luca Antiga <[email protected]> * [WIP] Enable AI.SCRIPTRUN on AI.DAGRUN* (#383) * [add] decoupled scriptrun command parsing from runtime scriptrun. * [add] split positive/negative tests on pytorch scriptrun. * [add] refactor AI.DAGRUN_RO and AI.DAGRUN to use the same code base (with read/write modes) * [add] added positive and negative tests for dagrun with scriptrun * [add] updated documentation to reflect scriptrun support on dagrun * [add] added example enqueuing multiple SCRIPTRUN and MODELRUN commands within a DAG * Add support for variadic arguments to SCRIPT (#395) * Add support for variadic arguments to SCRIPT * Add negative errors * atomic ref count (#403) * Multi-platform build (#398) * CircleCI: increased GPU test timeout to 40m (#404) * CI: platform-build-defs -> on-master-and-version-tags (#405) * Llapi updates (#400) * added low level api return redis types * added variadic to llapi * fixed memory issue for params array re-alloc * Avoid splitting outputs in batches when nbatches == 1 (#406) * Avoid splitting outputs in batches when nbatches == 1 * Add batch size checks * Fix batch checks * Update readies * Add bad batching test * Update README.md * CircleCI: fixed redis installation in coverage builds (#423) * Docker6.0.5 (#427) * Update Dockerfile * Update Dockerfile.arm * Update Dockerfile.gpu * submodule pull moved up (#428) * Update mkdocs.yml (#432) * [add] Add relevant RedisAI config entries to the INFO output, so that standard monitoring systems would be able to monitor them. (#396) * Updated support email and Orobix to Tensorwork on ramp file (#436) * [add] updated support email and Orobix to Tensorwork on ramp file Co-authored-by: Sherin Thomas <[email protected]> * CircleCI: Fixed problem with GPU testing (#440) * Fixed platforms build problem (#441) * Fixed platforms build problem * Build: updated Redis versions * Build: another Redis version update * Dependencies in ramp.yml (#444) * Fixed flagged as "getkeys-api" during the registration ( AI.DAGRUN, AI.DAGRUN_RO, AI.MODELRUN, AI.SCRIPTRUN ) (#438) * [wip] wip on fixing the commands being flagged as getkeys-api during the registration. ( AI.MODELRUN, AI.SCRIPTRUN, AI.DAGRUN, AI.DAGRUN_RO ) * [add] pytorch oss cluster tests passing * [add] TensorFlow lite tests passing on oss cluster * [add] ONNX tests passing on oss cluster * [add] TensorFlow tests passing on oss cluster * [wip] wip on dag * [add] DAG tests passing on oss cluster * [add] enabling oss cluster tests on CI * [add] bumping rmbuilder version from 6.0.1 to 6.0.5 on circleci * [fix] fixed potential invalid mem accesses on RedisAI_DagRunSyntaxParser, RAI_parseDAGPersistArgs * [fix] fixed RAI_FreeDagOp wrongfully calling RedisModule_Free on dagOp->inkeys, dagOp->outkeys * [fix] fixed dictKey allocation on RAI_parseDAGLoadArgs * [add] alter Sanitizer tests to accommodate keys on the same slot. * [add] extracted the methods to respond to RedisModule_IsKeysPositionRequest() from main code of dagrun,modelrun, and scriptrun to specific methods * [fix] Fixes per PR review * [fix] fixes per PR review * [fix] fix per CI ascii conversion error on test_dagro_modelrun_financialNet_no_writes_multiple_modelruns * Safely add to arrays + fix for #443 (#449) * Make sure we reassign the pointer in array_append * Fix case-sensitive comparison for devicestr * Fix sanitizer tests (cherry picked from commit 5c7813e) * fixed tests messages * Shallow copy persisted tensor * Resolve log format warnings * Fix error message and test * Fix memory management in local context dict * Fixed artifacts handling + added tests logs aggregation (#445) * Snapshot packages are placed into http://redismodules.s3.amazonaws.com/redisai/snapshots. Private branches (i.e., non-master) are also supported, just need to enable deploy-snapshot in config.yml to fire on on-any-branch rather than just on-master. * Release packages are placed into http://redismodules.s3.amazonaws.com/redisai, and it's going to be crowded in there, so we may want to consider putting each version into its own directory. * `BB` in-source breakpoints are now supported (in `DEBUG=1` builds): put `BB;` inside the code and it will stop if you're running under gdb. * Tests results in CircleCI are now aggregated as artifacts. * Build: setuptools-related fix (#455) (cherry picked from commit d1fcd0d) Co-authored-by: Rafi Einstein <[email protected]> Co-authored-by: Luca Antiga <[email protected]> Co-authored-by: DvirDukhan <[email protected]> Co-authored-by: Guy Korland <[email protected]> Co-authored-by: Sherin Thomas <[email protected]>
1 parent ad3e6b9 commit 9e7d365

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+5208
-1190
lines changed

.circleci/config.yml

Lines changed: 64 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ commands:
3030
command: |
3131
./opt/readies/bin/getpy3
3232
BREW_NO_UPDATE=1 ./opt/system-setup.py
33-
# ./opt/readies/bin/getredis -v 6 --force
33+
./opt/readies/bin/getredis -v 6 --force
3434
./get_deps.sh cpu
3535
- save_cache:
3636
paths:
@@ -46,12 +46,17 @@ commands:
4646
no_output_timeout: 20m
4747
- run:
4848
name: Package
49-
command: make -C opt pack SHOW=1
49+
command: |
50+
make -C opt pack SHOW=1
51+
(cd bin/artifacts; tar -cf snapshots-<<parameters.platform>>.tar snapshots/)
5052
- persist_to_workspace:
5153
root: bin/
5254
paths:
5355
- artifacts/*.zip
5456
- artifacts/*.tgz
57+
- artifacts/*.tar
58+
# - artifacts/shapshots/*.zip
59+
# - artifacts/shapshots/*.tgz
5560
- store_artifacts:
5661
path: test/logs
5762

@@ -71,16 +76,27 @@ commands:
7176
name: Build for platform
7277
command: |
7378
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
74-
cd opt/build/docker
79+
pushd opt/build/docker
7580
#@@ make build publish $(./version-params) CPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 TEST=1 VERBOSE=1
7681
make build publish $(./version-params) CPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 VERBOSE=1
7782
make build publish $(./version-params) GPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 VERBOSE=1
83+
popd > /dev/null
84+
logstar=bin/artifacts/tests-logs-cpu.tgz
85+
logsdir=tests/logs/cpu
86+
mkdir -p $logsdir
87+
if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
88+
(cd bin/artifacts; tar -cf snapshots-<<parameters.platform>>.tar snapshots/)
7889
no_output_timeout: 40m
7990
- persist_to_workspace:
8091
root: bin/
8192
paths:
8293
- artifacts/*.zip
8394
- artifacts/*.tgz
95+
- artifacts/*.tar
96+
# - artifacts/shapshots/*.zip
97+
# - artifacts/shapshots/*.tgz
98+
- store_artifacts:
99+
path: test/logs
84100

85101
deploy-steps:
86102
parameters:
@@ -95,7 +111,7 @@ commands:
95111
jobs:
96112
build-debian:
97113
docker:
98-
- image: redisfab/rmbuilder:6.0.1-x64-buster
114+
- image: redisfab/rmbuilder:6.0.5-x64-buster
99115
steps:
100116
- build-steps:
101117
platform: debian
@@ -112,7 +128,7 @@ jobs:
112128

113129
coverage:
114130
docker:
115-
- image: redisfab/rmbuilder:6.0.1-x64-buster
131+
- image: redisfab/rmbuilder:6.0.5-x64-buster
116132
steps:
117133
- checkout
118134
- run:
@@ -136,7 +152,7 @@ jobs:
136152
- run:
137153
name: Test with coverage
138154
command: |
139-
make -C opt test SHOW=1 COV=1
155+
make -C opt test SHOW=1 COV=1 CLUSTER=1
140156
make -C opt cov-upload
141157
no_output_timeout: 20m
142158

@@ -202,22 +218,56 @@ jobs:
202218
docker run --gpus all -v $HOME/tests:/build/test/logs -it --rm redisai-gpu:latest-x64-bionic-test
203219
no_output_timeout: 40m
204220
- store_artifacts:
205-
path: tests
221+
path: test/log
206222

207223
deploy-artifacts:
208224
parameters:
209-
package:
225+
location:
210226
type: string
211227
docker:
212-
- image: redisfab/rmbuilder:6.0.1-x64-buster
228+
- image: redisfab/rmbuilder:6.0.5-x64-buster
213229
steps:
214230
- attach_workspace:
215231
at: workspace
216232
- run:
217233
name: Deploy to S3
218234
command: |
219-
cd workspace
220-
aws s3 cp artifacts/ s3://redismodules/$PACKAGE_NAME/ --acl public-read --recursive --exclude "*" --include "*.zip" --include "*.tgz"
235+
cd "workspace/artifacts/<<parameters.location>>"
236+
for f in *.zip snapshot/*.tgz; do
237+
aws s3 cp $f s3://redismodules/$PACKAGE_NAME/<<parameters.location>>/ --acl public-read
238+
done
239+
240+
deploy-snapshot:
241+
docker:
242+
- image: redisfab/rmbuilder:6.0.5-x64-buster
243+
steps:
244+
- attach_workspace:
245+
at: workspace
246+
- run:
247+
name: Deploy Snapshots to S3
248+
command: |
249+
cd workspace/artifacts
250+
for f in snapshots-*.tar; do
251+
tar xf $f
252+
done
253+
cd snapshots
254+
for f in *.zip *.tgz; do
255+
aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/snapshots/ --acl public-read
256+
done
257+
258+
deploy-release:
259+
docker:
260+
- image: redisfab/rmbuilder:6.0.5-x64-buster
261+
steps:
262+
- attach_workspace:
263+
at: workspace
264+
- run:
265+
name: Deploy Releases to S3
266+
command: |
267+
cd workspace/artifacts
268+
for f in *.zip *.tgz; do
269+
aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/ --acl public-read
270+
done
221271
222272
223273
on-any-branch: &on-any-branch
@@ -296,14 +346,10 @@ workflows:
296346
- build-multiarch-docker:
297347
<<: *never # temporarily disabled
298348
# <<: *on-version-tags
299-
- deploy-artifacts:
300-
name: deploy-branch
301-
package: branch
349+
- deploy-snapshot:
302350
<<: *after-platform-builds
303-
<<: *on-any-branch
304-
- deploy-artifacts:
305-
name: deploy-release
306-
package: release
351+
<<: *on-master
352+
- deploy-release:
307353
<<: *after-platform-builds
308354
<<: *on-version-tags
309355

.github/workflows/deploy-docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
python-version: '3.x'
2222
- name: Display Python version
2323
run: python -c "import sys; print(sys.version)"
24+
- name: Install Doxygen
25+
run: apt-get install -y doxygen
2426
- name: Install docs dependencies
2527
run: pip install -r docs/requirements.txt
2628
- name: Get entire project

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
3939
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
4040

4141
# Add -fno-omit-frame-pointer to avoid seeing incomplete stack traces
42-
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -ggdb -fno-omit-frame-pointer -DVALGRIND")
43-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -ggdb -fno-omit-frame-pointer -DVALGRIND")
42+
set(CMAKE_COMMON_FLAGS_DEBUG "-g -ggdb -fno-omit-frame-pointer -D_DEBUG -DVALGRIND -include \
43+
${CMAKE_CURRENT_SOURCE_DIR}/src/common.h -I${CMAKE_CURRENT_SOURCE_DIR}/opt")
44+
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_COMMON_FLAGS_DEBUG}")
45+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_COMMON_FLAGS_DEBUG}")
4446

4547
#----------------------------------------------------------------------------------------------
4648

Dockerfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BUILD redisfab/redisai:${VERSION}-cpu-${ARCH}-${OSNICK}
22

3-
ARG REDIS_VER=6.0.1
3+
ARG REDIS_VER=6.0.5
44

55
# OSNICK=bionic|stretch|buster
66
ARG OSNICK=buster
@@ -31,7 +31,7 @@ COPY --from=redis /usr/local/ /usr/local/
3131
COPY ./opt/ opt/
3232
COPY ./test/test_requirements.txt test/
3333

34-
RUN ./opt/readies/bin/getpy3
34+
RUN PIP=1 FORCE=1 ./opt/readies/bin/getpy3
3535
RUN ./opt/system-setup.py
3636

3737
ARG DEPS_ARGS=""
@@ -40,17 +40,24 @@ RUN if [ "$DEPS_ARGS" = "" ]; then ./get_deps.sh cpu; else env $DEPS_ARGS ./get_
4040

4141
ARG BUILD_ARGS=""
4242
ADD ./ /build
43-
RUN set -e ;\
43+
RUN bash -c "set -e ;\
4444
. ./opt/readies/bin/sourced ./profile.d ;\
45-
make -C opt build $BUILD_ARGS SHOW=1
45+
make -C opt build $BUILD_ARGS SHOW=1"
4646

4747
ARG PACK
4848
ARG TEST
4949

5050
RUN mkdir -p bin/artifacts
51-
RUN if [ "$PACK" = "1" ]; then make -C opt pack; fi
51+
RUN set -e ;\
52+
if [ "$PACK" = "1" ]; then make -C opt pack; fi
5253

53-
RUN if [ "$TEST" = "1" ]; then TEST= make -C opt test $BUILD_ARGS NO_LFS=1; fi
54+
RUN set -e ;\
55+
if [ "$TEST" = "1" ]; then \
56+
TEST= make -C opt test $BUILD_ARGS NO_LFS=1 ;\
57+
if [[ -d test/logs ]]; then \
58+
tar -C test/logs -czf bin/artifacts/test-logs-cpu.tgz . ;\
59+
fi ;\
60+
fi
5461

5562
#----------------------------------------------------------------------------------------------
5663
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK}

Dockerfile.arm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BUILD redisfab/redisai:${VERSION}-cpu-${ARCH}-${OSNICK}
22

3-
ARG REDIS_VER=6.0.1
3+
ARG REDIS_VER=6.0.5
44

55
# OSNICK=bionic|stretch|buster
66
ARG OSNICK=buster

Dockerfile.gpu

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# BUILD redisfab/redisai:${VERSION}-gpu-${ARCH}-${OSNICK}
22

3-
ARG REDIS_VER=6.0.1
3+
ARG REDIS_VER=6.0.5
44

55
# OSNICK=bionic|centos7|centos6
66
ARG OSNICK=bionic
77

8-
# ARCH=x64|arm64v8|arm32v7
9-
ARG ARCH=x64
10-
118
# OS=ubuntu18.04|ubuntu16.04|centos7
129
ARG OS=ubuntu18.04
1310

11+
# ARCH=x64|arm64v8|arm32v7
12+
ARG ARCH=x64
13+
1414
ARG CUDA_VER=10.1-cudnn7
1515

1616
ARG PACK=0
@@ -22,10 +22,11 @@ FROM nvidia/cuda:${CUDA_VER}-devel-${OS} AS builder
2222

2323
ARG OSNICK
2424
ARG OS
25+
ARG ARCH
2526
ARG REDIS_VER
2627
ARG CUDA_VER
2728

28-
RUN echo "Building for ${OSNICK} (${OS}) [with Redis ${REDIS_VER}]"
29+
RUN echo "Building for ${OSNICK} (${OS}) for ${ARCH} [with Redis ${REDIS_VER}]"
2930

3031
ENV NVIDIA_VISIBLE_DEVICES all
3132
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
@@ -36,7 +37,7 @@ COPY --from=redis /usr/local/ /usr/local/
3637
COPY ./opt/ opt/
3738
COPY ./test/test_requirements.txt test/
3839

39-
RUN ./opt/readies/bin/getpy3
40+
RUN PIP=1 FORCE=1 ./opt/readies/bin/getpy3
4041
RUN ./opt/system-setup.py
4142

4243
ARG DEPS_ARGS=""
@@ -45,17 +46,24 @@ RUN if [ "$DEPS_ARGS" = "" ]; then ./get_deps.sh gpu; else env $DEPS_ARGS ./get_
4546

4647
ARG BUILD_ARGS=""
4748
ADD ./ /build
48-
RUN set -e ;\
49+
RUN bash -c "set -e ;\
4950
. ./opt/readies/bin/sourced ./profile.d ;\
50-
make -C opt build GPU=1 $BUILD_ARGS SHOW=1
51+
make -C opt build GPU=1 $BUILD_ARGS SHOW=1"
5152

5253
ARG PACK
5354
ARG TEST
5455

5556
RUN mkdir -p bin/artifacts
56-
RUN if [ "$PACK" = "1" ]; then make -C opt pack GPU=1; fi
57+
RUN set -e ;\
58+
if [ "$PACK" = "1" ]; then make -C opt pack GPU=1; fi
5759

58-
RUN if [ "$TEST" = "1" ]; then TEST= make -C opt test GPU=1 $BUILD_ARGS NO_LFS=1; fi
60+
RUN set -e ;\
61+
if [ "$TEST" = "1" ]; then \
62+
TEST= make -C opt test GPU=1 $BUILD_ARGS NO_LFS=1 ;\
63+
if [[ -d test/logs ]]; then \
64+
tar -C test/logs -czf bin/artifacts/test-logs-gpu.tgz . ;\
65+
fi ;\
66+
fi
5967

6068
#----------------------------------------------------------------------------------------------
6169
FROM nvidia/cuda:${CUDA_VER}-runtime-${OS}

Dockerfile.gpu-test

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BUILD redisfab/redisai:${VERSION}-gpu-${ARCH}-${OSNICK}-test
22

3-
ARG REDIS_VER=6.0.1
3+
ARG REDIS_VER=6.0.5
44

55
# OSNICK=bionic|centos7|centos6
66
ARG OSNICK=bionic
@@ -29,11 +29,12 @@ COPY --from=redis /usr/local/ /usr/local/
2929
COPY ./opt/ opt/
3030
COPY ./test/test_requirements.txt test/
3131

32-
RUN ./opt/readies/bin/getpy3
33-
RUN ./opt/system-setup.py
32+
RUN PIP=1 VENV=1 FORCE=1 ./opt/readies/bin/getpy3
33+
3434
RUN set -e ;\
35-
python3 -m virtualenv venv --system-site-packages;\
35+
python3 -m virtualenv venv --system-site-packages ;\
3636
. venv/bin/activate ;\
37+
python -m pip install pip==19.3.1 ;\
3738
./opt/system-setup.py
3839

3940
ARG DEPS_ARGS=""

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ RedisAI currently supports PyTorch (libtorch), Tensorflow (libtensorflow), Tenso
130130
| 0.3.1 | 1.1.0 | 1.12.0 | None | 0.4.0 |
131131
| 0.4.0 | 1.2.0 | 1.14.0 | None | 0.5.0 |
132132
| 0.9.0 | 1.3.1 | 1.14.0 | 2.0.0 | 1.0.0 |
133+
| 1.0.0 | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |
133134
| master | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |
134135

135136
Note: Keras and TensorFlow 2.x are supported through graph freezing. See [this script](https://github.com/RedisAI/RedisAI/blob/master/test/test_data/tf2-minimal.py) to see how to export a frozen graph from Keras and TensorFlow 2.x. Note that a frozen graph will be executed using the TensorFlow 1.15 backend. Should any 2.0 ops be not supported on the 1.15 after freezing, please open an Issue.

0 commit comments

Comments
 (0)