prescient-design / cortex

A Modular Architecture for Deep Learning Systems
Apache License 2.0
36 stars 3 forks source link

`max_guidance_updates` has to be `>=1` because of `design_loss` #11

Closed miguelgondu closed 3 weeks ago

miguelgondu commented 1 month ago

If one sets max_guidance_updates: 0 in the configuration of the lambo optimizer, a silly error pops up:

Exception has occurred: UnboundLocalError
local variable 'design_loss' referenced before assignment

Which happens in line 215 of _lambo.py, building a metrics dict for wandb logging.

This problem can be solved by slightly modifying the for lang_step in range(self.max_guidance_updates) for-loop, adding some default Nones for the losses.