Comments (9)
This content is good! Thanks for writing more advanced content.
from eugeneyan-comments.
That said, is there a reason not to use relative imports? Please comment below!
Regarding relative imports vs absolute imports I find this StackOverflow answer quite useful.
I personally prefer the absolute imports syntax, but it might be just due to been used to it. Rearrange the structure of the packages is not that hard using an IDE to refactor the imports. Regarding the modules inside packages issue, I personally dislike having modules inside packages instead of having them installable with pip. What would be a case where having modules inside a package would be preferred to publish it in pypi (either public or private)?
from eugeneyan-comments.
Thanks a lot of the content, very interesting details that are not widely known. Most of the things were new to me.
The latter states that it’s better to have a simple but slightly incomplete solution than a comprehensive but hard-to-maintain design.
100% agree. As a developer is sometimes hard to remove your own code complexity, I guess that is where working in teams and doing PR reviews gets handy as it is easy to suggest removing not needed complexity in some other's code I think.
from eugeneyan-comments.
Thanks for the content! I just needed to read this today
from eugeneyan-comments.
Thanks for this blog, super informative!
In this section is there a reason why you used relative imports in the models
example
from .tree import DecisionTree, RandomForest
from .bandit import Bandit, TSBandit
and not in the app
example?
from model_implementation import SimpleModel
from data_implementation import SimpleDataLoader
from eugeneyan-comments.
@siddheshmhatre Good point—updated!
from eugeneyan-comments.
What would be a case where having modules inside a package would be preferred to publish it in pypi (either public or private)?
In this case, I'm referring to .py files in packages as modules which may not be reusable by the public and thus not worth the effort to publish to pypi.
from eugeneyan-comments.
@eugeneyan I don't know if this is of interest to you, but James Lamb (a maintainer of LightGBM) talked about why we shouldn't publish tests/artifacts/etc. in SciPy here. A bit expected, but going into the numbers helps give insight to the problems end users face.
from eugeneyan-comments.
Hey I really enjoyed this content. Keep up the good work. I came for the first paragraph about Using super() in base classes and was able to follow along and understand by playing with the sample code. Keep that up I would have liked to have done the same thing with When to Use a Mixin.
from eugeneyan-comments.
Related Issues (20)
- https://eugeneyan.com/writing/autoencoders-vs-diffusers/ HOT 1
- https://eugeneyan.com/writing/mechanisms-for-projects/ HOT 1
- https://eugeneyan.com/writing/what-i-did-not-learn-about-writing-in-school/ HOT 3
- https://eugeneyan.com/writing/bandits/ HOT 2
- https://eugeneyan.com/writing/labeling-guidelines/ HOT 1
- https://eugeneyan.com/writing/llm-experiments/ HOT 5
- https://eugeneyan.com/writing/open-llms/ HOT 1
- https://eugeneyan.com/writing/obsidian-copilot/ HOT 2
- https://eugeneyan.com/writing/more-patterns/ HOT 1
- https://eugeneyan.com/writing/llm-patterns/ HOT 17
- https://eugeneyan.com/writing/attention/ HOT 2
- https://eugeneyan.com/writing/finetuning/ HOT 3
- https://eugeneyan.com/writing/push/ HOT 1
- https://eugeneyan.com/writing/why-read-papers/ HOT 3
- https://eugeneyan.com/writing/georgia-tech-omscs-faq/ HOT 4
- https://eugeneyan.com/writing/unit-testing-ml/ HOT 8
- https://eugeneyan.com/writing/roam-to-obsidian/ HOT 2
- https://eugeneyan.com/writing/ai-coach/ HOT 5
- https://eugeneyan.com/writing/evals/ HOT 4
- https://eugeneyan.com/writing/prompting/ HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eugeneyan-comments.