Skip to content

Commit 0955e48

Browse files
committed
update docs
Signed-off-by: reiase <[email protected]>
1 parent afe3684 commit 0955e48

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

.github/workflows/mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ jobs:
1111
steps:
1212
- name: Checkout main
1313
uses: actions/checkout@v2
14-
14+
- name: Install requirements
15+
run: |
16+
pip install mkdocs mkdocs-i18n mkdocs-material mkdocs-material-extensions &&
17+
pip install mkdocs-autorefs mkdocstrings mkdocstrings-python
1518
- name: Deploy docs
1619
uses: mhausenblas/mkdocs-deploy-gh-pages@master
1720
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
A hyper-parameter library for researchers, data scientists and machine learning engineers.
55

66
Quick Start
7-
============
7+
-----------
88

9-
## Object-Style API:
9+
### Object-Style API:
1010

1111
```python
1212
>>> from hyperparameter import HyperParameter
@@ -19,7 +19,7 @@ True
1919

2020
```
2121

22-
or becomes powerful with `hp()`:
22+
If we want safe access to undefined parameters with default values, we can use `hp()` instead of `hp`:
2323

2424
```python
2525
>>> hp = HyperParameter()
@@ -34,7 +34,7 @@ or becomes powerful with `hp()`:
3434

3535
```
3636

37-
## Scoped Parameter
37+
### Scoped Parameter
3838

3939
```python
4040
>>> from hyperparameter import param_scope
@@ -45,7 +45,8 @@ or becomes powerful with `hp()`:
4545
True
4646

4747
```
48-
or becomes powerful with `nested scope`:
48+
49+
When nested, the parameter modifications are limited to the inner scope:
4950
``` python
5051
>>> with param_scope(a=1) as ps:
5152
... with param_scope(a=2) as ps2:
@@ -56,28 +57,27 @@ True
5657

5758
```
5859

59-
even more powerful when using `param_scope` in function:
60+
The nested scope feature can be used to config the default behavior when used in functions:
6061

6162
```python
6263
#change function behavior with scoped parameter:
63-
def foo(arg):
64+
def dnn(input):
6465
# receive parameter using param_scope
65-
with param_scope() as ps:
66-
if (ps().param1(1) == 1):
67-
return 1
68-
else:
69-
return 2
70-
...
66+
with param_scope() as ps:
67+
output = linear(inputs)
68+
return activation_fn(
69+
output,
70+
activation=ps().activation("relu"))
7171

7272
# call function with default parameter
73-
foo() # 1
73+
dnn()
7474

7575
# passing parameter using param_scope
76-
with param_scope(param1=2):
77-
foo() # 2
76+
with param_scope(activation="sigmoid"):
77+
dnn()
7878
```
7979

80-
## Predefined Parameter
80+
### Predefined Parameter
8181
```python
8282
@auto_param #convert keyword arguments into hyper parameters
8383
def model_train(X, y, learning_rate = 1.0, penalty = 'l1'):
@@ -92,18 +92,18 @@ with param_scope('model_train.learning_rate=0.01'):
9292
```
9393

9494
Examples
95-
========
95+
--------
9696

97-
## [parameter tunning for researchers](examples/sparse_lr/README.md)
97+
### [parameter tunning for researchers](examples/sparse_lr/README.md)
9898

9999
This example shows how to use hyperparameter in your research projects, and make your experiments reproducible.
100100

101-
## [experiment tracing for data scientists](examples/mnist/README.md)
101+
### [experiment tracing for data scientists](examples/mnist/README.md)
102102

103103
This example shows experiment management with hyperparameter, and tracing the results with mlflow.tracing.
104104

105105
Todo.
106106

107-
## design-pattern for system engineers
107+
### design-pattern for system engineers
108108

109109
Todo.

0 commit comments

Comments
 (0)