tensortrade.env.generic.components.renderer module

class tensortrade.env.generic.components.renderer.AggregateRenderer(renderers: List[tensortrade.env.generic.components.renderer.Renderer])[source]

Bases: tensortrade.env.generic.components.renderer.Renderer

A renderer that aggregates compatible renderers so they can all be used to render a view of the environment.

Parameters:renderers (List[Renderer]) – A list of renderers to aggregate.
renderers

A list of renderers to aggregate.

Type:List[Renderer]
close() → None[source]

Closes the renderer.

render(env: TradingEnv, **kwargs) → None[source]

Renders a view of the environment at the current step of an episode.

Parameters:
  • env ('TradingEnv') – The trading environment.
  • kwargs (keyword arguments) – Additional keyword arguments for rendering the environment.
reset() → None[source]

Resets the renderer.

save() → None[source]

Saves the rendered view of the environment.

class tensortrade.env.generic.components.renderer.Renderer[source]

Bases: tensortrade.core.component.Component

A component for rendering a view of the environment at each step of an episode.

close() → None[source]

Closes the renderer.

registered_name = 'renderer'
render(env: TradingEnv, **kwargs)[source]

Renders a view of the environment at the current step of an episode.

Parameters:
  • env ('TradingEnv') – The trading environment.
  • kwargs (keyword arguments) – Additional keyword arguments for rendering the environment.
reset() → None[source]

Resets the renderer.

save() → None[source]

Saves the rendered view of the environment.