Closed oliver-lloyd closed 1 year ago
self.get_option
retrieves an option under the key for the current class (here: complex.entity_embedder
), which is not what you want. Use self.config.get
instead.
self.get_option
retrieves an option under the key for the current class (here:complex.entity_embedder
), which is not what you want. Useself.config.get
instead.
Brilliant, thank you!
Hi,
I am trying to add a simple bool flag to the default config that can be retrieved and set as an attribute in lookup_embedder.py. I have added the following to the end of config-default.yaml:
and the following to my job config (toy-complex-search-ax.yaml):
with this line added in LookupEmbedder.init():
self.my_bool = self.get_option("user.my_bool")
Trying to run the job with these modifications causes an error (traceback below). Could someone please explain why this exception occurs, and how I can properly set custom flags in job configs?
Many thanks in advance!