mirror of
https://github.com/gryf/coach.git
synced 2025-12-18 11:40:18 +01:00
Coach as a library (#348)
* CoachInterface + tutorial * Some improvements and typo fixes * merge tutorial 0 and 4 * typo fix + additional tutorial changes * tutorial changes * added reading signals and experiment path argument
This commit is contained in:
@@ -23,12 +23,10 @@ from typing import List, Tuple
|
||||
import contextlib
|
||||
|
||||
from rl_coach.base_parameters import iterable_to_items, TaskParameters, DistributedTaskParameters, Frameworks, \
|
||||
VisualizationParameters, \
|
||||
Parameters, PresetValidationParameters, RunType
|
||||
VisualizationParameters, Parameters, PresetValidationParameters, RunType
|
||||
from rl_coach.checkpoint import CheckpointStateUpdater, get_checkpoint_state, SingleCheckpoint, CheckpointState
|
||||
from rl_coach.core_types import TotalStepsCounter, RunPhase, PlayingStepsType, TrainingSteps, EnvironmentEpisodes, \
|
||||
EnvironmentSteps, \
|
||||
StepMethod, Transition
|
||||
EnvironmentSteps, StepMethod, Transition
|
||||
from rl_coach.environments.environment import Environment
|
||||
from rl_coach.level_manager import LevelManager
|
||||
from rl_coach.logger import screen, Logger
|
||||
@@ -123,6 +121,10 @@ class GraphManager(object):
|
||||
self.time_metric = TimeTypes.EpisodeNumber
|
||||
|
||||
def create_graph(self, task_parameters: TaskParameters=TaskParameters()):
|
||||
# check if create graph has been already called
|
||||
if self.graph_creation_time is not None:
|
||||
return self
|
||||
|
||||
self.graph_creation_time = time.time()
|
||||
self.task_parameters = task_parameters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user