Upload policy_checkpoints/CoffeePreparation_D1/2025-02-03-00-25-12_E32.0-CoffeePreparation_D1-375-nominal-125-boost/wandb/run-20250203_120350-sxyourhr/files/code/train.py with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536import sys# use line-buffering for both stdout and stderrsys.stdout = open(sys.stdout.fileno(), mode='w', buffering=1)sys.stderr = open(sys.stderr.fileno(), mode='w', buffering=1)
import hydraimport pathlib
from omegaconf import OmegaConf
from adaflow.workspace.base_workspace import BaseWorkspace
# allows arbitrary python code execution in configs using the ${eval:''} resolverOmegaConf.register_new_resolver("eval", eval, replace=True)
@hydra.main( version_base=None, config_path=str(pathlib.Path(__file__).parent.joinpath( 'adaflow','config')))def main(cfg: OmegaConf): # resolve immediately so all the ${now:} resolvers # will use the same time. OmegaConf.resolve(cfg) cls = hydra.utils.get_class(cfg._target_)
if cfg.training.resume_dir is not None: workspace: BaseWorkspace = cls(cfg, output_dir=cfg.training.resume_dir) else: workspace: BaseWorkspace = cls(cfg) workspace.run()
if __name__ == "__main__": main()policy_checkpoints/CoffeePreparation_D1/2025-02-03-00-25-12_E32.0-CoffeePreparation_D1-375-nominal-125-boost/wandb/run-20250203_120350-sxyourhr/files/code/train.pyAdded+36