Comments (6)
I would expect a more normal kind of python at least in the fastai
package. Being easy to read and understand is more import than making it some lines shorter, the mental model decides how long or difficult a script is. But it looks like a new language at first glance 😢.
With import *
I don't know something comes from which file, or from another package like torch. It's really more difficult to get a quick picture of a file even with IDE. and feels fragile.
from fastai.
Configure your editor or IDE to display this info and/or jump to the token. That's a computer's job, not a human's :)
If you're just browsing the code online thru github, install the sourcetree chrome extension to get the same functionality (in-project only).
from fastai.
@macsermkiat i'm sorry, but you can elaborate on why import *
can improve the data science workflow? it severely hinders readability.
for example, suppose you have a file which has many import statements at the top.
from module_a import *
from module_b import *
from module_c import *
from module_d import *
from module_e import *
later in the code, a function some_random_function()
is used but is not defined anywhere in the file. to trace the origins of this function, you would need to go search through each module until you find it.
compare that with readable import statements:
from module_a import some_function
from module_b import another_function
from module_c import some_random_function
...
you can quickly figure out where the function was defined.
from fastai.
Wow, thank you for pointing us to this chrome extension - this is seriously the most useful Chrome extension I've ever seen, and it works wonderfully!
https://chrome.google.com/webstore/detail/sourcegraph-for-github/dgjhfomjieaadpoljlnidmbgkdffpack
from fastai.
Jeremy had pointed that out somewhere in the VDO. Import *might be bad generally. But for datascience work, it helps in better workflow.
from fastai.
Jeremy plans to make the lib more documented, but he showed some tip to know where a class or function comes from:
?unknown_function + Enter
Alternatively you can put the cursor in the first bracket of the function and type Alt + Tab
to see the docs.
from fastai.
Related Issues (20)
- DataLoader's function create_item fails when the dataset is Pandas Dataframe
- setting emb_szs colab_learner is ignored causing function call to exit in error
- get_preds gives me non-deterministic results when using dls.train
- Unable to install fastbook when running Jupyter locally
- Found a possible security concern
- '_FakeLoader' object has no attribute 'pin_memory_device'
- Unable to deploy on Sagemaker
- Cannot scroll on image cleaner HOT 1
- get_image_files providing error message
- get_y should be changed to 'category' from 'label'
- AssertionError when trying to predict image data with FastAI HOT 2
- Training multiple FasiAI models and validating using dataframe dataloader(): HOT 1
- can find the rename_extracted funtion HOT 1
- Unable to process Multi-GPU Training
- Want to ask why I use DataBlock to do NLP task,I have many "xxboxs xxunk" in my data? HOT 1
- Issue with setting the number of workers
- Documentation on which is the actual label vs predicted in learn.show_results() is missing HOT 2
- how to use in google colab?sorry I don't find the entrance,I am a new learner
- Fastai version 2.7.14 produces "AttributeError: device" when running .predict HOT 1
- Notebook_launcher: Importing libraries initializes CUDA
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 fastai.