enable deepmimic training on mac
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import json
|
||||
import numpy as np
|
||||
from learning.ppo_agent import PPOAgent
|
||||
import pybullet_data
|
||||
|
||||
AGENT_TYPE_KEY = "AgentType"
|
||||
|
||||
def build_agent(world, id, file):
|
||||
agent = None
|
||||
with open(file) as data_file:
|
||||
with open(pybullet_data.getDataPath()+"/"+file) as data_file:
|
||||
json_data = json.load(data_file)
|
||||
|
||||
assert AGENT_TYPE_KEY in json_data
|
||||
@@ -17,4 +18,4 @@ def build_agent(world, id, file):
|
||||
else:
|
||||
assert False, 'Unsupported agent type: ' + agent_type
|
||||
|
||||
return agent
|
||||
return agent
|
||||
|
||||
@@ -2,7 +2,7 @@ import numpy as np
|
||||
import copy
|
||||
from pybullet_utils.logger import Logger
|
||||
import inspect as inspect
|
||||
from env.env import Env
|
||||
from pybullet_envs.deep_mimic.env.env import Env
|
||||
import pybullet_utils.math_util as MathUtil
|
||||
|
||||
class ReplayBuffer(object):
|
||||
@@ -348,4 +348,4 @@ class SampleBuffer(object):
|
||||
count0 = np.sum(self.idx_to_slot == MathUtil.INVALID_IDX)
|
||||
count1 = np.sum(self.slot_to_idx == MathUtil.INVALID_IDX)
|
||||
valid &= count0 == count1
|
||||
return valid
|
||||
return valid
|
||||
|
||||
Reference in New Issue
Block a user