logger.info('Creating evaluation object from %s with learning curve and training video',training_dir)
eliftraining_episode_batch_idisnotNone:
logger.info('Creating evaluation object from %s with learning curve',training_dir)
eliftraining_video_idisnotNone:
logger.info('Creating evaluation object from %s with training video',training_dir)
else:
raiseerror.Error("You didn't have any recorded training data in {}. Once you've used 'env.monitor.start(training_dir)' to start recording, you need to actually run some rollouts. Please join the community chat on https://gym.openai.com if you have any issues.".format(training_dir))
logger.warn('You recorded videos for {} episodes, but the scoreboard only supports up to {}. We will automatically subsample for you, but you also might wish to adjust your video recording rate.'.format(len(videos),MAX_VIDEOS))
raiseerror.Error('Trying to upload {} videos, but there is a limit of {} currently. If you actually want to upload this many videos, please email gym@openai.com with your use-case.'.format(MAX_VIDEOS,len(videos)))
logger.debug('Preparing an archive of %d videos: %s',len(videos),videos)
raiseerror.Error('No such video file {}. (HINT: Your video recorder may have broken midway through the run. You can check this with `video_recorder.functional`.)'.format(video_path))
elifnotos.path.exists(metadata_path):
raiseerror.Error('No such metadata file {}. (HINT: this should be automatically created when using a VideoRecorder instance.)'.format(video_path))
# Do some sanity checking
ifvideo_nameinbasenames:
raiseerror.Error('Duplicated video name {} in video list: {}'.format(video_name,videos))
elifmetadata_nameinbasenames:
raiseerror.Error('Duplicated metadata file name {} in video list: {}'.format(metadata_name,videos))
elifnotvideo_name_re.search(video_name):
raiseerror.Error('Invalid video name {} (must match {})'.format(video_name,video_name_re.pattern))
elifnotmetadata_name_re.search(metadata_name):
raiseerror.Error('Invalid metadata file name {} (must match {})'.format(metadata_name,metadata_name_re.pattern))
# Record that we've seen these names; add to manifest