openEuler 22.03 LTS SP3源码编译部署OpenStack-Caracal遇到的问题解决

openEuler 22.03 LTS SP3源码编译部署OpenStack-Caracal遇到的问题解决

  • 问题一 给路由设置外部网关后Status为DOWN(使用的是OVN)
    • 问题描述
    • 临时的解决办法
    • 永久解决办法(修改源代码)
  • 问题二 分离卷一直显示分离中
    • 问题描述
    • 解决办法(不太严谨)

问题一 给路由设置外部网关后Status为DOWN(使用的是OVN)

问题描述

问题如下图
在这里插入图片描述
经过排查后发现是
Logical_Router_Port的gateway_chassis : []为空导致openstack给路由设置外部网关后Status为DOWN
在这里插入图片描述

临时的解决办法

临时的解决办法是手动去添加gateway_chassis
首先通过如下命令查看需要添加的gateway_chassis的_uuid

ovn-nbctl list Logical_Router_Port

在这里插入图片描述再通过如下命令去查看需要添加的chassis值

ovn-sbctl show

在这里插入图片描述
在通过如下的命令去手动的添加即可

ovn-nbctl lrp-set-gateway-chassis _uuid值 Chassis值

在这里插入图片描述

永久解决办法(修改源代码)

只所以会出现这个状况是因为在代码中添加chassis无法匹配到合适的
具体如下
有关代码的路径如下
/usr/local/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb
代码文件名叫ovn_client.py
未修改源代码如下

def get_candidates_for_scheduling(self, physnet, cms=None,chassis_physnets=None,availability_zone_hints=None):"""Return chassis for scheduling gateway router.Criteria for selecting chassis as candidates1) Chassis from cms with proper bridge mappings only (that means thesegateway chassis with the requested physical network).2) Filter the available chassis accordingly to the routersavailability zone hints (if present)If the logical router port belongs to a tunnelled network, there won'tbe any candidate."""# TODO(lucasagomes): Simplify the logic here, the CMS option has# been introduced long ago and by now all gateway chassis should# include it. This will match the logic in the is_gateway_chassis()# (utils.py)cms = cms or self._sb_idl.get_gateway_chassis_from_cms_options()chassis_physnets = (chassis_physnets orself._sb_idl.get_chassis_and_physnets())candidates = set()for chassis, physnets in chassis_physnets.items():if (physnet andphysnet in physnets andchassis in cms):candidates.add(chassis)candidates = list(candidates)# Filter for availability zonesif availability_zone_hints:LOG.debug('Filtering Chassis candidates by availability zone ''hints: %s', ', '.join(availability_zone_hints))candidates = [ch for ch in candidatesfor az in availability_zone_hintsif az in utils.get_chassis_availability_zones(self._sb_idl.lookup('Chassis', ch, None))]LOG.debug('Chassis candidates for scheduling gateway router ports ''for "%s" physical network: %s', physnet, candidates)return candidates

主要的原因是获取到cms列表未空导致无法匹配到合适gateway_chassis将其添加
在这里插入图片描述解决办法有两个

  1. 不需要修改源代码,去添加一个cms标记,让代码那个获取到,但是由于我是第一次遇到这个情况,我不知道要设置什么样的cms标记。所以无法从这方面入手。
  2. 修该源代码去添加一个处理cms列表为空的逻辑
    添加一个处理cms列表为空的逻辑,代码如下:
def get_candidates_for_scheduling(self, physnet, cms=None, chassis_physnets=None, availability_zone_hints=None):"""Return chassis for scheduling gateway router.Criteria for selecting chassis as candidates:1) Chassis from cms with proper bridge mappings only (that means thesegateway chassis with the requested physical network).2) Filter the available chassis accordingly to the routersavailability zone hints (if present)If the logical router port belongs to a tunnelled network, there won'tbe any candidate."""cms = cms or self._sb_idl.get_gateway_chassis_from_cms_options()chassis_physnets = chassis_physnets or self._sb_idl.get_chassis_and_physnets()candidates = set()# If CMS is empty, we may assume all chassis are managedmanaged_chassis = cms if cms else [chassis for chassis in chassis_physnets]for chassis in managed_chassis:physnets = chassis_physnets.get(chassis, [])if physnet in physnets:candidates.add(chassis)# Convert candidates set to listcandidates = list(candidates)# Filter for availability zonesif availability_zone_hints:LOG.debug('Filtering Chassis candidates by availability zone hints: %s', ', '.join(availability_zone_hints))filtered_candidates = []for ch in candidates:azs = utils.get_chassis_availability_zones(self._sb_idl.lookup('Chassis', ch, None))if any(az in azs for az in availability_zone_hints):filtered_candidates.append(ch)candidates = filtered_candidatesLOG.debug('Chassis candidates for scheduling gateway router ports for "%s" physical network: %s', physnet, candidates)return candidates

