Cross-posting here for visibility... Just tried 2....
# development
g
Cross-posting here for visibility... Just tried 2.17.0rc4 after the announcement and found a regression in dependency inference that makes one of our tests break. The only way to get the proper dependencies is to add an explicit dependency on torch. With no dependency, we get
tensorboard
but no
torch
, with
import torch
we get torch but it fails to infer ownership for
tensorboard
...
This occurs both with/without rust parser. I've nuked cache and regen'd lockfiles.
-ltrace
generates an insane amount of logs but with very low detail.
b
OK first thought is it certainly is dep inference.
pants dependencies ...
changes between the versions
So there's two bugs here. I think that module mapping ought to have
tensorboard
in it, since I'm seeing a warning about not inferring
from tensorboard.backend.event_processing import event_accumulator
Second, ... something about
tensorboard
depending on
torch
? I dont' understand these packages enough (yet)
g
That is just super weird... I think the intention is to make "import tensorboard" source it from "torch.utils.tensorboard", but those are not at all the same...
Actually, that still doesn't make sense.
I'm at a loss for the meaning of it. Tensorboard definitely doesn't put any code in a
torch
namespace at least, though it does vendor a bunch of Tensorboard types and protos.
b
I think you're right. I think the intent is for
torch.util.tensorboard
to also map to a dependency on
tensorboard
But Pants can't model that this way 😕
g
Oh, yeah. That makes sense. torch doesn't declare that dependency because it's a "plugin"
b
I guess we could allow a module to come from multiple packages... 🤔
OK mind whiopping up an issue? For 2.17.x I'll whip up a PR removing the line
g
But it isn't true. I think having a way to model "extra-extras" in some way would make more sense.
What's the issue for if you're removing the line? 😛
b
The allowing-multiple-packages-per-import
And highlighting this issue
g
Hmm. So "this import implies this dependency"?
b
these dependencies
plural 🙂
An import of
torch.utils.tensorboard
implies a dependency on
torch
AND
tensorboard
g
Gotcha. Funnily enough I have a patch in the original code that I've extract here for the same behaviour with Pillow, because torch also doesn't declare that it depends on that...
b
Include that in the ticket 🙂 We can fix both. And if there's any others you know 🙂
LMK when you have the ticket. I'll push PR
g
So I think this would have worked correctly if I didn't import tensorboard directly and imported other torch modules.
b
Well I'm glad you did 😅
g
Haha, yeah. Just an extremely specific case... 99% of users would never hit this. I'm reading
tensorboard
log files, which you almost never do in user code. Outside of that a torch user never needs to import
tensorboard