Skip to content

Commit 750ca6b

Browse files
authored
Merge branch 'main' into train
2 parents 112d51c + a4e5529 commit 750ca6b

File tree

673 files changed

+59267
-4495
lines changed

Some content is hidden

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

673 files changed

+59267
-4495
lines changed

.github/workflows/catalog_consistency.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@ jobs:
1313
env:
1414
OS: ubuntu-latest
1515
GENAI_KEY: "dummy"
16+
UNITXT_DEFAULT_VERBOSITY: error
17+
DATASETS_VERBOSITY: error
18+
HF_HUB_VERBOSITY: error
19+
HF_DATASETS_DISABLE_PROGRESS_BARS: True
20+
TQDM_DISABLE: True
1621

1722
steps:
1823
- uses: actions/checkout@v4
1924

2025
- uses: actions/setup-python@v5
2126
with:
2227
python-version: '3.9'
23-
cache: 'pip' # caching pip dependencies
24-
- run: pip install -r requirements/base.rqr
25-
- run: pip install -r requirements/tests.rqr
2628

27-
- name: Install Unitxt From Source
28-
run: pip install -e .
29+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
30+
- run: uv pip install --system -e ".[tests]"
2931

3032
- name: Run Tests
3133
run: python utils/prepare_all_artifacts.py

.github/workflows/catalog_preparation.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,22 @@ jobs:
1313
env:
1414
OS: ubuntu-latest
1515
GENAI_KEY: "dummy"
16+
UNITXT_DEFAULT_VERBOSITY: error
17+
DATASETS_VERBOSITY: error
18+
HF_HUB_VERBOSITY: error
19+
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
20+
TQDM_DISABLE: "True"
21+
1622

1723
steps:
1824
- uses: actions/checkout@v4
1925

2026
- uses: actions/setup-python@v5
2127
with:
2228
python-version: '3.9'
23-
cache: 'pip' # caching pip dependencies
24-
- run: pip install -r requirements/base.rqr
25-
- run: pip install -r requirements/tests.rqr
26-
- run: pip install -e .
29+
30+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
31+
- run: uv pip install --system ".[tests]"
2732

2833
- name: Run Tests
2934
run: python -m unittest discover -s tests/catalog -p "test_*.py"

.github/workflows/docs.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,16 @@ jobs:
1515
PYTHONPATH: ./docs
1616

1717
steps:
18-
- uses: actions/checkout@v4
19-
- uses: actions/setup-python@v5
20-
with:
21-
python-version: '3.8'
22-
cache: 'pip' # caching pip dependencies
23-
- run: pip install -r requirements/base.rqr
24-
- run: pip install -r requirements/docs.rqr
25-
26-
- name: Install package
27-
run: |
28-
pip install -e .
29-
30-
- name: Print Python Path
31-
run: python -c "import sys; print(sys.path)"
32-
33-
- name: Compile Docs
34-
run: make docs
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.9'
23+
24+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
25+
- run: uv pip install --system ".[tests,docs]"
26+
27+
- name: Compile Docs
28+
run: make docs
3529

3630

.github/workflows/library_eager_execution_tests.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@ jobs:
1313
env:
1414
OS: ubuntu-latest
1515
UNITXT_USE_EAGER_EXECUTION: True
16+
UNITXT_DEFAULT_VERBOSITY: error
17+
DATASETS_VERBOSITY: error
18+
HF_HUB_VERBOSITY: error
19+
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
20+
TQDM_DISABLE: "True"
1621

1722
steps:
1823
- uses: actions/checkout@v4
1924

2025
- uses: actions/setup-python@v5
2126
with:
2227
python-version: '3.9'
23-
cache: 'pip' # caching pip dependencies
24-
- run: pip install -r requirements/base.rqr
25-
- run: pip install -r requirements/tests.rqr
26-
- run: pip install -e .
27-
- run: pip install coverage[toml]
28+
# cache: 'pip' # caching pip dependencies
29+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
30+
- run: uv pip install --system ".[tests]"
31+
- run: uv pip install --system coverage[toml]
2832

2933
- name: Run Tests
30-
run: coverage run --omit=*/preparation -m unittest discover -s tests/library -p "test_*.py"
31-
32-
- name: Upload Coverage to Codecov
33-
uses: codecov/codecov-action@v2
34+
run: coverage run --omit=*/preparation -m unittest discover -s tests/library -p "test_*.py"

