Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Fixes AWS api being called when sim job is cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
crr0004 committed Jun 30, 2019
1 parent abb2c95 commit 3df4b46
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rl_coach/src/markov/environments/deepracer_racetrack_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,13 @@ def is_training_done(self):
return self.is_simulation_done

def cancel_simulation_job(self):
session = boto3.session.Session()
robomaker_client = session.client('robomaker', region_name=self.aws_region)
robomaker_client.cancel_simulation_job(
job=self.simulation_job_arn
)
isLocal = os.environ.get("LOCAL")
if isLocal != None:
session = boto3.session.Session()
robomaker_client = session.client('robomaker', region_name=self.aws_region)
robomaker_client.cancel_simulation_job(
job=self.simulation_job_arn
)

def send_reward_to_cloudwatch(self, reward):
isLocal = os.environ.get("LOCAL")
Expand Down

0 comments on commit 3df4b46

Please sign in to comment.