Aim UI在Jupyterlab笔记本中根本不会打开,使用%loadext,

aiazj4mn  于 2个月前  发布在  其他
关注(0)|答案(2)|浏览(21)

🐛 Bug

尝试使用 documented steps 在本地笔记本电脑上的 Jupyter 上打开 AIM UI 时,会报错。

重现步骤

安装 aim(我已经有 aim==3.17.3)
pip install -U aim
从 JupyterLab:

%load_ext aim

%aim up

传递 "--repo=" 也不起作用:

%load_ext aim

%aim up   --repo="/Users/adivekar/my_project/"

在这两种情况下,我得到以下错误。
注意:

  • 我可以通过运行成功打开仓库
  • 该仓库已经有多个运行示例
  • 自 Aim 3.8 以来,这个问题一直存在,过去几个月里我尝试了多次,但从未成功解决。
/Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/site-packages/IPython/core/interactiveshel │
│ l.py:2369 in run_line_magic                                                                      │
│                                                                                                  │
│   2366 │   │   │   if getattr(fn, "needs_local_scope", False):                                   │
│   2367 │   │   │   │   kwargs['local_ns'] = self.get_local_scope(stack_depth)                    │
│   2368 │   │   │   with self.builtin_trap:                                                       │
│ ❱ 2369 │   │   │   │   result = fn(*args, **kwargs)                                              │
│   2370 │   │   │                                                                                 │
│   2371 │   │   │   # The code below prevents the output from being displayed                     │
│   2372 │   │   │   # when using magics with decodator @output_can_be_silenced                    │
│                                                                                                  │
│ /Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/site-packages/aim/ext/notebook/notebook.py │
│ :219 in execute_magic_aim                                                                        │
│                                                                                                  │
│   216 │   │   return                                                                             │
│   217 │                                                                                          │
│   218 │   # call corresponding handler                                                           │
│ ❱ 219 │   handlers[command](options, context)                                                    │
│   220                                                                                            │
│   221                                                                                            │
│   222 def load_ipython_extension(ipython):                                                       │
│                                                                                                  │
│ /Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/site-packages/aim/ext/notebook/notebook.py │
│ :168 in up                                                                                       │
│                                                                                                  │
│   165 │   │   │   display_id=True,                                                               │
│   166 │   │   )                                                                                  │
│   167 │                                                                                          │
│ ❱ 168 │   result = manager.run_process(UP_NAME, options)                                         │
│   169 │                                                                                          │
│   170 │   if result.status == manager.ManagerActionStatuses.Failed:                              │
│   171 │   │   print(result.info["message"])                                                      │
│                                                                                                  │
│ /Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/site-packages/aim/cli/manager/manager.py:1 │
│ 16 in run_process                                                                                │
│                                                                                                  │
│   113 │   │   )                                                                                  │
│   114 │                                                                                          │
│   115 │   run = __get_command_runner(command)                                                    │
│ ❱ 116 │   return run(args)                                                                       │
│   117                                                                                            │
│                                                                                                  │
│ /Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/site-packages/aim/cli/manager/manager.py:3 │
│ 7 in run_up                                                                                      │
│                                                                                                  │
│    34 │                                                                                          │
│    35 │   success_msg = 'Open http://{}:{}{}'.format(args['--host'], args['--port'], args['--b   │
│    36 │                                                                                          │
│ ❱  37 │   child_process = subprocess.Popen(                                                      │
│    38 │   │   ['aim', UP_NAME] + args_list + ['--force-init'],                                   │
│    39 │   │   stderr=subprocess.PIPE,                                                            │
│    40 │   │   stdout=subprocess.PIPE                                                             │
│                                                                                                  │
│ /Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/subprocess.py:969 in __init__              │
│                                                                                                  │
│    966 │   │   │   │   │   self.stderr = io.TextIOWrapper(self.stderr,                           │
│    967 │   │   │   │   │   │   │   encoding=encoding, errors=errors)                             │
│    968 │   │   │                                                                                 │
│ ❱  969 │   │   │   self._execute_child(args, executable, preexec_fn, close_fds,                  │
│    970 │   │   │   │   │   │   │   │   pass_fds, cwd, env,                                       │
│    971 │   │   │   │   │   │   │   │   startupinfo, creationflags, shell,                        │
│    972 │   │   │   │   │   │   │   │   p2cread, p2cwrite,                                        │
│                                                                                                  │
│ /Users/adivekar/miniconda3/envs/eps2.2/lib/python3.10/subprocess.py:1845 in _execute_child       │
│                                                                                                  │
│   1842 │   │   │   │   │   │   err_filename = orig_executable                                    │
│   1843 │   │   │   │   │   if errno_num != 0:                                                    │
│   1844 │   │   │   │   │   │   err_msg = os.strerror(errno_num)                                  │
│ ❱ 1845 │   │   │   │   │   raise child_exception_type(errno_num, err_msg, err_filename)          │
│   1846 │   │   │   │   raise child_exception_type(err_msg)                                       │
│   1847                                                                                           │
│   1848                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: 'aim'

预期行为

它应该像文档中显示的那样打开:https://aimstack.readthedocs.io/en/latest/using/jupyter_notebook_ui.html

环境

  • Aim 版本(例如,3.0.1):aim==3.17.3
  • Python 版本:3.10.6
  • pip 版本:pip 22.2.2
  • OS(例如,Linux):MacOS Monterey 12.6.1
  • 其他相关信息:
  • 我可以通过运行成功打开仓库
  • 该仓库已经有多个运行示例
  • 自 Aim 3.8 以来,这个问题一直存在,过去几个月里我尝试了多次,但从未成功解决。
yb3bgrhw

yb3bgrhw1#

感谢报告,看起来它找不到aim仓库。我们会对此进行调查。

ee7vknir

ee7vknir2#

pls @gorarakelyan pls is this issues resolve, very import for me and my team pls

相关问题