zhouyanzhao / nest Goto Github PK
View Code? Open in Web Editor NEW:bulb: A flexible tool for building and sharing deep learning modules.
License: MIT License
:bulb: A flexible tool for building and sharing deep learning modules.
License: MIT License
Originally reported by @doudoubilly.
Execute " nest module list --filter prm" and get the following result.(Ubuntu16)
(pt-py3) root@ebe535e9a1a8:~# nest module list --filter prm
Traceback (most recent call last):
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 346, in _import_nest_modules_from_file
spec.loader.exec_module(py_module)
File "", line 665, in exec_module
File "", line 222, in _call_with_frames_removed
File "/root/PRM/install/prm.py", line 30, in
filter_type: Union[str, int, float] = 'median') -> nn.Module:
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 262, in _register
return create_module(args[0])
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 259, in create_module
return type('NestModule', (NestModule,), dict(slots=(), doc=doc))(func, nest_meta)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 69, in init
self._check_definition()
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 80, in _check_definition
if v.default is not inspect.Parameter.empty and not U.is_annotation_matched(v.default, v.annotation):
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/logger.py", line 59, in wrapper
res = func(*args, **kwargs)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/utils.py", line 236, in is_annotation_matched
sub_annotation = annotation.args
AttributeError: type object 'Union' has no attribute 'args'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/Envs/pt-py3/bin/nest", line 11, in
sys.exit(main())
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/main.py", line 4, in main
CLI()
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/cli.py", line 71, in init
getattr(self, 'cmd_' + args.command)('nest ' + args.command, sys.argv[2:])
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/cli.py", line 162, in cmd_module
module_info = ['%s (%s)' % (k, v.meta.get('version', 'version')) for k, v in module_manager]
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 702, in iter
self._update_modules()
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 692, in _update_modules
ModuleManager._import_nest_modules_from_dir(meta['module_path'], namespace, self.py_modules, self.nest_modules, meta)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 407, in _import_nest_modules_from_dir
ModuleManager._import_nest_modules_from_file(file_path, namespace, py_modules, nest_modules, meta)
File "/root/Envs/pt-py3/lib/python3.5/site-packages/nest/modules.py", line 356, in _import_nest_modules_from_file
if (type(exc_info) is ModuleNotFoundError or type(exc_info) is ImportError) and exc_info.name is not None:
NameError: name 'ModuleNotFoundError' is not defined
In the README, i think we should use modules.xxx to call the xxx function, so that this shou cause a problem when two modules have the same name.
Hi, I just downloaded the Nest and S3N and try to get it run. When importing the nest module, an error shown as title occurs. Any idea can solve this problem? Many thanks!
Input:
from nest import register
Output:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 126, in
settings = SettingManager()
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 107, in init
self.load()
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 119, in load
self.settings, self.user_settings = SettingManager.load_settings()
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 93, in load_settings
settings = yaml.load(DEFAULT_SETTINGS)
TypeError: load() missing 1 required positional argument: 'Loader'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/dist-packages/nest/init.py", line 1, in
from nest.parser import run_tasks
File "/usr/local/lib/python3.6/dist-packages/nest/parser.py", line 7, in
import nest.utils as U
File "/usr/local/lib/python3.6/dist-packages/nest/utils.py", line 12, in
from nest.logger import exception
File "/usr/local/lib/python3.6/dist-packages/nest/logger.py", line 7, in
from nest.settings import settings
File "/usr/local/lib/python3.6/dist-packages/nest/settings.py", line 128, in
raise RuntimeError('Unable to load global settings of Nest. %s' % exc_info)
RuntimeError: Unable to load global settings of Nest. load() missing 1 required positional argument: 'Loader'
Platform: Ubuntu 20.04
Python 3.6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.