浏览代码

Develop black format fix (#1998)

* fixed the format

* changed the circleci config
/develop-generalizationTraining-TrainerController
GitHub 5 年前
当前提交
4e3b1898
共有 2 个文件被更改,包括 6 次插入3 次删除
  1. 5
      .circleci/config.yml
  2. 4
      gym-unity/gym_unity/envs/unity_env.py

5
.circleci/config.yml


mkdir test-reports
pytest --cov=mlagents --cov-report xml --junitxml=test-reports/junit.xml -p no:warnings
python-codacy-coverage -r coverage.xml
- run:
name: Check Code Style for ml-agents and gym_unity using black
command: |
. venv/bin/activate
black --check ml-agents
black --check ml-agents-envs
black --check gym-unity

4
gym-unity/gym_unity/envs/unity_env.py


visual_obs = info.visual_observations
if isinstance(visual_obs, list):
visual_obs = np.array(visual_obs)
self.visual_obs = self._preprocess_single(
visual_obs[0][0, :, :, :]
)
self.visual_obs = self._preprocess_single(visual_obs[0][0, :, :, :])
default_observation = self.visual_obs
else:
default_observation = info.vector_observations[0, :]

正在加载...
取消
保存