Skip to content

Commit

Permalink
Fix config loading for jupyter environments (#30)
Browse files Browse the repository at this point in the history
* Fix config loading for jupyter environments

The current way of loading config does not work on jupyter environments such as Colab - see eladrich/pyrallis#18

* pre-commit;

Signed-off-by: junsongc <[email protected]>

---------

Signed-off-by: junsongc <[email protected]>
Co-authored-by: junsongc <[email protected]>
  • Loading branch information
odusseys and lawrence-cj authored Nov 22, 2024
1 parent c66ebf9 commit 85e470c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/sana_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(
config: Optional[str] = "configs/sana_config/1024ms/Sana_1600M_img1024.yaml",
):
super().__init__()
config = pyrallis.parse(config_class=SanaInference, config_path=config)
config = pyrallis.load(SanaInference, open(config))
self.args = self.config = config

# set some hyper-parameters
Expand Down

0 comments on commit 85e470c

Please sign in to comment.