Skip to content

Commit

Permalink
Version bump to 0.1.4 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgirshick authored Sep 17, 2018
1 parent 05006b0 commit a4bba08
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ if __name__ == "__main__":

### Additional Options and Tips

TODO:
- document command line overrides
- give usual tips
#### Command line overrides

You can update a `CfgNode` using a list of fully-qualified key, value pairs.
This makes it easy to consume override options from the command line. For example:

```python
cfg.merge_from_file("experiment.yaml")
# Now override from a list (opts could come from the command line)
opts = ["SYSTEM.NUM_GPUS", 8, "TRAIN.SCALES", "(1, 2, 3, 4)"]
cfg.merge_from_list(opts)
```

#### Python config files (instead of YAML)

`yacs>= 0.1.4` supports loading `CfgNode` objects from Python source files. The
convention is that the Python source must export a module variable named `cfg` of
type `dict` or `CfgNode`. See examples using a [CfgNode](example/config_override.py)
and a [dict](example/config_override_from_dict.py) as well as usage in the unit tests.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="yacs",
version="0.1.3",
version="0.1.4",
author="Ross Girshick",
author_email="[email protected]",
description="Yet Another Configuration System",
Expand Down

0 comments on commit a4bba08

Please sign in to comment.