I’d like to make my basic confusion clear by some demo codes below.
So as usual, when we need to train multiply we use SubprocVecEnv to define env.
but when it comes to load saved model and making the test run, we should still pass a SubprocVecEnv to predict? isn’t that model shall use a single real world input observation and step each once? why codes like these below
test_env = DummyVecEnv([make_env(test_provider) for _ in range(1)])
obs, reward, done, info = test_env.step([action[0]])
that means even in testing data, we still multi testing?? but there only one test data set,shouldn’t we only need to make single observation for single step? why the vector env in training have business with model testing
even this in loading a model saved just pass a dummyvecenv?? If in the real world environment, we could not pass realtime in several ways could we?
demo code cannot understand
init_envs = DummyVecEnv([make_env(test_provider) for _ in range(self.n_envs)])
model_path = path.join('data', 'agents', f'{self.study_name}__{model_epoch}.pkl')
model = self.Model.load(model_path, env=init_envs)