This makes it inconvenient to test RustBoard, but the issue is not
specific to RustBoard at its core.
Current tb-nightly requires tensorboard-data-server<0.4.0,>=0.3.0.
If you install version 0.4.0a0 and try to launch TensorBoard, you fail
with a VersionConflict error:
Traceback (most recent call last):
File "/VIRTUAL_ENV/bin/tensorboard", line 8, in <module>
sys.exit(run_main())
File "/VIRTUAL_ENV/lib/python3.8/site-packages/tensorboard/main.py", line 42, in run_main
plugins=default.get_plugins(),
File "/VIRTUAL_ENV/lib/python3.8/site-packages/tensorboard/default.py", line 105, in get_plugins
return get_static_plugins() + get_dynamic_plugins()
File "/VIRTUAL_ENV/lib/python3.8/site-packages/tensorboard/default.py", line 140, in get_dynamic_plugins
return [
File "/VIRTUAL_ENV/lib/python3.8/site-packages/tensorboard/default.py", line 141, in <listcomp>
entry_point.load()
File "/VIRTUAL_ENV/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2446, in load
self.require(*args, **kwargs)
File "/VIRTUAL_ENV/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2469, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/VIRTUAL_ENV/lib/python3.8/site-packages/pkg_resources/__init__.py", line 775, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (tensorboard-data-server 0.4.0a0 (/VIRTUAL_ENV/lib/python3.8/site-packages), Requirement.parse('tensorboard-data-server<0.4.0,>=0.3.0'))
This doesn’t make sense, not least because 0.4.0a0 is in the desired
version range:
>>> from pkg_resources import parse_version as v
>>> v("0.3.0") <= v("0.4.0a0") < v("0.4.0")
True
…but also because checking this kind of dependency analysis at runtime
is not expected.
The root cause is that we call EntryPoint.load to load entry points
when discovering plugins. You would be forgiven for assuming that load
just imports the module and chains getattrs to resolve the right
symbol, but that’s not all that it does. It also updates some global
mutable state and does something related to installing extras. I’m not
certain what exactly this does—it’s poorly documented, in both the
user-facing docs and the code.
The good news is that we can instead call EntryPoint.resolve to
recover the sane behavior.
This makes it inconvenient to test RustBoard, but the issue is not
specific to RustBoard at its core.
Current
tb-nightlyrequirestensorboard-data-server<0.4.0,>=0.3.0.If you install version
0.4.0a0and try to launch TensorBoard, you failwith a
VersionConflicterror:This doesn’t make sense, not least because
0.4.0a0is in the desiredversion range:
…but also because checking this kind of dependency analysis at runtime
is not expected.
The root cause is that we call
EntryPoint.loadto load entry pointswhen discovering plugins. You would be forgiven for assuming that
loadjust imports the module and chains
getattrs to resolve the rightsymbol, but that’s not all that it does. It also updates some global
mutable state and does something related to installing extras. I’m not
certain what exactly this does—it’s poorly documented, in both the
user-facing docs and the code.
The good news is that we can instead call
EntryPoint.resolvetorecover the sane behavior.