Skip to content

Commit cf20ea6

Browse files
feat: dependency file created and pytest workflow added
1 parent 0a3202e commit cf20ea6

File tree

3 files changed

+99
-0
lines changed

3 files changed

+99
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install .[dev]
25+
26+
- name: Run tests
27+
env:
28+
HYDRA_CONFIG_PATH: configs
29+
HYDRA_CONFIG_NAME: config
30+
HYDRA_TRAINING: test
31+
TEST_ENV: true
32+
run: |
33+
python -m pytest tests/ -v

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ MarsBench is an initiative to develop a comprehensive benchmarking platform for
1111
- **Evaluation:** Test datasets using popular models (e.g., U-Net, SegFormer) and document performance.
1212
- **Website and Leaderboard:** Develop a website for the MarsBench platform, featuring a leaderboard similar to GLUE or Hugging Face.
1313

14+
## Installation
15+
16+
To install MarsBench and its dependencies:
17+
18+
```bash
19+
# Install the package with core dependencies
20+
pip install -e .
21+
22+
# Install with development dependencies (for testing, linting, etc.)
23+
pip install -e ".[dev]"
24+
```
25+
1426
## Tasks and Updates
1527

1628
- **Task 0:** Complete Mars Datasets Documentation. Ensure all datasets have accurate information about train, validation, and test splits, and check for existing SOTA results.

pyproject.toml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[build-system]
2+
requires = ["setuptools>=74.0.0", "wheel>=0.44.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "MarsBench"
7+
version = "0.1.0"
8+
description = "A benchmarking suite for composition in machine learning models"
9+
readme = "README.md"
10+
requires-python = ">=3.6"
11+
license = {text = "MIT"}
12+
authors = [
13+
{name = "MarsBench Authors"}
14+
]
15+
dependencies = [
16+
"torch>=2.4.0",
17+
"torchvision>=0.19.0",
18+
"pytorch-lightning>=2.4.0",
19+
"hydra-core>=1.3.2",
20+
"omegaconf>=2.1.0",
21+
"pandas>=2.2.2",
22+
"pillow>=10.2.0",
23+
"segmentation-models-pytorch>=0.4.0",
24+
"wandb>=0.18.5",
25+
]
26+
27+
[project.optional-dependencies]
28+
dev = [
29+
"pytest>=8.3.3",
30+
"pytest-cov>=5.0.0",
31+
"black>=24.8.0",
32+
"flake8>=4.0.1",
33+
"isort>=5.10.0",
34+
"pre-commit>=3.8.0",
35+
]
36+
37+
[tool.pytest]
38+
testpaths = ["tests"]
39+
python_files = "test_*.py"
40+
filterwarnings = [
41+
"ignore::ResourceWarning",
42+
"ignore::DeprecationWarning",
43+
"ignore:The `srun` command is available on your system but is not used:UserWarning",
44+
"ignore:.*cuda initialization.*:UserWarning",
45+
"ignore:.*overflow encountered in exp.*:RuntimeWarning",
46+
]
47+
48+
[tool.black]
49+
line-length = 120
50+
target-version = ["py36", "py37", "py38", "py39"]
51+
52+
[tool.isort]
53+
profile = "black"
54+
force_single_line = true

0 commit comments

Comments
 (0)