Skip to content

Commit 337d4d1

Browse files
committed
renew the code
Signed-off-by: reiase <[email protected]>
1 parent 0e62785 commit 337d4d1

File tree

6 files changed

+709
-498
lines changed

6 files changed

+709
-498
lines changed

.github/workflows/codecov.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: codecov
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
name: Test python API
9+
defaults:
10+
run:
11+
working-directory: .
12+
steps:
13+
- uses: actions/checkout@v1
14+
- uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.9'
17+
- name: Install requirements
18+
run: |
19+
pip install -r requirements.txt && pip install pytest pytest-cov &&
20+
pip install -r test_requirements.txt
21+
- name: Run tests and collect coverage
22+
run: pytest --cov=./ --cov-report=xml
23+
- name: Upload coverage reports to Codecov with GitHub Action
24+
uses: codecov/codecov-action@v3
25+
with:
26+
token: ${{ secrets.CODECOV }}

hyperparameter/__init__.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
from .hp import HyperParameter, param_scope, auto_param
2-
from .hp import Tracker
1+
from .hyperparameter import HyperParameter
2+
from .hyperparameter import param_scope, reads, writes, all_params
3+
from .hyperparameter import auto_param, set_auto_param_callback
4+
from .hyperparameter import dynamic_dispatch
35

4-
set_tracker = Tracker.set_tracker
6+
__all__ = [
7+
"HyperParameter",
8+
"dynamic_dispatch",
9+
"param_scope",
10+
"reads",
11+
"writes",
12+
"all_params",
13+
"auto_param",
14+
"set_auto_param_callback",
15+
]

0 commit comments

Comments
 (0)