Skip to content

Commit

Permalink
fix: parent should be really optional
Browse files Browse the repository at this point in the history
  • Loading branch information
bpiwowar committed Dec 21, 2023
1 parent 96dabd5 commit 1cab7c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
4 changes: 4 additions & 0 deletions docs/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ read ``YAML`` configuration files to setup some experimental parameters.
This can be extended to support more specific experiment helpers (see e.g.
experimaestro-ir for an example).

`ConfigurationBase` should be the parent class of any configuration.

::: experimaestro.scheduler.services.ConfigurationBase

### Example

An `experiment.py` file:
Expand Down
18 changes: 0 additions & 18 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,6 @@ Taking the configuration class `Adam` defined above, we have:
- `Adam(lr=1e-2).__identifier__()` returns `71848...` (different set of parameters)


First, any value can be
associated with a unique byte string: the byte string is obtained by outputting
the type of the value (e.g. string, ir.adhoc.dataset) and the value itself as a
binary string. A special handling of configurations and tasks (objects) is
performed by sorting keys in ascending lexicographic order, thus ensuring the
uniqueness of the representation.

Moreover

- Default values are removed (e.g. k1 when set to 0.9). This allows to
handle the situation where one adds a new experimental parameter
(e.g. a new loss component). In that case, using a default parameter
allows to add this parameter without invalidating all the previously
ran experiments.
- Ignored values are removed (e.g. the number of threads when
indexing, the path where the index is stored)


# Tasks

When it comes to actually running code, Experimaestro allows to define
Expand Down
2 changes: 1 addition & 1 deletion src/experimaestro/experiments/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ class ConfigurationBase:
file: str = "experiment"
"""qualified name (relative to the module) for the file containing a run function"""

parent: Optional[str]
parent: Optional[str] = None
"""Relative path of a YAML file that should be merged"""

0 comments on commit 1cab7c3

Please sign in to comment.