Skip to content

Commit

Permalink
✨ Add validation mechanism of ModuleNode (#43)
Browse files Browse the repository at this point in the history
* ✨ Add validate mechanism of ModuleNode

* clean

* update README

* fix
  • Loading branch information
Asthestarsfalll authored Dec 9, 2024
1 parent 66bab3f commit 93c05bc
Show file tree
Hide file tree
Showing 11 changed files with 831 additions and 700 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Config System in `ExCore` is specifically designed for deeplearning training (ge
2. `Intermediate` objects are those which are **indirectly** used in training, e.g. backbone of the model, parameters of model that will pass to optimizer. `ExCore` will instantiate them, and pass them to target `Primary` objects as arguments according some rules.
3. `Isolated` objects refer to python built-in objects which will be parsed when loading toml, e.g. int, string, list and dict.

`ExCore` extends the syntax of toml file, introducing some special prefix characters -- `!`, `@`, `$` and '&' to simplify the config defination.
`ExCore` extends the syntax of toml file, introducing some special prefix characters -- `!`, `@`, `$` and `&` to simplify the config defination.

The config system has following features.

Expand Down Expand Up @@ -400,6 +400,17 @@ module_dict, run_info = config.build_all(layz_cfg)

</details>

<details>
<summary>:sparkles:Module validation and lazy assignment</summary>

Validate parameters of modules before their initialization and call, which will save time from some serial long initialization.

If there is any parameter missing, you can manually assign it to avoid crushing. It will be parsed to str, int, list, tuple, or dict.

Use environment variable `EXCORE_VALIDATE` and `EXCORE_MANUAL_SET` to control whether validate and assign.

</details>

<details>
<summary>Config print</summary>

Expand Down
Loading

0 comments on commit 93c05bc

Please sign in to comment.