google / google/gin-config

Reference static class method in gin config

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

Description

In the following example I would like to assign a parameter to the static method ImplClass.foo . The reference `@ImplClass.foo` is not being resolved properly by gin.

```
from abc import ABC, abstractmethod
import gin

class BaseClass(ABC):
@staticmethod
@abstractmethod
def foo(a):
pass

@gin.register()
class ImplClass(BaseClass):
@gin.register()
def foo(a):
print("hello")
```

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.