-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Allow usage of additional types in config #11
Comments
This is something that I've thought about in the past and arrived at the conclusion of only allowing primitive types. Here are the learnings from Detectron, where we allow any type in the config, including user defined classes. Two issues arise:
My conclusion from this is that it's probably best to restrict types to primitive ones. Though I do understand that there are tradeoffs and so it is a compromise position. I have not checked if the |
What about the |
@rbgirshick, still having this problem. I agree with the issues you raised and as a compromise I think I currently have a problem with dates. When I try to use date-like string in yaml, DATE: 2020-03-05 Also, |
please add None as a a valid type :) |
Currently only a few primitive types are allowed as values in config, this is a bit restrictive. For example, I would like to store pixel mean values in the config, currently I would need to use
list
ortuple
. In most cases I would have to convert those values tonp.array
each time I want to use them, which is inconvenient.It would be nice if I could use
np.array
inside config. I think any type which can be represented as a string or in terms of simple types should be available to be used in the config. In case ofnp.array
it can be represented in terms of nested lists in yaml file and convert to array on load.The text was updated successfully, but these errors were encountered: