Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Ami11111 committed Aug 8, 2024
2 parents 9a69c76 + dc32e1e commit adf75c9
Show file tree
Hide file tree
Showing 125 changed files with 2,872 additions and 4,762 deletions.
52 changes: 35 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Start builder container
if: ${{ !cancelled() && !failure() }}
run: |
BUILDER_CONTAINER=infinity_build_$(od -An -N4 -t u8 < /dev/urandom | tr -d ' ')
BUILDER_CONTAINER=infinity_build_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
CPUS=${CPUS:-$(nproc)}
echo "BUILDER_CONTAINER=${BUILDER_CONTAINER}" >> $GITHUB_ENV
echo "CPUS=${CPUS}" >> $GITHUB_ENV
Expand All @@ -60,18 +60,19 @@ jobs:
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "git config --global safe.directory \"*\" && cd /infinity && rm -fr cmake-build-debug && mkdir -p cmake-build-debug && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_JOB_POOLS:STRING=link=8 -S /infinity -B /infinity/cmake-build-debug && cmake --build /infinity/cmake-build-debug --target infinity test_main"

- name: Unit test debug version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "mkdir -p /var/infinity && cd /infinity/ && ASAN_OPTIONS=detect_leaks=0 cmake-build-debug/src/test_main > unittest_debug.log 2>&1"

- name: Collect infinity unit test debug output
if: ${{ !cancelled() }}
run: cat unittest_debug.log 2>/dev/null || true

- name: Install pysdk
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && pip3 uninstall -y infinity-sdk && pip3 install . -v --config-settings=cmake.build-type='Debug' --config-settings=build-dir='cmake-build-debug'"

# - name: Run restart test
# if: ${{ !cancelled() && !failure() }}
# run : sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && pip3 install -r python/restart_test/requirements.txt && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_restart_test.py --infinity_path=cmake-build-debug/src/infinity"

# - name: Collect restart test output
# if: ${{ !cancelled() }} # always run this step even if previous steps failed
# # find all log file like [debug.log.*] in directory, and cat to stdout
# run: find . -name "restart_test.log.*" -exec cat {} \;

- name: Start infinity debug version
if: ${{ !cancelled() && !failure() }}
run: |
Expand All @@ -98,6 +99,14 @@ jobs:
# GitHub Actions interprets output lines starting with "Error" as error messages, and it automatically sets the step status to failed when such lines are detected.
run: cat debug.log 2>/dev/null || true

- name: Unit test debug version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "mkdir -p /var/infinity && cd /infinity/ && ASAN_OPTIONS=detect_leaks=0 cmake-build-debug/src/test_main > unittest_debug.log 2>&1"

- name: Collect infinity unit test debug output
if: ${{ !cancelled() }}
run: cat unittest_debug.log 2>/dev/null || true

- name: Destroy builder container
if: always() # always run this step even if previous steps failed
run: |
Expand Down Expand Up @@ -145,17 +154,18 @@ jobs:
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "git config --global safe.directory \"*\" && cd /infinity && rm -fr cmake-build-release && mkdir -p cmake-build-release && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_JOB_POOLS:STRING=link=8 -S /infinity -B /infinity/cmake-build-release && cmake --build /infinity/cmake-build-release --target infinity test_main knn_import_benchmark knn_query_benchmark"

- name: Unit test release version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "mkdir -p /var/infinity && cd /infinity/ && cmake-build-release/src/test_main > unittest_release.log 2>&1"

- name: Collect infinity unit test release output
if: ${{ !cancelled() }}
run: cat unittest_release.log 2>/dev/null || true

- name: Install pysdk for Python 3.10
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && pip3 uninstall -y infinity-sdk && pip3 install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release'"

# - name: Run restart test
# if: ${{ !cancelled() && !failure() }}
# run : sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && pip3 install -r python/restart_test/requirements.txt && python3 tools/run_restart_test.py --infinity_path=cmake-build-release/src/infinity"

# - name: Collect restart test output
# if: ${{ !cancelled() }} # always run this step even if previous steps failed
# # find all log file like [debug.log.*] in directory, and cat to stdout
# run: find . -name "restart_test.log.*" -exec cat {} \;

