Skip to content

Commit

Permalink
Add monkey spinner to train/test scripts before launch
Browse files Browse the repository at this point in the history
  • Loading branch information
DubiousCactus committed Jul 28, 2024
1 parent f9740c5 commit 5b7d47c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
21 changes: 14 additions & 7 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@
#
# Distributed under terms of the MIT license.

from rich.console import Console
from rich.live import Live

from hydra_zen import store, zen
if __name__ == "__main__":
console = Console()
status = console.status(
"[bold cyan]Building experiment configurations...", spinner="monkey"
)
with Live(status, console=console):
from hydra_zen import store, zen

from bootstrap.launch_experiment import launch_experiment
from conf import project as project_conf
from conf.experiment import make_experiment_configs
from utils import seed_everything
from bootstrap.launch_experiment import launch_experiment
from conf import project as project_conf
from conf.experiment import make_experiment_configs
from utils import seed_everything

if __name__ == "__main__":
make_experiment_configs()
make_experiment_configs()

def set_test_mode(cfg):
cfg.run.training_mode = False
Expand Down
22 changes: 14 additions & 8 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
# Copyright © 2023 Théo Morales <[email protected]>
#
# Distributed under terms of the MIT license.
from rich.console import Console
from rich.live import Live

if __name__ == "__main__":
console = Console()
status = console.status(
"[bold cyan]Building experiment configurations...", spinner="monkey"
)
with Live(status, console=console):
from hydra_zen import store, zen

from hydra_zen import store, zen

from bootstrap.launch_experiment import launch_experiment
from conf import project as project_conf
from conf.experiment import make_experiment_configs
from utils import seed_everything
from bootstrap.launch_experiment import launch_experiment
from conf import project as project_conf
from conf.experiment import make_experiment_configs
from utils import seed_everything

if __name__ == "__main__":
make_experiment_configs()
make_experiment_configs()
"============ Hydra-Zen ============"
store.add_to_hydra_store(
overwrite_ok=True
Expand Down

0 comments on commit 5b7d47c

Please sign in to comment.