Skip to content

Commit

Permalink
Fix config loading for jupyter environments
Browse files Browse the repository at this point in the history
The current way of loading config does not work on jupyter environments such as Colab - see eladrich/pyrallis#18
  • Loading branch information
odusseys authored Nov 22, 2024
1 parent c66ebf9 commit 742ef1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/sana_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def __init__(
config: Optional[str] = "configs/sana_config/1024ms/Sana_1600M_img1024.yaml",
):
super().__init__()
config = pyrallis.parse(config_class=SanaInference, config_path=config)
with open(config) as cf:
config = pyrallis.load(SanaInference, f)
self.args = self.config = config

# set some hyper-parameters
Expand Down

0 comments on commit 742ef1c

Please sign in to comment.