Esempio n. 1
0
    def update(self):
        if connected_to_internet():
            data = self.fetcher.fetch(self.date_from)
            # update whole data, because data can be changed after initial release

            data.dropna(axis=0, how='any', inplace=True)

            self._combine_data(data)

            self.save()
            self.last_fetched = datetime.datetime.now()
            self.check_up_to_date()
Esempio n. 2
0
    np.random.seed(args.seed)
    torch.manual_seed(args.seed)
    torch.backends.cudnn.deterministic = args.torch_deterministic
    env.seed(args.seed)
    env.action_space.seed(args.seed)
    env.observation_space.seed(args.seed)
    #####################################

    # book keeping to log stuff
    if args.dryrun:
        writer = None
        weight_save_path = 'model_dryrun.ckpt'
    else:
         # check internet connection
        # for offline wandb. Will load everything on cloud afterwards
        if not connected_to_internet():
            import json
            # save a json file with your wandb api key in your home folder as {'my_wandb_api_key': 'INSERT API HERE'}
            # NOTE this is only for running on MIT Supercloud
            with open(os.path.expanduser('~')+'/keys.json') as json_file: 
                key = json.load(json_file)
                my_wandb_api_key = key['my_wandb_api_key'] # NOTE change here as well
            os.environ["WANDB_API_KEY"] = my_wandb_api_key # my Wandb api key
            os.environ["WANDB_MODE"] = "dryrun"

        start_time = time.strftime("%H_%M_%S-%d_%m_%Y", time.localtime())
        pretty_env_name = get_pretty_env_name(args.env_name)
        experiment_name = f"{args.exp_name}_{pretty_env_name}_{args.seed}_{start_time}"
        
        # create only one wandb logger instead of 8/16!!!
        if MPI.COMM_WORLD.Get_rank() == 0:
Esempio n. 3
0
 def update(self):
     if connected_to_internet():
         LOGGER.send_info("Spuštěn update.")
         self._update_datasets()
     self.app.callback_queue.put(self._update_controllers)