Wrong Python version causing Attribute Error is_integer() in utils.py
Open
type:bug
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 345
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 240
Description
https://github.com/google/tunix/blob/3b558520bb65e4cd649f8199362f9dc144e541da/pyproject.toml#L8
This version should be set to '>=3.12' (or higher) at least, because tunix/tunix/rl/utils.py calls value.is_integer() which is safely supported for the base `int` type since Python v3.12. For example, see below:
https://github.com/google/tunix/blob/3b558520bb65e4cd649f8199362f9dc144e541da/tunix/rl/utils.py#L37
I tested it with v3.11 and confirmed it causes Attribute Error. You should upgrade the default Python version to 3.12 (or higher) in pyproject.toml or substitute all value.is_integer() with the more primitive and safe isinstance().
Contributor guide
Assessment
This issue has not been assessed yet.