Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

初始化模型报错

Open shusuxiang opened this issue 2 months ago • 1 comments

正在将 samples/llm/img/分布式训练技术原理-幕布图片-57107-679259.jpg 添加到向量库,共包含1条文档 Batches: 0%| | 0/1 [00:00<?, ?it/s]2024-05-11 10:53:49,844 - utils.py[line:377] - ERROR: RuntimeError: 从文件 samples/test_files/test.txt 加载文档时出错: object has no attribute nms: File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 41 _log_api_usage_once(nms) _assert_has_ops() return torch.ops.torchvision.nms(boxes, scores, iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE 'nms' is being compiled since it was called from '_batched_nms_vanilla' File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 109 for class_id in torch.unique(idxs): curr_indices = torch.where(idxs == class_id)[0] curr_keep_indices = nms(boxes[curr_indices], scores[curr_indices], iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE keep_mask[curr_indices[curr_keep_indices]] = True keep_indices = torch.where(keep_mask)[0] '_batched_nms_vanilla' is being compiled since it was called from 'batched_nms' File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 73 # https://github.com/pytorch/vision/issues/1311#issuecomment-781329339 if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing(): return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE else: return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold) 'batched_nms' is being compiled since it was called from 'generate_detections' File "D:\conda\envs\chatchat\Lib\site-packages\effdet\anchors.py", line 140 scores[top_detection_idx] = soft_scores else: top_detection_idx = batched_nms(boxes, scores, classes, iou_threshold=0.5) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE

# keep only top max_det_per_image scoring predictions

'generate_detections' is being compiled since it was called from '_batch_detection' File "D:\conda\envs\chatchat\Lib\site-packages\effdet\bench.py", line 82 img_scale_i = None if img_scale is None else img_scale[i] img_size_i = None if img_size is None else img_size[i] detections = generate_detections( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class_out[i], ~~~~~~~~~~~~~ box_out[i], ~~~~~~~~~~~ anchor_boxes, ~~~~~~~~~~~~~ indices[i], ~~~~~~~~~~~ classes[i], ~~~~~~~~~~~ img_scale_i, ~~~~~~~~~~~~ img_size_i, ~~~~~~~~~~~ max_det_per_image=max_det_per_image, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ soft_nms=soft_nms, ~~~~~~~~~~~~~~~~~ <--- HERE ) batch_detections.append(detections)

shusuxiang avatar May 11 '24 02:05 shusuxiang