grape icon indicating copy to clipboard operation
grape copied to clipboard

Question regarding the main GRAPE module import

Open RemyLau opened this issue 1 year ago • 1 comments

Hi! One minor question/suggestion: I'm wondering if it would be a better idea not to load all modules as is done right now. For example, when I want to load from the local module utils.py, it fails because utils was taken by ensmallen. One way I've tried to work around this is to pop the automatically loaded ensmallen utils module by sys.modules.pop['utils'].

https://github.com/AnacletoLAB/grape/blob/788e195de118d7539ae729a980b497f47eff99ee/grape/init.py#L13-L30

Would it be better to simply do the following instead of importing everything?

import embiggen
import ensmallen

__all__ = ["embiggne", "ensmallen"]  # or add whatever top level modules that make sense

RemyLau avatar Mar 12 '23 01:03 RemyLau