Add std.parseFloat
Open
enhancement
stdlib
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
I would like to suggest a feature to parse strings into float numbers. I haven't found `std.parseFloat()` function in https://jsonnet.org/ref/stdlib.html. Since `std.extVar` returns a string it's impossible to use float numbers as external variables.
In my case, it would be useful since I used jsonnet to describe experiments in AllenNLP framework as sometimes I pass hyperparameters like learning rate as an environmental variable. Although I could obviously pass them using a top-level function, some platforms like Polyaxon requires to pass them as environmental variables.
Contributor guide
Assessment
This issue has not been assessed yet.