Skip to content

Commit 0e36baf

Browse files
committed
Initial commit
Signed-off-by: Mengjia Gu <mengjia.gu@zilliz.com>
0 parents  commit 0e36baf

File tree

541 files changed

+210644
-0
lines changed

Some content is hidden

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

541 files changed

+210644
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/universal:2",
3+
"hostRequirements": {
4+
"cpus": 4
5+
},
6+
"waitFor": "onCreateCommand",
7+
"updateContentCommand": "pip install -r .devcontainer/requirements.txt",
8+
"postCreateCommand": "",
9+
"customizations": {
10+
"codespaces": {
11+
"openFiles": [
12+
"notebooks/llms/langchain/lc_vectorstore_conv_mem.ipynb",
13+
"notebooks/llms/llamaindex/multi_doc_qa.ipynb",
14+
"notebooks/text/white_house_speeches.ipynb",
15+
"notebooks/vision/reverse_painting_search.ipynb"
16+
]
17+
},
18+
"vscode": {
19+
"extensions": [
20+
"ms-toolsai.jupyter",
21+
"ms-python.python"
22+
]
23+
}
24+
}
25+
}

.devcontainer/requirements.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ipykernel
2+
llama-index
3+
nltk
4+
milvus
5+
pymilvus==2.2.5
6+
torch
7+
torchvision
8+
tqdm
9+
sentence-transformers
10+
gdown
11+
langchain
12+
openai
13+
python-dotenv
14+
requests

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
HUGGINGFACEHUB_API_TOKEN=hf_xxxx
2+
OPENAI_API_KEY=sk-xxxx

.gitattributes

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Basic .gitattributes for a python repo.
2+
3+
# Source files
4+
*.pxd text diff=python
5+
*.py text diff=python
6+
*.py3 text diff=python
7+
*.pyw text diff=python
8+
*.pyx text diff=python
9+
*.pyz text diff=python
10+
*.pyi text diff=python
11+
12+
# Binary files
13+
*.db binary
14+
*.p binary
15+
*.pkl binary
16+
*.pickle binary
17+
*.pyc binary export-ignore
18+
*.pyo binary export-ignore
19+
*.pyd binary
20+
21+
# To ignore it use below
22+
# *.ipynb linguist-documentation
23+
# *.tsx linguist-documentation
24+
# *.jsx linguist-documentation
25+
26+
# Note: .db, .p, and .pkl files are associated
27+
# with the python modules ``pickle``, ``dbm.*``,
28+
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
29+
# (among others).
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: 🐞 Bug report
2+
description: Create a report to help us resolve or improve
3+
title: "[BUG]: "
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report! Please fill the form in English!
9+
- type: checkboxes
10+
attributes:
11+
label: Is there an existing issue for this?
12+
description: Please search to see if an issue already exists for the bug you encountered, and check the [FAQ](https://github.com/milvus-io/bootcamp/blob/master/bootcamp_faq.md).
13+
options:
14+
- label: I have searched the existing issues
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Current Behavior
19+
description: A clear and concise description of what the issue is. And you can take a look at the [announcement](https://github.com/milvus-io/bootcamp/issues/587)
20+
placeholder: |
21+
When I do <X>, <Y> happens and I see the error message attached below:
22+
```...```
23+
validations:
24+
required: false
25+
- type: textarea
26+
attributes:
27+
label: Expected Behavior
28+
description: A concise description of what you expected to happen.
29+
placeholder: When I do <X>, <Z> should happen instead.
30+
validations:
31+
required: false
32+
- type: textarea
33+
attributes:
34+
label: Steps To Reproduce
35+
description: |
36+
Which solution are you running? Please post the link.
37+
Steps to reproduce the behavior(Docker or Source code):
38+
placeholder: |
39+
1. Go to '...'
40+
2. Click on '....'
41+
3. Scroll down to '....'
42+
4. See error
43+
render: markdown
44+
validations:
45+
required: false
46+
- type: textarea
47+
attributes:
48+
label: Software version
49+
description: |
50+
Please complete the following information:
51+
value: |
52+
Milvus: [e.g. 2.0.0rc1]
53+
Server: [e.g. 2.0.0]
54+
Client: [e.g. 2.0.0]
55+
render: markdown
56+
validations:
57+
required: false
58+
- type: textarea
59+
attributes:
60+
label: Anything else?
61+
description: |
62+
Links? References? Anything that will give us more context about the issue you are encountering!
63+
validations:
64+
required: false
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 🚀 Feature request
2+
description: Suggest an idea for this project
3+
title: "[FEATURE]: "
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to request a feature for this projrct! Please fill the form in English!
9+
- type: checkboxes
10+
attributes:
11+
label: Is there an existing issue for this?
12+
description: Please search to see if an issue related to this feature request already exists, and learn about [Towhee Operator](https://towhee.io/tasks/operator) and [Towhee Examples](https://github.com/towhee-io/examples).
13+
options:
14+
- label: I have searched the existing issues
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Is your feature request related to a problem? Please describe.
19+
description: |
20+
A clear and concise description of what the problem is.
21+
And you can take a look at the [announcement](https://github.com/milvus-io/bootcamp/issues/587).
22+
placeholder: I'm always frustrated when [...]
23+
validations:
24+
required: false
25+
- type: textarea
26+
attributes:
27+
label: Describe the solution you'd like
28+
description: A clear and concise description of what you want to happen.
29+
validations:
30+
required: false
31+
- type: textarea
32+
attributes:
33+
label: Describe alternatives you've considered
34+
description: A clear and concise description of any alternative solutions or features you've considered.
35+
validations:
36+
required: false
37+
- type: textarea
38+
attributes:
39+
label: Anything else?
40+
description: Add any other context, code examples, or references to existing implementations about the feature request here.
41+
validations:
42+
required: false

.github/pull_request_template.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## 📌 Description
2+
3+
<!-- Describe what this PR does and why it's needed -->
4+
Closes #[issue_number]
5+
6+
## ✅ Changes
7+
8+
- [ ] Feature added: ...
9+
- [ ] Bug fixed: ...
10+
- [ ] Refactor: ...
11+
- [ ] Other (explain): ...
12+
13+
## 🔬 How to Test
14+
15+
<!-- Provide steps to manually test or describe how it was tested -->
16+
1. ...
17+
2. ...
18+
19+
## 📝 Checklist
20+
21+
- [ ] Code compiles and runs
22+
- [ ] Linting passes (Check jupyter notebooks: `pip install "black[jupyter]"` > `black {file_or_directory}`)
23+
- [ ] PR includes relevant docs or comments
24+
- [ ] Rebased on the latest `main` (no merge commits or conflicts)
25+
26+
## 🧼 Commit Hygiene
27+
28+
✔️ Follow best practices:
29+
- Small, focused commits with clear messages
30+
- Group related changes together
31+
- Avoid large monolithic commits
32+
- Use meaningful commit messages (e.g., `fix:`, `feat:`, `refactor:`)
33+
34+
## 👀 Reviewer Notes
35+
36+
<!-- Any context or areas of focus for reviewers -->
37+
- Please focus on ...
38+
- Watch out for ...
39+
40+
---
41+
42+
### 📎 Related Issues, PRs, or Docs
43+
44+
- Related PR: #
45+
- Issue: #
46+
47+
---

.github/workflows/black.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Workflow for Black
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Black-Check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- uses: psf/black@stable
11+
with:
12+
options: "--check --diff --verbose"
13+
src: "./bootcamp/tutorials"
14+
jupyter: true

.github/workflows/close-stale.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Close Stale Issues and PRs
2+
3+
on:
4+
schedule:
5+
- cron: '0 1 * * *' # Runs daily at 01:00 UTC
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
jobs:
12+
stale:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/stale@v9
16+
with:
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
# ⏱ Time before marking as stale
20+
days-before-stale: 90
21+
days-before-close: 5
22+
23+
# 🏷 Stale label (added automatically)
24+
stale-issue-label: 'stale'
25+
stale-pr-label: 'stale'
26+
27+
# 💬 Messages for stale warnings
28+
stale-issue-message: 'This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed in 5 days if no further activity occurs.'
29+
close-issue-message: 'Closing this issue due to prolonged inactivity. Please reopen if needed or add new context.'
30+
31+
stale-pr-message: 'This pull request has been automatically marked as stale due to 90 days of inactivity. It will be closed in 5 days if no further activity occurs.'
32+
close-pr-message: 'Closing this pull request due to prolonged inactivity. Please reopen if needed or add updates.'
33+
34+
# ⚙ Behavior
35+
remove-stale-when-updated: true
36+
exempt-issue-labels: 'keep-open,security'
37+
exempt-pr-labels: 'do-not-close'

.github/workflows/deploy_ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy CI Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types: [ labeled ]
8+
9+
jobs:
10+
CI-Deploy-Test:
11+
# Example label: audio_similarity_search/quick_deploy
12+
if: contains(github.event.label.name, 'benchmark') || contains(github.event.label.name, '/quick_deploy') || contains(github.event.label.name, '/object_detection')
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Setup Python3.7
18+
uses: actions/setup-python@master
19+
with:
20+
python-version: 3.7
21+
- uses: conda-incubator/setup-miniconda@v2
22+
with:
23+
auto-update-conda: true
24+
python-version: 3.7
25+
- name: Conda install RDKit
26+
if: github.event.label.name == 'molecular_similarity_search/quick_deploy'
27+
shell: bash -l {0}
28+
run: |
29+
conda info
30+
conda install -c rdkit rdkit -y
31+
32+
- name: Install pip packeages
33+
shell: bash -l {0}
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install pytest
37+
pip install gdown
38+
- name: Start Milvus
39+
run: |
40+
wget https://github.com/milvus-io/milvus/releases/download/v2.0.0-rc7/milvus-standalone-docker-compose.yml -O docker-compose.yml
41+
docker-compose up -d
42+
43+
- name: Install libsndfile
44+
if: github.event.label.name == 'audio_similarity_search/quick_deploy'
45+
run: sudo apt-get install -y libsndfile1
46+
- name: Install ffmpeg
47+
if: github.event.label.name == 'video_similarity_search/object_detection' || github.event.label.name == 'video_similarity_search/quick_deploy'
48+
run: sudo apt-get install -y ffmpeg
49+
- name: Start MySQL
50+
if: contains(github.event.label.name, '/quick_deploy') || contains(github.event.label.name, '/object_detection')
51+
run: docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
52+
53+
- name: Test main server
54+
if: contains(github.event.label.name, '/quick_deploy') || contains(github.event.label.name, '/object_detection')
55+
shell: bash -l {0}
56+
run: |
57+
cd solutions/${{github.event.label.name}}/server
58+
pip install -r requirements.txt
59+
cd src && python -m pytest
60+
61+
- name: Test benchmark
62+
if: github.event.label.name == 'benchmark'
63+
shell: bash -l {0}
64+
run: |
65+
cd benchmark_test/scripts
66+
pip install -r requirements.txt
67+
python -m pytest test_main.py

0 commit comments

Comments
 (0)