修改完成后重启一下neutron服务即可。

问题二 分离卷一直显示分离中

问题描述

创建了一个10G的卷
在这里插入图片描述连接到实例
在这里插入图片描述在这里插入图片描述
进行分离卷
在这里插入图片描述
在这里插入图片描述

解决办法(不太严谨)

根据日志提示

2024-05-27 20:08:29.656 59902 ERROR cinder.volume.api [req-e5dea5da-9565-4e0e-b05b-9dbc58f7deef req-87c34a80-75b3-4bdd-87bf-1136cbb88b96 950f09833b4e4dffaf4acf3ac9f1d4bd 840a040edf78409f92d7c7a128652718 - - default default] Detected user call to delete in-use attachment. Call must come from the nova service and nova must be configured to send the service token. Bug #2004555
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault [req-e5dea5da-9565-4e0e-b05b-9dbc58f7deef req-87c34a80-75b3-4bdd-87bf-1136cbb88b96 950f09833b4e4dffaf4acf3ac9f1d4bd 840a040edf78409f92d7c7a128652718 - - default default] Caught error: <class 'cinder.exception.ConflictNovaUsingAttachment'> Detach volume from instance 4164eba5-b07e-4546-8d41-c4cdc030c396 using the Compute API: cinder.exception.ConflictNovaUsingAttachment: Detach volume from instance 4164eba5-b07e-4546-8d41-c4cdc030c396 using the Compute API
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault Traceback (most recent call last):
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/middleware/fault.py", line 84, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return req.get_response(self.application)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1313, in send
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     status, headers, app_iter = self.call_application(
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1278, in call_application
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     app_iter = application(self.environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 129, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     resp = self.call_func(req, *args, **kw)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 193, in call_func
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self.func(req, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/osprofiler/web.py", line 111, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return request.get_response(self.application)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1313, in send
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     status, headers, app_iter = self.call_application(
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1278, in call_application
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     app_iter = application(self.environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 129, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     resp = self.call_func(req, *args, **kw)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 193, in call_func
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self.func(req, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/keystonemiddleware/auth_token/__init__.py", line 340, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     response = req.get_response(self._app)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1313, in send
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     status, headers, app_iter = self.call_application(
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1278, in call_application
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     app_iter = application(self.environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/routes/middleware.py", line 153, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     response = self.app(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 129, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     resp = self.call_func(req, *args, **kw)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 193, in call_func
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self.func(req, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 839, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self._process_stack(request, action, action_args,
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 900, in _process_stack
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     action_result = self.dispatch(meth, request, action_args)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 995, in dispatch
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return method(req=request, **action_args)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 1160, in version_select
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return func.func(self, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/v3/attachments.py", line 282, in delete
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     attachments = self.volume_api.attachment_delete(context, attachment)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/volume/api.py", line 2668, in attachment_delete
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     self.attachment_deletion_allowed(ctxt, attachment)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/volume/api.py", line 2659, in attachment_deletion_allowed
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     raise exception.ConflictNovaUsingAttachment(instance_id=server_id)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault cinder.exception.ConflictNovaUsingAttachment: Detach volume from instance 4164eba5-b07e-4546-8d41-c4cdc030c396 using the Compute API
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault

提示我using the Compute API
于是我去设置如下的内容
controller节点

vim /etc/nova/nova.conf
[cinder]
send_service_user_token = True #添加

compute节点

vim /etc/nova/nova.conf
[cinder]
send_service_user_token = True #添加

但是没有解决,还是提示同样的问题
于是去查看源代码
在/usr/local/lib/python3.9/site-packages/cinder/volume/api.py
源代码如下

def attachment_deletion_allowed(self,ctxt: context.RequestContext,attachment_or_attachment_id,volume=None):"""Check if deleting an attachment is allowed (Bug #2004555)Allowed is based on the REST API policy, the status of the attachment,where it is used, and who is making the request.Deleting an attachment on the Cinder side while leaving the volumeconnected to the nova host results in leftover devices that can lead todata leaks/corruption.OS-Brick may have code to detect it, but in some cases it is detectedafter it has already been exposed, so it's better to prevent users frombeing able to intentionally triggering the issue."""# It's ok to delete an attachment if the request comes from a serviceif self.is_service_request(ctxt):returnif not attachment_or_attachment_id and volume:if not volume.volume_attachment:returnif len(volume.volume_attachment) == 1:attachment_or_attachment_id = volume.volume_attachment[0]if isinstance(attachment_or_attachment_id, str):try:attachment = objects.VolumeAttachment.get_by_id(ctxt, attachment_or_attachment_id)except exception.VolumeAttachmentNotFound:attachment = Noneelse:attachment = attachment_or_attachment_idif attachment:if volume:if volume.id != attachment.volume_id:raise exception.InvalidInput(reason='Mismatched volume and attachment')server_id = attachment.instance_uuid# It's ok to delete if it's not connected to a vm.if not server_id or not attachment.connection_info:returnvolume = volume or attachment.volumenova = compute.API()LOG.info('Attachment connected to vm %s, checking data on nova',server_id)# If nova is down the client raises 503 and we report thattry:nova_volume = nova.get_server_volume(ctxt, server_id,volume.id)except nova.NotFound:LOG.warning('Instance or volume not found on Nova, deleting ''attachment locally, which may leave leftover ''devices on Nova compute')returnif nova_volume.attachment_id != attachment.id:LOG.warning('Mismatch! Nova has different attachment id (%s) ''for the volume, deleting attachment locally. ''May leave leftover devices in a compute node',nova_volume.attachment_id)returnelse:server_id = ''LOG.error('Detected user call to delete in-use attachment. Call must ''come from the nova service and nova must be configured to ''send the service token. Bug #2004555')raise exception.ConflictNovaUsingAttachment(instance_id=server_id)

添加一个逻辑处理,通过实例的uuid再一次确认它是否有附加卷

instance_uuid = attachment.instance_uuid
try:attachments = objects.VolumeAttachmentList.get_all_by_instance_uuid(ctxt, instance_uuid)if attachments:LOG.info("Instance {} has other attachments: {}".format(instance_uuid, [att.id for att in attachments]))else:LOG.info("No other attachments found for instance {}".format(instance_uuid))return
except Exception as e:LOG.error("Failed to retrieve attachments for instance {}: {}".format(instance_uuid, str(e)))raise exception.VolumeBackendAPIException(reason=str(e))

修改后的完整的代码如下

def attachment_deletion_allowed(self,ctxt: context.RequestContext,attachment_or_attachment_id,volume=None):"""Check if deleting an attachment is allowed (Bug #2004555)Allowed is based on the REST API policy, the status of the attachment,where it is used, and who is making the request.Deleting an attachment on the Cinder side while leaving the volumeconnected to the nova host results in leftover devices that can lead todata leaks/corruption.OS-Brick may have code to detect it, but in some cases it is detectedafter it has already been exposed, so it's better to prevent users frombeing able to intentionally triggering the issue."""# It's ok to delete an attachment if the request comes from a serviceif self.is_service_request(ctxt):returnif not attachment_or_attachment_id and volume:if not volume.volume_attachment:returnif len(volume.volume_attachment) == 1:attachment_or_attachment_id = volume.volume_attachment[0]if isinstance(attachment_or_attachment_id, str):try:attachment = objects.VolumeAttachment.get_by_id(ctxt, attachment_or_attachment_id)except exception.VolumeAttachmentNotFound:attachment = Noneelse:attachment = attachment_or_attachment_idif attachment:if volume:if volume.id != attachment.volume_id:raise exception.InvalidInput(reason='Mismatched volume and attachment')server_id = attachment.instance_uuid# It's ok to delete if it's not connected to a vm.if not server_id or not attachment.connection_info:returnvolume = volume or attachment.volumenova = compute.API()LOG.info('Attachment connected to vm %s, checking data on nova',server_id)# If nova is down the client raises 503 and we report thattry:nova_volume = nova.get_server_volume(ctxt, server_id,volume.id)except nova.NotFound:LOG.warning('Instance or volume not found on Nova, deleting ''attachment locally, which may leave leftover ''devices on Nova compute')returnif nova_volume.attachment_id != attachment.id:LOG.warning('Mismatch! Nova has different attachment id (%s) ''for the volume, deleting attachment locally. ''May leave leftover devices in a compute node',nova_volume.attachment_id)returnelse:server_id = ''instance_uuid = attachment.instance_uuidtry:attachments = objects.VolumeAttachmentList.get_all_by_instance_uuid(ctxt, instance_uuid)if attachments:LOG.info("Instance {} has other attachments: {}".format(instance_uuid, [att.id for att in attachments]))else:LOG.info("No other attachments found for instance {}".format(instance_uuid))returnexcept Exception as e:LOG.error("Failed to retrieve attachments for instance {}: {}".format(instance_uuid, str(e)))raise exception.VolumeBackendAPIException(reason=str(e))

最终成功解决,但是这个方法不是很严谨

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/16887.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

spring boot3整合邮件服务实现邮件发送功能

⛰️个人主页: 蒾酒 &#x1f525;系列专栏&#xff1a;《spring boot实战》 目录 内容概要 开通服务 依赖引入 配置属性 创建邮件发送工具类 测试 最近发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家…

c++ 里重解释转换之于引用 reinterpret_cast< long >

今天遇到了这一很新奇的写法。模糊中记得王老师也这么讲过。c 里四大转换。把数据重解释为原来数据的引用。虽然也可以直接定义对变量的引用。测试如下&#xff1a; 咱们从反汇编再了解下 c 编译器是怎么处理这种写法的&#xff1a; 谢谢

[合集] MySQL 8.x 系列文章清单

↑ 关注“少安事务所”公众号&#xff0c;欢迎⭐收藏&#xff0c;不错过精彩内容~ 从去年7月到现在&#xff0c;自 MySQL 发版模型变更后&#xff0c;已经发布了四个版本&#xff0c;意味着 MySQL 8.x 系列进入了长期支持状态。 当然&#xff0c;目前主要推荐的版本依旧是 MySQ…

three.js官方案例webgl_loader_fbx.html学习

目录 1.1 添加库引入 1.2 添加必要的组件scene,camera,webrenderer等 1.3 模型加载 1.4 半球光 1.5 动画 1.6 换个自己的fbx模型 1.7 fbx模型和fbx动画关联 1.7 html脚本全部如下 1.8 fbx.js全部脚本如下 1.1 添加库引入 import * as THREE from three; import Stats …

AI芯片软件定义硬件架构

软件定义硬件架构 AI 应用正促使芯片制造商和 OEM 重新审视重新配置硬件的可能性。 摩尔定律放缓&#xff0c;软件应用复杂性和规模激增&#xff0c;x86架构CPU运行通用软件的传统方法已无法满足嵌入式和AI应用的高效需求。 在当前x86架构主导的环境中&#xff0c;软硬件间差…

在某云服务器上搭建公网kali linux2.0

前提&#xff1a; 可用的 CVM 实例 挂载一个系统盘之外的盘&#xff0c;安装完成后可卸载&#xff01; 创建实例&#xff0c;安装centos7系统&#xff01; 然后执行fdisk -l看磁盘的情况 在这里我将把镜像写入vdb这块数据盘 非 root 的情况下记得sudo执行以下命令 注意&…

使用 Elastic AI assistant for Observability 来分析日志

在今天的文章中&#xff0c;我们来参考之前的文章 “Elastic AI Assistant for Observability 和 Microsoft Azure OpenAI 入门” 来使用 Elastic AI assistant 分析日志。在本文章中&#xff0c;我们不使用 Azure clould。这样我们之间来进入主题&#xff0c;以免失去注意力。…

DDR、LPDDR和GDDR的区别

1、概况 以DDR开头的内存适用于服务器、云计算、网络、笔记本电脑、台式机和消费类应用&#xff0c;支持更宽的通道宽度、更高的密度和不同的形状尺寸。 以LPDDR开头的内存适合面向移动和汽车这些对规格和功耗非常敏感的领域&#xff0c;提供更窄的通道宽度和多种低功耗运行状态…

OSPF减少LSA更新量1

OSPF的LSA优化 一、汇总——优化骨干区域 (1)域间汇总ABR设备基于某个区域的1/2类LSA计算所得的最佳路由&#xff0c;共享给其他区域时&#xff0c;进行汇总传递。 [r2]ospf 1 [r2-ospf-1]area 1——明细路由所在区域&#xff0c;该ABR设备必须和明细路由在同一区域 [r2-ospf…

数据集007:垃圾分类数据集(含数据集下载链接)

数据集简介 本数据拥有 训练集&#xff1a;43685张&#xff1b; 验证集&#xff1a;5363张&#xff1b; 测试集&#xff1a;5363张&#xff1b; 总类别数&#xff1a;158类。 部分代码&#xff1a; 定义数据集 class MyDataset(Dataset):def __init__(self, modetrain, …

win10/win11 优先调用大核的电源计划性能设置

前言 大小核&#xff0c;即Intel 12代开始的P-core&#xff08;性能核&#xff0c;一般叫大核&#xff09;和E-core&#xff08;能效核&#xff0c;一般叫小核&#xff09;异核架构。说下个人理解&#xff0c;就是英特尔为了增加cpu性能&#xff0c;但是又因为架构和功耗的限制…

网络通讯聊天工具的实现

学习网络与通信&#xff0c;实现聊天界面能够通过服务器进行私聊和群聊的功能。 1.服务器&#xff1a;ServeSocket 客户端先发送消息给服务器&#xff0c;服务器接受消息后再发送给客户端。 利用服务器随时监听。等待客户端的请求&#xff0c;一旦有请求便生产一个socket套接…

模型实战(20)之 yolov8分类模型训练自己的数据集

yolov8分类模型训练自己的数据集 yolov8,一个实时快速的端到端的集检测、分割、分类、姿态识别于一体的视觉算法库/框架本文将给出yolov8 分类模型的数据集制作格式及训练流程 1. 环境搭建 关于虚拟环境的搭建真的是老生常谈了,给出一个简单的搭建流程吧#新建虚拟环境 conda …

软件系统开发标准流程文档(Word原件)

目的&#xff1a;规范系统开发流程&#xff0c;提高系统开发效率。 立项申请需求分析方案设计方案评审开发调整测试阶段系统培训试运行测试验收投入使用 所有文档过去进主页获取。 软件项目相关全套精华资料包获取方式①&#xff1a;点我获取 获取方式②&#xff1a;本文末个人…

《Ai企业知识库》-模型实践-rasa开源学习框架-搭建简易机器人-环境准备(针对windows)-02

rasa框架 Conversational AI Platform | Superior Customer Experiences Start Here 阿丹: 其实现在可以使用的ai的开发框架有很多很多&#xff0c;就需要根据各个模型的能力边界等来讨论和设计。 rasa整体流程以及每一步的作用 NLU(自然语言理解): 自然语言理解&#xff…

【项目问题解决】 java.lang.IllegalArgumentException: XML fragments parsed

java.lang.IllegalArgumentException: XML fragments parsed from previous mappers does not contain value for com.xxx.xxx.xxx.xxx.dao.SingleApasInfoDao.selectListCondition 目录 【项目问题解决】 java.lang.IllegalArgumentException: XML fragments parsed from pr…

嵌入式之译码器

系列文章目录 译码器嵌入式之译码器 嵌入式之译码器 系列文章目录一、译码器定义二、常见类型的译码器三、工作原理 一、译码器定义 译码器&#xff08;Decoder&#xff09;是一种数字电路&#xff0c;其主要功能是从输入的编码信号中解码出特定的信息或控制信号。 译码器通常…

树与二叉树的概念介绍

一.树的概念及结构&#xff1a; 1.树的概念&#xff1a; 树是一种非线性的数据结构&#xff0c;它是由n&#xff08;n>0&#xff09;个有限结点组成一个具有层次关系的集合。把它叫做树是因为它看起来像一棵倒挂的树&#xff0c;也就是说它是根朝上&#xff0c;而叶朝下的 有…

【记录】初次本地搭建的模型-MiniCPM 2B

前言 查阅众多开源大模型后&#xff0c;打算动手尝试搭建端侧模型&#xff0c;看看效果。选中MiniCPM主要是因为参数小&#xff0c;同时中文支持相对较好。 首先对按照官网提供的demo进行了尝试&#xff0c;然后在colab中完成了一个webui程序并测试&#xff0c;最后通过docker环…

【MATLAB】去除趋势项(解决频谱图大部分为零的问题)

1.概 述 在许多实际信号分析处理中信号经FFT变换后得到的频谱谱线值几乎都为0&#xff0c;介绍这是如何形成的&#xff0c;又该如何去解决。 2.案例分析 读入一组实验数据文件(文件名为qldata.mat)&#xff0c;作出该组数据的频谱图。程序清单如下: clear; clc; close all;…