Skip to content

Commit

Permalink
Fix broken link in github sample code
Browse files Browse the repository at this point in the history
Fix some typos in minst docs

PiperOrigin-RevId: 505723059
  • Loading branch information
PyGlove Authors committed Jan 30, 2023
1 parent 69283d1 commit e6b7d69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@
"source": [
"### Developement and Troubleshooting\n",
"\n",
"Development can be done in a mannter similar to traditional object-oriented programming---indeed, PyGlove is compatible with the full Python syntax. In addition, the code can be manipulated through rules as explained in previous examples. This is enabled by annotations done with the `@pg.symbolize` decorator. `pg.symbolize` accepts an optional specification for argument validation rules, which will be automatically invoked during object creation and modification. This can aide troubleshooting by making human errors easier to catch."
"Development can be done in a manner similar to traditional object-oriented programming---indeed, PyGlove is fully compatible with Python syntax. In addition, the code can be manipulated through rules as explained in previous examples. This is enabled by annotations done with the `@pg.symbolize` decorator. `pg.symbolize` accepts an optional specification for argument validation rules, which will be automatically invoked during object creation and modification. This can aid troubleshooting by making human errors easier to catch."
]
},
{
Expand Down
16 changes: 8 additions & 8 deletions examples/automl/mnist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ regular Python program. Each may find its users among different codebases and
scenarios:

* **Passing a search space of hyper-parameters**:
This is the option for most ML practioners who already have a codebase that
This is the option for most ML practitioners who already have a codebase that
trains a single model by passing the hyper-parameters from the top.
By symbolizing the top-level function using functor, search can be enabled on
an existing codebase with a few lines of code. This option is illustrated in [mnist_tune_hparams.py](https://github.com/google/pyglove/examples/automl/mnist/mnist_tune_hparams.py)
an existing codebase with a few lines of code. This option is illustrated in [mnist_tune_hparams.py](https://github.com/google/pyglove/tree/main/examples/automl/mnist/mnist_tune_hparams.py)

* **Define-by-run search space definition**:
This option is for codebases whose hyper-parameters are not centrally managed
(e.g. specified within a function without passing from the function argument).
Therefore, users want to directly modify the code (e.g. function definitions)
to convert it into a search space. This option is the least flexibile but has
the smallest cost to get started with, illustrated in [mnist_tune_eagerly.py](https://github.com/google/pyglove/examples/automl/mnist/mnist_tune_eagerly.py)
to convert it into a search space. This option is the least flexible but has
the smallest cost to get started with, illustrated in [mnist_tune_eagerly.py](https://github.com/google/pyglove/tree/main/examples/automl/mnist/mnist_tune_eagerly.py)

* **Search space as a composition of symbolic objects**:
This is the most flexible and powerful option, which works well for software
systems that are already compositional (e.g. Keras layers).
Within a hierarchical composition, nodes are not only searchable, but also
rewrittable into different components or search spaces. This option is
recommended for new systems built for maximum flexiblity. This option is illustrated in [mnist_tune.py](https://github.com/google/pyglove/examples/automl/mnist/mnist_tune.py)
recommended for new systems built for maximum flexibility. This option is illustrated in [mnist_tune.py](https://github.com/google/pyglove/tree/main/examples/automl/mnist/mnist_tune.py)


## Option 1: Passing a search space of hyper-parameters
Expand Down Expand Up @@ -70,7 +70,7 @@ It can be used as a search space and optimized by `pg.sample` as follows:
feedback(reward)
```

See example on MNIST in [mnist_tune_hparams.py](https://github.com/google/pyglove/examples/automl/mnist/mnist_tune_hparams.py)
See example on MNIST in [mnist_tune_hparams.py](https://github.com/google/pyglove/tree/main/examples/automl/mnist/mnist_tune_hparams.py)

## Option 2: Define-by-run search space definition

Expand Down Expand Up @@ -123,7 +123,7 @@ When calling `foo` during defining the search space, its output will be
discarded, and later runs within the loop will produce a number as the feedback
to the search algorithm.

See example on MNIST in [mnist_tune_eagerly.py](https://github.com/google/pyglove/examples/automl/mnist/mnist_tune_eagerly.py)
See example on MNIST in [mnist_tune_eagerly.py](https://github.com/google/pyglove/tree/main/examples/automl/mnist/mnist_tune_eagerly.py)


## Option 3: Search space as a composition of symbolic objects
Expand Down Expand Up @@ -160,4 +160,4 @@ optimize it using `pg.sample`:
feedback(reward)
```

See example on MNIST in [mnist_tune.py](https://github.com/google/pyglove/examples/automl/mnist/mnist_tune.py)
See example on MNIST in [mnist_tune.py](https://github.com/google/pyglove/tree/main/examples/automl/mnist/mnist_tune.py)

0 comments on commit e6b7d69

Please sign in to comment.