docstr: :param print_networks_summary:
      If set to True, a summary of all the networks structure will be printed at the beginning of the experiment
  :param dump_csv:
      If set to True, the logger will dump logs to a csv file once in every dump_signals_to_csv_every_x_episodes
      episodes. The logs can be later used to visualize the training process using Coach Dashboard.
  :param dump_signals_to_csv_every_x_episodes:
      Defines the number of episodes between writing new data to the csv log files. Lower values can affect
      performance, as writing to disk may take time, and it is done synchronously.
  :param dump_gifs:
      If set to True, GIF videos of the environment will be stored into the experiment directory according to
      the filters defined in video_dump_methods.
  :param dump_mp4:
      If set to True, MP4 videos of the environment will be stored into the experiment directory according to
      the filters defined in video_dump_methods.
  :param dump_in_episode_signals:
      If set to True, csv files will be dumped for each episode for inspecting different metrics within the
      episode. This means that for each step in each episode, different metrics such as the reward, the
      future return, etc. will be saved. Setting this to True may affect performance severely, and therefore
      this should be used only for debugging purposes.
  :param dump_parameters_documentation:
      If set to True, a json file containing all the agent parameters will be saved in the experiment directory.
      This may be very useful for inspecting the values defined for each parameters and making sure that all
      the parameters are defined as expected.
  :param render:
      If set to True, the environment render function will be called for each step, rendering the image of the
      environment. This may affect the performance of training, and is highly dependent on the environment.
      By default, Coach uses PyGame to render the environment image instead of the environment specific rendered.
      To change this, use the native_rendering flag.
  :param native_rendering:
      If set to True, the environment native renderer will be used for rendering the environment image.
      In some cases this can be slower than rendering using PyGame through Coach, but in other cases the
      environment opens its native renderer by default, so rendering with PyGame is an unnecessary overhead.
  :param max_fps_for_human_control:
      The maximum number of frames per second used while playing the environment as a human. This only has
      effect while using the --play flag for Coach.
  :param tensorboard:
      If set to True, TensorBoard summaries will be stored in the experiment directory. This can later be
      loaded in TensorBoard in order to visualize the training process.
  :param video_dump_methods:
      A list of dump methods that will be used as filters for deciding when to save videos.
      The filters in the list will be checked one after the other until the first dump method that returns
      false for should_dump() in the environment class. This list will only be used if dump_mp4 or dump_gif are
      set to True.
  :param add_rendered_image_to_env_response:
      Some environments have a different observation compared to the one displayed while rendering.
      For some cases it can be useful to pass the rendered image to the agent for visualization purposes.
      If this flag is set to True, the rendered image will be added to the environment EnvResponse object,
      which will be passed to the agent and allow using those images.
