-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offer pytensor.tensor
user-facing functionality at the pytensor
root level
#635
Comments
pytensor.tensor
functionality at the pytensor root levelpytensor.tensor
user-facing functionality at the pytensor
root level
I'm weakly 👎. I don't see any technical obstacles. But is there any benefit beyond saving users a few keystrokes? This would introduce yet another layer of indirection. It's already pretty tricky to find the definitions of stuff. Like to find the definition of With various linters and type checkers I've gotten into the habit of always importing things directly from their definition, and so my personal feeling is that these types of shortcuts cost me way more time than they save. TLDR: keystrokes are cheap, directness and clarity are priceless Counterproposal: eliminate |
Writing Importing from source is fine for dev work but not user work, such as Jupyter notebook workflows. Why should the main functionality of a package require a double level import? I can't believe this would be suggested if we were writing this library from scratch. |
The counter proposal doesn't make sense to me. Are you suggesting one to do |
Ya, that's actually a really good argument. I've been doing too much library dev work. Now I'm weakly 👍. It still would be nice to get rid of the |
I'm strongly 👍. |
I like both the proposal and the counter-proposal. While I don't love it, I'll also throw into the mix the |
@jessegrabowski can you expand on what the |
It's just a script that imports from around their modules in a user-facing way. The consequence is that you have to do |
FWIW I always found |
Just to brainstorm likely-bad ideas, I wonder if it would make sense to flip the |
Description
Make import
pytensor as pt
basically work like today'simport pytensor.tensor as pt
.For users that's all they need, besides functionality like
scan
,ifelse
,function
,shared
that should also be available at the root level (see #332)Internally things can still be implemented inside the
tensor
submodule.Does anyone have strong objections or see why this may not be possible?
The text was updated successfully, but these errors were encountered: