import tensorflow as tf

        val_losses_warmup = deque(maxlen=warmup_n_model_iters // FLAGS.model.validation_freq)
        val_losses_slbo = deque(maxlen=slbo_n_model_iters // FLAGS.model.validation_freq)
        # NOTE: For each test task, we should reset model to the loaded one, and randomly initialize policy and vfn
        #if test:
        #    saver.load_state_dict(np.load(model_load, allow_pickle=True)[()])
        #    logger.warning('Load model from %s', model_load)
        if test:
            logger.info("################################################## TESTING TASK %d ################################################", TEST_TASK_NUM)
            logger.info(f'TEST_TASK_NUM={TEST_TASK_NUM}, TASK_NUM={TASK_NUM}')
            logger.warning('Revert model and normalizers')
            tf.get_default_session().run(sync_model_from_lazymodel)
            tf.get_default_session().run(revert_normalizers)
        else:
            logger.info("################################################## TRAINING TASK %d ################################################", TASK_NUM)
        if test:
            test_returns = []
            test_summary['warmupprocess'].append([])
            test_summary['slbo'].append([])
        if not test: #and FLAGS.task.method == 'random':
            if inittask != 'none' and TASK_NUM == 1:
