Open philipstarkey opened 5 years ago
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
What do you think about having ModuleWatcher by default whitelist all modules that are in site-packages/standard library? That way it will only ever reload 'user' modules, and any of these complex modules that do magical things and cause problems will never be reloaded. And if they're in site-packages then chances are the user is not modifying them, and if they are they know what they are doing. Possible issue: the user upgrades a package using pip or conda, it would then not be reloaded.
Alternately, ModuleWatcher could reload all modules if it detects a change on disk in a module in site-packages, and it could reload only 'user' modules if it detects a change in a module outside site-packages. This would be 90% of the way there without user action required.
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
Have modulewatcher whitelist all modules within standard package directories. This way, only 'user' code will be unloaded or monitored for changes.
This addresses issue #23, though it is different to the solution than proposed there.
→ \<\<cset c3141fb6587a1673aca0716a471527c3bf65b56c>>
Original report (archived issue) by Russell Anderson (Bitbucket: rpanderson, GitHub: rpanderson).
Use case: reloading
tensorflow
fails.Minimum failing example: lyse analysis routine containing:
… where your_face.py contains:
Modify your_face.py to trigger module reloading, and get:
Similar issue reported here, where Spyder users report disabling the user-module reloader, or preventing
google.*
modules from being reloaded. For me, the above error was resolved by modifying modulewatcher.py to preventtensorflow.*
modules from being reloaded.