tensorflow / tensorflow/graphics

Remove OpenEXR from requirements and warning

Open
#421 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.8k
Forks
374
PR merge metrics
No merged PRs in 30d

Description

The docs and code say that OpenEXR is an optional dependency (https://github.com/tensorflow/graphics/blob/6b905c68e802b73c04857c21cca2e026cc37c900/tensorflow_graphics/util/data_formats/__init__.py#L25 or here but is seemingly is not. This means I cannot install the TFG package, since the OpenEXR does not get installed properly. Furthermore, the warning is rather annoying, as we would like to use some simple functionality from the package (bsplines) in a completely different context.

I would propose to
a) remove OpenEXR from the dependency list and make it optional (as documented in docs and code)
b) remove the warning and instead make OpenEXR a local import inside the function. If the function is called and it cannot be imported, it fails saying that it has to install OpenEXR first.

What do you think? Glad also to make this changes and contribute

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read tensorflow_graphics/util/data_formats/init.py and the optional-packages section of the TensorFlow Graphics installation docs. Try the package installation path and inspect where the OpenEXR warning is emitted. Done means installation no longer treats OpenEXR as required, and functionality that needs it reports the missing dependency only when used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.