xnn.common.config.options.ModelOptions#
- class xnn.common.config.options.ModelOptions(values=(), read=None, defaults=None)[source]#
Bases:
dictA copy of
ModelConfig.extrathat records which options are read.Reading a key (
options[key],get(),key in options,pop(),setdefault()) adds it toread, and the defaultget()returns for a missing key todefaults; both are shared with the copies made bycopy()andmodel_options().- Parameters:
- pop(k[, d]) v, remove specified key and return the corresponding value.[source]#
If the key is not found, return the default if given; otherwise, raise a KeyError.
- setdefault(key, default=None)[source]#
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- resolved()[source]#
The options given and the defaults used for the others.
Only defaults that a config file can hold (
None, numbers, strings and lists or dicts of those) are included; tuples become lists.- Return type:
- unread()[source]#
The options nothing has read, sorted.
CONFIG_KEYSand options set toNone(not set) are excepted.