docstr_tok: [":","param","print_networks_summary",":","If","set","to","True",",","a","summary","of","all","the","networks","structure","will","be","printed","at","the","beginning","of","the","experiment",":","param","dump_csv",":","If","set","to","True",",","the","logger","will","dump","logs","to","a","csv","file","once","in","every","dump_signals_to_csv_every_x_episodes","episodes",".","The","logs","can","be","later","used","to","visualize","the","training","process","using","Coach","Dashboard",".",":","param","dump_signals_to_csv_every_x_episodes",":","Defines","the","number","of","episodes","between","writing","new","data","to","the","csv","log","files",".","Lower","values","can","affect","performance",",","as","writing","to","disk","may","take","time",",","and","it","is","done","synchronously",".",":","param","dump_gifs",":","If","set","to","True",",","GIF","videos","of","the","environment","will","be","stored","into","the","experiment","directory","according","to","the","filters","defined","in","video_dump_methods",".",":","param","dump_mp4",":","If","set","to","True",",","MP4","videos","of","the","environment","will","be","stored","into","the","experiment","directory","according","to","the","filters","defined","in","video_dump_methods",".",":","param","dump_in_episode_signals",":","If","set","to","True",",","csv","files","will","be","dumped","for","each","episode","for","inspecting","different","metrics","within","the","episode",".","This","means","that","for","each","step","in","each","episode",",","different","metrics","such","as","the","reward",",","the","future","return",",","etc",".","will","be","saved",".","Setting","this","to","True","may","affect","performance","severely",",","and","therefore","this","should","be","used","only","for","debugging","purposes",".",":","param","dump_parameters_documentation",":","If","set","to","True",",","a","json","file","containing","all","the","agent","parameters","will","be","saved","in","the","experiment","directory",".","This","may","be","very","useful","for","inspecting","the","values","defined","for","each","parameters","and","making","sure","that","all","the","parameters","are","defined","as","expected",".",":","param","render",":","If","set","to","True",",","the","environment","render","function","will","be","called","for","each","step",",","rendering","the","image","of","the","environment",".","This","may","affect","the","performance","of","training",",","and","is","highly","dependent","on","the","environment",".","By","default",",","Coach","uses","PyGame","to","render","the","environment","image","instead","of","the","environment","specific","rendered",".","To","change","this",",","use","the","native_rendering","flag",".",":","param","native_rendering",":","If","set","to","True",",","the","environment","native","renderer","will","be","used","for","rendering","the","environment","image",".","In","some","cases","this","can","be","slower","than","rendering","using","PyGame","through","Coach",",","but","in","other","cases","the","environment","opens","its","native","renderer","by","default",",","so","rendering","with","PyGame","is","an","unnecessary","overhead",".",":","param","max_fps_for_human_control",":","The","maximum","number","of","frames","per","second","used","while","playing","the","environment","as","a","human",".","This","only","has","effect","while","using","the","--","play","flag","for","Coach",".",":","param","tensorboard",":","If","set","to","True",",","TensorBoard","summaries","will","be","stored","in","the","experiment","directory",".","This","can","later","be","loaded","in","TensorBoard","in","order","to","visualize","the","training","process",".",":","param","video_dump_methods",":","A","list","of","dump","methods","that","will","be","used","as","filters","for","deciding","when","to","save","videos",".","The","filters","in","the","list","will","be","checked","one","after","the","other","until","the","first","dump","method","that","returns","false","for","should_dump","(",")","in","the","environment","class",".","This","list","will","only","be","used","if","dump_mp4","or","dump_gif","are","set","to","True",".",":","param","add_rendered_image_to_env_response",":","Some","environments","have","a","different","observation","compared","to","the","one","displayed","while","rendering",".","For","some","cases","it","can","be","useful","to","pass","the","rendered","image","to","the","agent","for","visualization","purposes",".","If","this","flag","is","set","to","True",",","the","rendered","image","will","be","added","to","the","environment","EnvResponse","object",",","which","will","be","passed","to","the","agent","and","allow","using","those","images","."]
code: def __init__(
      self,
      print_networks_summary=False,
      dump_csv=True,
      dump_signals_to_csv_every_x_episodes=5,
      dump_gifs=False,
      dump_mp4=False,
      video_dump_methods=None,
      dump_in_episode_signals=False,
      dump_parameters_documentation=True,
      render=False,
      native_rendering=False,
      max_fps_for_human_control=10,
      tensorboard=False,
      add_rendered_image_to_env_response=False,
  ):
      """
      :param print_networks_summary:
          If set to True, a summary of all the networks structure will be printed at the beginning of the experiment
      :param dump_csv:
          If set to True, the logger will dump logs to a csv file once in every dump_signals_to_csv_every_x_episodes
          episodes. The logs can be later used to visualize the training process using Coach Dashboard.
      :param dump_signals_to_csv_every_x_episodes:
          Defines the number of episodes between writing new data to the csv log files. Lower values can affect
          performance, as writing to disk may take time, and it is done synchronously.
      :param dump_gifs:
          If set to True, GIF videos of the environment will be stored into the experiment directory according to
          the filters defined in video_dump_methods.
      :param dump_mp4:
          If set to True, MP4 videos of the environment will be stored into the experiment directory according to
          the filters defined in video_dump_methods.
      :param dump_in_episode_signals:
          If set to True, csv files will be dumped for each episode for inspecting different metrics within the
          episode. This means that for each step in each episode, different metrics such as the reward, the
          future return, etc. will be saved. Setting this to True may affect performance severely, and therefore
          this should be used only for debugging purposes.
      :param dump_parameters_documentation:
          If set to True, a json file containing all the agent parameters will be saved in the experiment directory.
          This may be very useful for inspecting the values defined for each parameters and making sure that all
          the parameters are defined as expected.
      :param render:
          If set to True, the environment render function will be called for each step, rendering the image of the
          environment. This may affect the performance of training, and is highly dependent on the environment.
          By default, Coach uses PyGame to render the environment image instead of the environment specific rendered.
          To change this, use the native_rendering flag.
      :param native_rendering:
          If set to True, the environment native renderer will be used for rendering the environment image.
          In some cases this can be slower than rendering using PyGame through Coach, but in other cases the
          environment opens its native renderer by default, so rendering with PyGame is an unnecessary overhead.
      :param max_fps_for_human_control:
          The maximum number of frames per second used while playing the environment as a human. This only has
          effect while using the --play flag for Coach.
      :param tensorboard:
          If set to True, TensorBoard summaries will be stored in the experiment directory. This can later be
          loaded in TensorBoard in order to visualize the training process.
      :param video_dump_methods:
          A list of dump methods that will be used as filters for deciding when to save videos.
          The filters in the list will be checked one after the other until the first dump method that returns
          false for should_dump() in the environment class. This list will only be used if dump_mp4 or dump_gif are
          set to True.
      :param add_rendered_image_to_env_response:
          Some environments have a different observation compared to the one displayed while rendering.
          For some cases it can be useful to pass the rendered image to the agent for visualization purposes.
          If this flag is set to True, the rendered image will be added to the environment EnvResponse object,
          which will be passed to the agent and allow using those images.
      """
      super().__init__()
      if video_dump_methods is None:
          video_dump_methods = [
              SelectedPhaseOnlyDumpFilter(RunPhase.TEST),
              MaxDumpFilter(),
          ]
      self.print_networks_summary = print_networks_summary
      self.dump_csv = dump_csv
      self.dump_gifs = dump_gifs
      self.dump_mp4 = dump_mp4
      self.dump_signals_to_csv_every_x_episodes = (
          dump_signals_to_csv_every_x_episodes
      )
      self.dump_in_episode_signals = dump_in_episode_signals
      self.dump_parameters_documentation = dump_parameters_documentation
      self.render = render
      self.native_rendering = native_rendering
      self.max_fps_for_human_control = max_fps_for_human_control
      self.tensorboard = tensorboard
      self.video_dump_filters = video_dump_methods
      self.add_rendered_image_to_env_response = (
          add_rendered_image_to_env_response
      )
  
imports: import inspect
  import json
  import os
  import sys
  import types
  from collections import OrderedDict
  from enum import Enum
  from typing import Dict, List, Union
  from rl_coach.core_types import TrainingSteps, EnvironmentSteps, GradientClippingMethod, RunPhase, SelectedPhaseOnlyDumpFilter, MaxDumpFilter
  from rl_coach.filters.filter import NoInputFilter
  from rl_coach.logger import screen
label_desc: Use image node_id 1 to create a new VisualizationParameters object from inherited base classes: Parameters with example: obj = VisualizationParameters(print_networks_summary, dump_csv, dump_signals_to_csv_every_x_episodes, dump_gifs, dump_mp4, video_dump_methods, dump_in_episode_signals, dump_parameters_documentation, render, native_rendering, max_fps_for_human_control, tensorboard, add_rendered_image_to_env_response)