Comments (2)
to make this more precise, I would like to have the following script pass.
from dataclasses import dataclass
from omegaconf import OmegaConf, II
cfg1 = OmegaConf.create({"a": "${oc.select:..member, 5}"})
print(cfg1.a) # this raises an Error because of the missing node
@dataclass
class Config:
a: int = II("${oc.select:..member, 5}")
cfg2 = OmegaConf.structured(Config)
print(cfg2.a) # this raises an Error too
from omegaconf.
Indeed, it shouldn't crash if it can't find the node when a default value is provided.
from omegaconf.
Related Issues (20)
- Escaped resolver modifying `_root_` doesn't work HOT 2
- Inconsistencies in recursive behavior in `set_readonly()` HOT 7
- Improve error message for relative interpolations HOT 1
- Question : why we need "???" and what's for ? HOT 2
- Add function to check if key exists HOT 4
- Interpolations that resolve to missing value `???` don't get passed to resolvers HOT 3
- `OmegaConf.resolve` should crash when a resolver input is missing
- [Feature Request] integration between omegaconf and AWS Sagemaker Estimator's hyperparameters
- Add support for dataclasses._MISSING_TYPE
- Resolve relative variables inside of a list HOT 2
- readthedocs: No such file or directory: 'java'
- Node interpolation not working HOT 3
- ImportError: cannot import name 'get_ref_type' from 'omegaconf._utils' HOT 1
- Use `yaml.CSafeLoader` whenever possible for speedups
- Merge Option of update function does not merge list HOT 1
- Convert from OrderedDict? HOT 1
- Release schedule v2.4 HOT 2
- Support `Boost.Python.enum` Enums as annotation and supported type. HOT 1
- Feature Request: Key-based readonly flag. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omegaconf.