Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Unit Test

on:
push:
branches: [ main ]
pull_request:

concurrency:
group: unit-test${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l -eo pipefail {0}

jobs:
unit_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: |
python -m pip install torch torchao
python -m pip install -e ".[dev]"
python -m pip install -e ".[oss]"
- name: Run unit tests with coverage
run: pytest tests --cov=. --cov-report=xml --durations=20 -vv
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions assets/version.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is mostly because the pyproject.toml uses it, similar to torchtitan does it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But does it need it to run? IIUC, it should not and I'd prefer not to add until necessary.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies = [
# PyTorch
"torchdata>=0.8.0",
"torchtitan",
"torchao",
# vLLM
# TODO: pin specific vllm version
#"vllm==0.10.0",
Expand Down
3 changes: 1 addition & 2 deletions src/forge/actors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
# LICENSE file in the root directory of this source tree.

from .collector import Collector
from .policy import Policy, PolicyRouter

__all__ = ["Collector", "Policy", "PolicyRouter"]
__all__ = ["Collector"]
7 changes: 4 additions & 3 deletions src/forge/data/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

from .dataset import DatasetInfo, InfiniteTuneIterableDataset
from .dataset import DatasetInfo, InfiniteTuneIterableDataset, InterleavedDataset
from .hf_dataset import HfIterableDataset
from .packed import PackedDataset
from .sft_dataset import SFTOutputTransform, sft_iterable_dataset
from .sft_dataset import sft_iterable_dataset, SFTOutputTransform

__all__ = [
"DatasetInfo",
"HfIterableDataset",
"InterleavedDataset",
"InfiniteTuneIterableDataset",
"PackedDataset",
"SFTOutputTransform",
"sft_iterable_dataset",
]
]
Loading