Skip to content

Commit

Permalink
minor refactoring to avoid pylance error
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeok9855 committed Sep 8, 2023
1 parent dc5b2a4 commit eccd142
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw1/cs285/infrastructure/rl_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time

import gym
from gym import spaces
import torch

from cs285.infrastructure import pytorch_util as ptu
Expand Down Expand Up @@ -49,7 +50,7 @@ def __init__(self, params):
MAX_VIDEO_LEN = self.params['ep_len']

# Is this env continuous, or self.discrete?
discrete = isinstance(self.env.action_space, gym.spaces.Discrete)
discrete = isinstance(self.env.action_space, spaces.Discrete) # type: ignore
self.params['agent_params']['discrete'] = discrete

# Observation and action sizes
Expand Down

0 comments on commit eccd142

Please sign in to comment.