Commit Graph

23 Commits

Author SHA1 Message Date
Yuji Kanagawa
0c78ea5964 Avoid using deperecated distutils package (#2770) 2022-04-25 07:58:38 -04:00
Mark Towers
4f230499af Fixed warnings produced by test_record_video.py and test_video_recorder.py (#2703)
* Fixed warnings produced by test_record_video.py and test_video_recorder.py by using the self._frames_per_sec value as default value if video.frames_per_second is missing

* The default backward compatible values if video.frames_per_second and video.output_frames_per_seconds are the updated frames_per_sec and output_frames_per_sec values
2022-03-31 16:25:37 -04:00
Andrea PIERRÉ
e913bc81b8 Improve pre-commit workflow (#2602)
* feat: add `isort` to `pre-commit`

* ci: skip `__init__.py` file for `isort`

* ci: make `isort` mandatory in lint pipeline

* docs: add a section on Git hooks

* ci: check isort diff

* fix: isort from master branch

* docs: add pre-commit badge

* ci: update black + bandit versions

* feat: add PR template

* refactor: PR template

* ci: remove bandit

* docs: add Black badge

* ci: try to remove all `|| true` statements

* ci: remove lint_python job

- Remove `lint_python` CI job
- Move `pyupgrade` job to `pre-commit` workflow

* fix: avoid messing with typing

* docs: add a note on running `pre-cpmmit` manually

* ci: apply `pre-commit` to the whole codebase
2022-03-31 15:50:38 -04:00
Costa Huang
29cf1e5393 Make VideoRecorder backward-compatible to gym<0.23 (#2678)
* Make `VideoRecorder` backward-compatible to `gym<0.23`

* Format

* format
2022-03-10 13:40:49 -05:00
trigaten
35b78ac0ab Rename render modes/fps (#2654)
* Update pendulum.py

* version warnings

* black

* try except

* update notices version

* Exception

* nosec

* black

* no loop, stderr

* black

* convert ## to ###

* correct subheader

* black

* despace

* spacing

* frozen lake fixes

* rename render modes/fps

* fix API test

* fix API test

* fix more API tests

* black

* add render fps
2022-02-28 15:54:03 -05:00
Elijah K
9ae4331dfd Py36+ syntax in gym/wrappers: derived by running pyupgrade --py36-plus gym/wrappers/**.py and flynt gym --ll 120 (#2464)
Co-authored-by: Ilya Kamen <ilya.kamenshchikov@bosch.com>
2021-11-13 19:53:06 -05:00
zlig
45902be4d0 Fixes video recording formatting issues (#2435)
* Reverts some changes from #1893, and propose to install imageio-ffmpeg instead

* Reformat file as required by the Python Black linter
2021-10-04 00:10:58 -04:00
Xuehai Pan
000a2a0d51 Update test case for VideoRecorder (#2404)
* Update test case for VideoRecorder

* Remove closer for VideoRecorder
2021-09-26 17:53:36 -04:00
Xuehai Pan
347a30aff9 Autoclose manually maintained video recorders (#2318)
* Autoclose manually maintained video recorders

* Update test case for VideoRecorder

* Update test case for VideoRecorder

* Update test case for VideoRecorder
2021-08-26 11:48:18 -04:00
J K Terry
bfd4f6d179 Revert "Autoclose manually maintained video recorders (#2316)" (#2317)
This reverts commit f4bf0d9ed8.
2021-08-16 02:44:10 -04:00
Xuehai Pan
f4bf0d9ed8 Autoclose manually maintained video recorders (#2316) 2021-08-16 02:43:14 -04:00
J K Terry
78d2b512d8 redo black (#2272) 2021-07-29 15:39:42 -04:00
Justin Terry
e9d2c41f2b redo black 2021-07-29 12:42:48 -04:00
Christian Clauss
bb81e141ea Blacken the codebase (#2265) 2021-07-28 20:26:34 -04:00
zlig
fe1e0837e6 Fixes video recorder ffmpeg on Centos7 and RHEL7 (#1893)
* Conditionally select different arguments for ffmpeg, and add meaningful error for third party application in charge of encoding

* Consistency with other logger() calls

Co-authored-by: J K Terry <justinkterry@gmail.com>
2021-07-27 15:18:11 -04:00
Hill Ma
8a721ace46 Fix video recording. (#2139) 2021-01-11 09:58:46 -08:00
Justin Terry
eec7d3354a Remove Python 3.5 support, travis and setup.py maintenance (#2084)
* remove python 3.5, update travis

* add travis

* add cmake during tests

* add swig

* disable python 3.8 removal?

* remove depricated failover

* add opencv and pillow minimum versions

* try removing pillow minimum version

* try older version of ubuntu

* reup ubuntu

* make pillow version suitable for pyglet version range

* remove extraneous run

* rerun stalled CI
2020-11-06 17:04:23 -08:00
pzhokhov
67212547ac remove six and __future__ imports (#1840)
* remove six

* remove __future__ imports

* remove six from setup.py, python 2.7 from README.rst
2020-04-10 17:10:34 -05:00
Edouard Leurent
242eb2ac2c Video recorder: distinguish input and output fps (#1817)
* Video recorder: distinguish input and output fps

Common video players such as VLC, or Quicktime struggle to play videos
with low framerate, which is problematic for environments where the
policy
frequency is low (e.g. 1 Hz).
See: https://superuser.com/a/601916

This commit sets:
- The input image sequence framerate to the metadata
'video.frames_per_second'
- The output video framerate to at least 30 fps

* Use a configurable output video framerate

This output video framerate is different from the image sequence
framerate:
- when the environment fps is low, the output video fps can be increased
so that players like VLC or Quicktime handle them more gracefully (they
struggle at low fps)
- when the environment fps is very high, the output video can still be
recorded at a lower fps to better compression.

It is configured through the 'video.output_frames_per_second' metadata
and defaults to 'video.frames_per_second' (which itself defaults to 30)
2020-02-29 01:05:18 +01:00
Lilian Besson
53e4b2c65d Typo in a error message in gym/wrappers/monitoring/video_recorder.py (#952) 2019-02-25 17:21:32 -07:00
Peter Zhokhov
e65b61fd08 make recent text env changes python 2/3 compatible 2019-02-08 17:50:34 -08:00
William Woof
8bcd125156 Fix to enable use with odd image dimensions (#1101) 2019-02-08 17:35:01 -08:00
John Schulman
4c460ba6c8 Cleanup, removal of unmaintained code (#836)
* add dtype to Box

* remove board_game, debugging, safety, parameter_tuning environments

* massive set of breaking changes
- remove python logging module
- _step, _reset, _seed, _close => non underscored method
- remove benchmark and scoring folder

* Improve render("human"), now resizable, closable window.

* get rid of default step and reset in wrappers, so it doesn’t silently fail for people with underscore methods

* CubeCrash unit test environment

* followup fixes

* MemorizeDigits unit test envrionment

* refactored spaces a bit
fixed indentation
disabled test_env_semantics

* fix unit tests

* fixes

* CubeCrash, MemorizeDigits tested

* gym backwards compatibility patch

* gym backwards compatibility, followup fixes

* changelist, add spaces to main namespaces

* undo_logger_setup for backwards compat

* remove configuration.py
2018-01-25 18:20:14 -08:00