I want to use gin config for a project, but even the most basic example raises a ValueError: No configurable matching {}.
I copied this example straight from here
config.gin
make_drink.drink_name = "G&T"
make_drink.ingredients = ["Gin", "Tonic", "Lemon"]
make_drink.ice = False
main.py
import gin
gin.parse_config_file("./config.gin")
@gin.configurable
def make_drink(drink_name:str, ingredients:list, ice:bool=False):
print(f"New drink called: {drink_name}")
print(f"Drink contains: " + ", ".join(ingredients))
if ice is True:
print("With ice")
else:
print("Without ice")
make_drink()
The result is always the same:
ValueError: No configurable matching 'make_drink'.
In file "./config.gin", line 1
make_drink.drink_name = "G&T"
Thank you in advance!