- do not restrict TF version, but depend on tf-keras and
set `TF_USE_LEGACY_KERAS=1` to avoid Keras 3 behaviour
- relax Numpy version requirement up to v2
- relax Torch version requirement
- drop TF1 session management code
- drop TF1 config in favour of TF2 config code for memory growth
- training.*: also simplify and limit line length
- training.train: always train with TensorBoard callback
OK so now numpy is the culprit (shipped unbound via ocrd) which had several deprecations expire with release of v1.24.0 that require changes to our codebase, e.g.
* The deprecation for the aliases np.object, np.bool, np.float, np.complex, np.str, and np.int is expired
* Ragged array creation will now always raise a ValueError unless dtype=object is passed.
See also here: https://numpy.org/devdocs/release/1.24.0-notes.html#expired-deprecations
Cap tensorflow version to <2.12.0 until we have time to adapt to the API changes such as e.g.
* Support for Python 3.11 has been added.
* Support for Python 3.7 has been removed.
See also https://github.com/tensorflow/tensorflow/releases/tag/v2.12.0.
eynollah requires at ocrd >= 2.22.0 for the resource resolving code,
otherwise it fails with an AttributeError. Fix this by bumping up the
requirement.
I bumped it to 2.23.3 so core *also* includes the latest model resource
for eynollah.