Skip to content

Commit

Permalink
fix doc typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rsokl committed Jun 8, 2021
1 parent 641c38c commit 191c188
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/source/structured_configs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -498,17 +498,15 @@ Misspelled parameter names and other invalid configurations for the target's sig
__main__.func takes 1 positional args, but 2 were specified via `builds`
Because `builds` automatically mirror's type annotations from the target's signature, we also benefit from Hydra's type-validation mechanism.
Because `builds` automatically mirrors type annotations from the target's signature, we also benefit from Hydra's type-validation mechanism.
.. code:: python
>>> def func(parameter: int): pass
>>> instantiate(builds(func, a_number="a string"))
---------------------------------------------------------------------------
TypeError: Building: func ..
The following unexpected keyword argument(s) was specified for __main__.func via `builds`: a_number
>>> instantiate(builds(func, parameter="a string"))
---------------------------------------------------------------------------------
ValidationError: Invalid value assigned : str is not a int.
Automatic Type Refinement
=========================
Expand Down

0 comments on commit 191c188

Please sign in to comment.