google / google/gin-config

Evaluate reference with kwargs ?

Open
#58 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.2k
Forks
122
Avg merge
5d 10h
Merged PRs (30d)
2

Description

Sometimes it is necessary to pass the result of calling a specific function or class constructor. Gin supports "evaluating" configurable references via the @name() syntax, but do not support passing
kwargs , it's not flexible

For example, say we wanted to use the result of calling `test_func`

```python
@gin.configurable
def test_func(a , b)
...
```
we should config as
```
scope/test_func.a='a'
scope/test_func.b='b'
ref=scope/test_func()
```

should it possible be simplified as
```
ref=scope/test_func(a='a', b='b')
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.