.github/workflows/library_tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
OS: ubuntu-latest
15+
UNITXT_DEFAULT_VERBOSITY: error
16+
DATASETS_VERBOSITY: error
17+
HF_HUB_VERBOSITY: error
18+
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
19+
TQDM_DISABLE: "True"
1520

1621
steps:
1722
- uses: actions/checkout@v4
1823

1924
- uses: actions/setup-python@v5
2025
with:
2126
python-version: '3.9'
22-
cache: 'pip' # caching pip dependencies
23-
- run: pip install -r requirements/base.rqr
24-
- run: pip install -r requirements/tests.rqr
25-
- run: pip install -e .
27+
28+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
29+
- run: uv pip install --system -e ".[tests]"
2630
- run: pip install coverage[toml]
2731

2832
- name: Run Tests

.pre-commit-config.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@ repos:
55
# Ruff version.
66
rev: v0.1.6
77
hooks:
8-
# Run the linter.
8+
# Run the linter on all files except the specific one
99
- id: ruff
10-
args: [ --fix ]
11-
# Run the formatter.
10+
args: [--fix]
11+
exclude: src/unitxt/metrics.py|examples/evaluate_existing_dataset_no_install.py
12+
# Run the linter on the specific file with the ignore flag
13+
- id: ruff
14+
name: ruff (src/unitxt/metrics.py)
15+
files: src/unitxt/metrics.py
16+
args: [--fix, --ignore, C901]
17+
# Run the linter on the specific file with the ignore flag
18+
- id: ruff
19+
name: ruff (examples/evaluate_existing_dataset_no_install.py)
20+
files: examples/evaluate_existing_dataset_no_install.py
21+
args: [--fix, --ignore, T201]
22+
# Run the formatter
1223
- id: ruff-format
1324

1425
- repo: https://github.com/ibm/detect-secrets

.secrets.baseline

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2023-10-05T11:42:58Z",
6+
"generated_at": "2024-08-14T10:01:36Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -76,7 +76,18 @@
7676
"name": "TwilioKeyDetector"
7777
}
7878
],
79-
"results": {},
79+
"results": {
80+
"src/unitxt/metrics.py": [
81+
{
82+
"hashed_secret": "fa172616e9af3d2a24b5597f264eab963fe76889",
83+
"is_secret": false,
84+
"is_verified": false,
85+
"line_number": 1948,
86+
"type": "Hex High Entropy String",
87+
"verified_result": null
88+
}
89+
]
90+
},
8091
"version": "0.13.1+ibm.61.dss",
8192
"word_list": {
8293
"file": null,

CONTRIBUTING.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ Then, activate the virtual environment:
2626
source unitxt-venv/bin/activate
2727
```
2828

29+
If the above command does not work because the bin directory does not exist, use this instead:
30+
31+
```bash
32+
source unitxt-venv/Scripts/activate
33+
```
34+
2935
Then, install the project:
3036

3137
```bash
@@ -86,9 +92,18 @@ Bef
8692

8793
## Git
8894

95+
## Legal
8996

90-
### Merge your PR to main
91-
Use squash and merge to merge your PR to main.
97+
We have tried to make it as easy as possible to make contributions. This applies to how we handle the legal aspects of contribution. We use the same approach - the Developer's Certificate of Origin 1.1 (DCO) - that the Linux® Kernel community uses to manage code contributions.
98+
99+
We simply ask that when submitting a patch for review, the developer must include a sign-off statement in the commit message.
100+
101+
Here is an example Signed-off-by line, which indicates that the submitter accepts the DCO:
102+
103+
Signed-off-by: John Doe <[email protected]>
104+
You can include this automatically when you commit a change to your local git repository using the following command:
105+
106+
git commit -s
92107

93108
### Commit
94109
Always commit with a [good commit message](https://cbea.ms/git-commit/) and sign off:
@@ -108,8 +123,12 @@ Example:
108123
git push origin main:<my-new-branch-name>
109124
```
110125

126+
### Merge your PR to main
127+
Use squash and merge to merge your PR to main.
128+
111129

112130
## Structure
113131

114132
### Layout
115133
The layout of the repo is [src layout](https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/)
134+

assets/rag/adlaka_table2.png

120 KB
Loading

assets/rag/adlaka_table4.png

102 KB
Loading

0 commit comments

Comments
 (0)