Skip to content

Commit

Permalink
Merge branch 'main' into train
Browse files Browse the repository at this point in the history
  • Loading branch information
elronbandel authored Aug 20, 2024
2 parents 112d51c + a4e5529 commit 750ca6b
Show file tree
Hide file tree
Showing 673 changed files with 59,267 additions and 4,495 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/catalog_consistency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ jobs:
env:
OS: ubuntu-latest
GENAI_KEY: "dummy"
UNITXT_DEFAULT_VERBOSITY: error
DATASETS_VERBOSITY: error
HF_HUB_VERBOSITY: error
HF_DATASETS_DISABLE_PROGRESS_BARS: True
TQDM_DISABLE: True

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr

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

- name: Run Tests
run: python utils/prepare_all_artifacts.py
13 changes: 9 additions & 4 deletions .github/workflows/catalog_preparation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ jobs:
env:
OS: ubuntu-latest
GENAI_KEY: "dummy"
UNITXT_DEFAULT_VERBOSITY: error
DATASETS_VERBOSITY: error
HF_HUB_VERBOSITY: error
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
TQDM_DISABLE: "True"


steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr
- run: pip install -e .

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system ".[tests]"

- name: Run Tests
run: python -m unittest discover -s tests/catalog -p "test_*.py"
28 changes: 11 additions & 17 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ jobs:
PYTHONPATH: ./docs

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/docs.rqr

- name: Install package
run: |
pip install -e .
- name: Print Python Path
run: python -c "import sys; print(sys.path)"

- name: Compile Docs
run: make docs
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system ".[tests,docs]"

- name: Compile Docs
run: make docs


19 changes: 10 additions & 9 deletions .github/workflows/library_eager_execution_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ jobs:
env:
OS: ubuntu-latest
UNITXT_USE_EAGER_EXECUTION: True
UNITXT_DEFAULT_VERBOSITY: error
DATASETS_VERBOSITY: error
HF_HUB_VERBOSITY: error
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
TQDM_DISABLE: "True"

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr
- run: pip install -e .
- run: pip install coverage[toml]
# cache: 'pip' # caching pip dependencies
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system ".[tests]"
- run: uv pip install --system coverage[toml]

- name: Run Tests
run: coverage run --omit=*/preparation -m unittest discover -s tests/library -p "test_*.py"

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
run: coverage run --omit=*/preparation -m unittest discover -s tests/library -p "test_*.py"
12 changes: 8 additions & 4 deletions .github/workflows/library_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ jobs:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
UNITXT_DEFAULT_VERBOSITY: error
DATASETS_VERBOSITY: error
HF_HUB_VERBOSITY: error
HF_DATASETS_DISABLE_PROGRESS_BARS: "True"
TQDM_DISABLE: "True"

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements/base.rqr
- run: pip install -r requirements/tests.rqr
- run: pip install -e .

- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install --system -e ".[tests]"
- run: pip install coverage[toml]

- name: Run Tests
Expand Down
17 changes: 14 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ repos:
# Ruff version.
rev: v0.1.6
hooks:
# Run the linter.
# Run the linter on all files except the specific one
- id: ruff
args: [ --fix ]
# Run the formatter.
args: [--fix]
exclude: src/unitxt/metrics.py|examples/evaluate_existing_dataset_no_install.py
# Run the linter on the specific file with the ignore flag
- id: ruff
name: ruff (src/unitxt/metrics.py)
files: src/unitxt/metrics.py
args: [--fix, --ignore, C901]
# Run the linter on the specific file with the ignore flag
- id: ruff
name: ruff (examples/evaluate_existing_dataset_no_install.py)
files: examples/evaluate_existing_dataset_no_install.py
args: [--fix, --ignore, T201]
# Run the formatter
- id: ruff-format

- repo: https://github.com/ibm/detect-secrets
Expand Down
15 changes: 13 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-10-05T11:42:58Z",
"generated_at": "2024-08-14T10:01:36Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -76,7 +76,18 @@
"name": "TwilioKeyDetector"
}
],
"results": {},
"results": {
"src/unitxt/metrics.py": [
{
"hashed_secret": "fa172616e9af3d2a24b5597f264eab963fe76889",
"is_secret": false,
"is_verified": false,
"line_number": 1948,
"type": "Hex High Entropy String",
"verified_result": null
}
]
},
"version": "0.13.1+ibm.61.dss",
"word_list": {
"file": null,
Expand Down
23 changes: 21 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Then, activate the virtual environment:
source unitxt-venv/bin/activate
```

If the above command does not work because the bin directory does not exist, use this instead:

```bash
source unitxt-venv/Scripts/activate
```

Then, install the project:

```bash
Expand Down Expand Up @@ -86,9 +92,18 @@ Bef

## Git

## Legal

### Merge your PR to main
Use squash and merge to merge your PR to main.
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.

We simply ask that when submitting a patch for review, the developer must include a sign-off statement in the commit message.

Here is an example Signed-off-by line, which indicates that the submitter accepts the DCO:

Signed-off-by: John Doe <[email protected]>
You can include this automatically when you commit a change to your local git repository using the following command:

git commit -s

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

### Merge your PR to main
Use squash and merge to merge your PR to main.


## Structure

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

Binary file added assets/rag/adlaka_table2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/rag/adlaka_table4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/rag/metrics_slide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 750ca6b

Please sign in to comment.