original_docstring: 
          Save training or validation plots according to the given type. If type is test it does nothing.
  
          :param episode_volley_type: the type of episode volley to save the appropriate plots. Test is not valid and ignored
          
docstring: Save training or validation plots according to the given type. If type is test it does nothing.
docstring_tokens: Save training or validation plots according to the given type . If type is test it does nothing .
code: def _save_plots(self,
                      episode_volley_type: EpisodeVolleyType):
          """
          Save training or validation plots according to the given type. If type is test it does nothing.
  
          :param episode_volley_type: the type of episode volley to save the appropriate plots. Test is not valid and ignored
          """
          # If test volley avoid saving plots
          if episode_volley_type == EpisodeVolleyType.test:
              return
          # Make sure there is a plots path
          assert (self._plots_path is not None and self._plots_path)
          # Save plots according to the requested type
          if episode_volley_type == EpisodeVolleyType.training:
              plot.plot(list(range(len(self._training_avg_total_rewards))), self._training_avg_total_rewards, 'r-')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel("Training volley")
              plot.ylabel("Average total reward")
              plot.savefig(self._plots_path + "/training_volleys_total_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._training_avg_scaled_rewards))), self._training_avg_scaled_rewards, 'r--')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel("Training volley")
              plot.ylabel("Average scaled reward")
              plot.savefig(self._plots_path + "/training_volleys_scaled_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._training_std_total_rewards))), self._training_std_total_rewards, 'c-')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel("Training volley")
              plot.ylabel("Standard deviation of total reward")
              plot.savefig(self._plots_path + "/training_volleys_std_total_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._training_std_scaled_rewards))), self._training_std_scaled_rewards, 'c--')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Training volley')
              plot.ylabel('Standard deviation of scaled reward')
              plot.savefig(self._plots_path + "/training_volleys_std_scaled_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._training_avg_episode_lengths))), self._training_avg_episode_lengths, 'b-.')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Training volley')
              plot.ylabel('Average episode length (steps)')
              plot.savefig(self._plots_path + "/training_volleys_average_episode_length.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
          else:
              plot.plot(list(range(len(self._validation_avg_total_rewards))), self._validation_avg_total_rewards, 'm-')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Validation volley')
              plot.ylabel('Average total reward')
              plot.savefig(self._plots_path + "/validation_volleys_total_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._validation_avg_scaled_rewards))), self._validation_avg_scaled_rewards, 'm--')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Validation volley')
              plot.ylabel('Average scaled reward')
              plot.savefig(self._plots_path + "/validation_volleys_scaled_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._validation_std_total_rewards))), self._validation_std_total_rewards, 'y-')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Validation volley')
              plot.ylabel('Standard deviation of total reward')
              plot.savefig(self._plots_path + "/validation_volleys_std_total_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._validation_std_scaled_rewards))), self._validation_std_scaled_rewards, 'y--')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Validation volley')
              plot.ylabel('Standard deviation of scaled reward')
              plot.savefig(self._plots_path + "/validation_volleys_std_scaled_rewards.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
              plot.plot(list(range(len(self._validation_avg_episode_lengths))), self._validation_avg_episode_lengths, 'b-.')
              plot.gca().xaxis.set_major_locator(mticker.MaxNLocator(integer=True))
              plot.xlabel('Validation volley')
              plot.ylabel('Average episode length (steps)')
              plot.savefig(self._plots_path + "/validation_volleys_average_episode_length.png", dpi=self._plots_dpi, transparent=True)
              plot.clf()
code_tokens: def _save_plots ( self , episode_volley_type : EpisodeVolleyType ) : if episode_volley_type == EpisodeVolleyType . test : return assert ( self . _plots_path is not None and self . _plots_path ) if episode_volley_type == EpisodeVolleyType . training : plot . plot ( list ( range ( len ( self . _training_avg_total_rewards ) ) ) , self . _training_avg_total_rewards , 'r-' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( "Training volley" ) plot . ylabel ( "Average total reward" ) plot . savefig ( self . _plots_path + "/training_volleys_total_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _training_avg_scaled_rewards ) ) ) , self . _training_avg_scaled_rewards , 'r--' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( "Training volley" ) plot . ylabel ( "Average scaled reward" ) plot . savefig ( self . _plots_path + "/training_volleys_scaled_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _training_std_total_rewards ) ) ) , self . _training_std_total_rewards , 'c-' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( "Training volley" ) plot . ylabel ( "Standard deviation of total reward" ) plot . savefig ( self . _plots_path + "/training_volleys_std_total_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _training_std_scaled_rewards ) ) ) , self . _training_std_scaled_rewards , 'c--' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Training volley' ) plot . ylabel ( 'Standard deviation of scaled reward' ) plot . savefig ( self . _plots_path + "/training_volleys_std_scaled_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _training_avg_episode_lengths ) ) ) , self . _training_avg_episode_lengths , 'b-.' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Training volley' ) plot . ylabel ( 'Average episode length (steps)' ) plot . savefig ( self . _plots_path + "/training_volleys_average_episode_length.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) else : plot . plot ( list ( range ( len ( self . _validation_avg_total_rewards ) ) ) , self . _validation_avg_total_rewards , 'm-' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Validation volley' ) plot . ylabel ( 'Average total reward' ) plot . savefig ( self . _plots_path + "/validation_volleys_total_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _validation_avg_scaled_rewards ) ) ) , self . _validation_avg_scaled_rewards , 'm--' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Validation volley' ) plot . ylabel ( 'Average scaled reward' ) plot . savefig ( self . _plots_path + "/validation_volleys_scaled_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _validation_std_total_rewards ) ) ) , self . _validation_std_total_rewards , 'y-' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Validation volley' ) plot . ylabel ( 'Standard deviation of total reward' ) plot . savefig ( self . _plots_path + "/validation_volleys_std_total_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _validation_std_scaled_rewards ) ) ) , self . _validation_std_scaled_rewards , 'y--' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Validation volley' ) plot . ylabel ( 'Standard deviation of scaled reward' ) plot . savefig ( self . _plots_path + "/validation_volleys_std_scaled_rewards.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( ) plot . plot ( list ( range ( len ( self . _validation_avg_episode_lengths ) ) ) , self . _validation_avg_episode_lengths , 'b-.' ) plot . gca ( ) . xaxis . set_major_locator ( mticker . MaxNLocator ( integer = True ) ) plot . xlabel ( 'Validation volley' ) plot . ylabel ( 'Average episode length (steps)' ) plot . savefig ( self . _plots_path + "/validation_volleys_average_episode_length.png" , dpi = self . _plots_dpi , transparent = True ) plot . clf ( )
short_docstring: Save training or validation plots according to the given type.
short_docstring_tokens: Save training or validation plots according to the given type .
comment: """
          Save training or validation plots according to the given type. If type is test it does nothing.
  
          :param episode_volley_type: the type of episode volley to save the appropriate plots. Test is not valid and ignored
          """$SEP$# If test volley avoid saving plots$SEP$# Make sure there is a plots path$SEP$# Save plots according to the requested type