- name: Test embedded infinity for Python 3.10
if: ${{ !cancelled() && !failure() }}
Expand Down Expand Up @@ -186,6 +196,14 @@ jobs:
if: ${{ !cancelled() }} # always run this step even if previous steps failed
# GitHub Actions interprets output lines starting with "Error" as error messages, and it automatically sets the step status to failed when such lines are detected.
run: cat release.log 2>/dev/null || true

- name: Unit test release version
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "mkdir -p /var/infinity && cd /infinity/ && cmake-build-release/src/test_main > unittest_release.log 2>&1"

- name: Collect infinity unit test release output
if: ${{ !cancelled() }}
run: cat unittest_release.log 2>/dev/null || true

- name: Prepare sift dataset
if: ${{ !cancelled() && !failure() }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Supports a wide range of data types including strings, numerics, vectors, and mo
Infinity, also available as a Python module, eliminates the need for a separate back-end server and all the complex communication settings. Using `pip install` and `import infinity`, you can quickly build a local AI application in Python, leveraging the world's fastest and the most powerful RAG database:

```bash
pip install infinity-sdk==0.3.0.dev3
pip install infinity-sdk==0.3.0.dev4
```

```python
Expand Down
2 changes: 1 addition & 1 deletion benchmark/remote_infinity/remote_query_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct InfinityClient {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(12); // 0.3.0.dev3
request.__set_client_version(13); // 0.3.0.dev4
client->Connect(response, request);
session_id = response.session_id;
}
Expand Down
2 changes: 1 addition & 1 deletion client/cpp/infinity_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Client Client::Connect(const std::string &ip_address, uint16_t port) {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(12); // 0.3.0.dev3
request.__set_client_version(13); // 0.3.0.dev4
client->Connect(response, request);
return {socket, transport, protocol, std::move(client), response.session_id};
}
Expand Down
4 changes: 2 additions & 2 deletions conf/infinity_conf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ log_to_stdout = false
log_file_max_size = "10GB"
log_file_rotate_count = 10

# trace/info/warning/error/critical 5 log levels, default: info
log_level = "info"
# trace/debug/info/warning/error/critical 6 log levels, default: info
log_level = "info"

[storage]
data_dir = "/var/infinity/data"
Expand Down
10 changes: 5 additions & 5 deletions docs/getstarted/deploy_infinity_server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This approach allows you to embed Infinity as a module in a Python application.
### Install Infinity as a module

```
pip install infinity-sdk==0.3.0.dev3
pip install infinity-sdk==0.3.0.dev4
```

### Create an Infinity object
Expand Down Expand Up @@ -98,7 +98,7 @@ If you are on Windows 10+, you must enable WSL or WSL2 to deploy Infinity using
### Install Infinity client

```
pip install infinity-sdk==0.3.0.dev3
pip install infinity-sdk==0.3.0.dev4
```

### Connect to Infinity Server
Expand Down Expand Up @@ -140,14 +140,14 @@ This section provides instructions on deploying Infinity using binary package on

Fedora/RHEL/CentOS/OpenSUSE
```bash
sudo rpm -i infinity-0.3.0.dev3-x86_64.rpm
sudo rpm -i infinity-0.3.0.dev4-x86_64.rpm
sudo systemctl start infinity
```
</TabItem>
<TabItem value="ubuntu">

```bash
sudo dpkg -i infinity-0.3.0.dev3-x86_64.deb
sudo dpkg -i infinity-0.3.0.dev4-x86_64.deb
sudo systemctl start infinity
```

Expand All @@ -157,7 +157,7 @@ sudo systemctl start infinity
### Install Infinity client

```
pip install infinity-sdk==0.3.0.dev3
pip install infinity-sdk==0.3.0.dev4
```

### Connect to Infinity Server
Expand Down
2 changes: 1 addition & 1 deletion docs/getstarted/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Infinity, also available as a Python module, eliminates the need for a separate

1. Install Infinity as a module:
```bash
pip install infinity-sdk==0.3.0.dev3
pip install infinity-sdk==0.3.0.dev4
```
2. Use Infinity to conduct a KNN search:
```python
Expand Down
Loading

0 comments on commit adf75c9

Please sign in to comment.