FinGPT_Forecaster错误,

cgyqldqp  于 6个月前  发布在  其他
关注(0)|答案(1)|浏览(106)

这个错误是因为在运行程序时,找不到NVIDIA Management Library (NVML) 的动态链接库(nvml.dll)。要解决这个问题,你需要确保已经安装了正确版本的NVIDIA驱动程序和CUDA Toolkit,并且将nvml.dll文件放在正确的路径下。

  1. 首先,确保你已经安装了正确版本的NVIDIA驱动程序和CUDA Toolkit。你可以从NVIDIA官方网站下载并安装它们:https://developer.nvidia.com/cuda-downloads

  2. 然后,找到nvml.dll文件。通常情况下,它位于以下路径之一:

    • Windows: C:\Program Files\NVIDIA Corporation\NVSMI
    • macOS: /Library/Frameworks/NVIDIA GPU Computing Toolkit.framework/Versions/Current/bin
    • Linux: /usr/local/cuda/lib64
  3. 将nvml.dll文件复制到你的conda环境的相应目录下。例如,如果你的环境位于C:\Users\bulle\conda\envs\fingpt,则将nvml.dll文件复制到C:\Users\bulle\conda\envs\fingpt\Lib\site-packages\pynvml目录下。

  4. 最后,重新启动你的程序,错误应该已经解决。
    代码片段:

def get_stock_prediction(self, input_prompt):
    """
    获取股票预测结果。

    Args:
        input_prompt (str): 用户输入的问题或提示。

    Returns:
        str: 预测结果的字符串表示形式。
    """
    # ...省略了函数的具体实现...

[Summary]: Apple (AAPL) announced its latest tech products including the latest generation of Macs and MacBook Pros fitted with its new line of M3 chips, during its Scary Fast virtual event. Apple notably expanded its marketing, during the event, to try and attract new audiences including gamers by showing off the chip's ray tracing capabilities. Yahoo Finance Technology Editor Dan Howley joins the Live show to break down his coverage of the event, what he thinks about Apple's latest announcements, and what they mean for investors. For more expert insight and the latest market action, click here to watch this full episode of Yahoo Finance Live.
[Headline]: Time to Buy Apple (AAPL) or Qualcomm's (QCOM) Stock as Earnings Approach?
[Summary]: Investors will certainly be hoping these iconic tech partners can post strong quarterly results that give both of their stocks a boost.
[Headline]: Apple earnings: Everything investors are watching
[Summary]: Apple (AAPL) is set to report earnings after the bell on Thursday, November 2. There are several key items that investors will be keeping an
eye on during this announcement. Yahoo Finance spoke to experts and analysts across the industry to break down the most important things to know. Kineo
Capital Managing Partner Jim Strugger broke down a potential option trade for investors to watch based on Apple earnings. Strugger explained, "The outcome we're structuring for is for the stock to move very little after earnings ... really taking advantage of pumped up implied volatility and selling that to the people that believe that Apple could move very sharply either up or down." Yahoo Finance Technology Editor Dan Howley discussed all of the details of Apple's new products and how they may impact earnings. Howley said, "They did announce some new chips and some new laptops, as well as a new iMac ... For the current quarter that's about to be reported though, Apple sales for laptops supposed to be lower, for desktops supposed to be lower. Overall, it looks as though this is going to help improve the Mac revenue. We just have to see how much of an impact it has." Creative Strategies CEO and Principal Analyst Ben Bajarin also discussed Apple's new product line and some of the challenges that Apple is facing ahead of earnings. Bajarin noted, "They are up against some supply constraints, particularly as they're moving to a new process technology for the high end iPhones ... looking at ASPs and gross margins will be very telling about if that new buyer base is skewing toward the higher end, which is what I think has been the trend over the last couple years." Video highlights: 00:00:03 - Kineo Capital Managing Partner Jim Strugger 00:00:40 - Yahoo Finance Technology Editor Dan Howley 00:01:14 -
Creative Strategies CEO and Principal Analyst Ben Bajarin
From 2023-11-03 to 2023-11-09, AAPL's stock price increased from 176.65 to 182.41. Company news during this period are listed below:
[Headline]: China’s President Xi to meet business executives in Silicon Valley: report
[Summary]: Chinese President Xi Jinping is scheduled to sit down with hundreds of business leaders over dinner next week when the Asia-Pacific Economic
Cooperation...
[Headline]: iMac 24-inch M3 review: Performance, specs, price
[Summary]: Apple's 2023 update to the 24-inch iMac gives a nice performance bump to the all-in-one Mac, but the M3 hardware is better suited to those moving from Intel than for users with the M1 version.
[Headline]: Nobody on Wall Street wants to bet against the ‘Magnificent Seven’
[Summary]: Almost nobody on Wall Street has the temerity to bet against the "Magnificent Seven" group of tech stocks.
[Headline]: 2 Under-the-Radar Tech Stocks To Buy in 2023
[Summary]: There are thousands of tech stocks for investors to choose from, but most tend to focus on just a handful of names. The good news is that stepping just outside of that small bubble of popular tech stocks can yield excellent diversification and some attractive values. If you like Apple for its tech innovation, then consider owning its less-celebrated rival Garmin (NYSE: GRMN).
[Headline]: Apple Stock Rebounds: How To Invest In Tech Sector Strength And See Money Flows
[Summary]: It’s time to put your money back to work in some ETFs. Asbury's John Kosar says which ones are worth the investment right now.
[Basic Financials]:
No basic financial reported.
Based on all the information before 2023-11-10, let's first analyze the positive developments and potential concerns for AAPL. Come up with 2-4 most important factors respectively and keep them concise. Most factors should be inferred from company related news. Then make your prediction of the AAPL stock price movement for next week (2023-11-10 to 2023-11-17). Provide a summary analysis to support your Traceback (most recent call last):
File "C:\Users\bulle.conda\envs\fingpt\lib\site-packages\gradio\queueing.py", line 427, in call_prediction
output = await route_utils.call_process_api(

这个错误是由于在将半精度浮点数(Half)传递给F.linear函数时,该函数不支持半精度浮点数。要解决这个问题,可以将模型和输入数据转换为单精度浮点数(Float)。

peft\tuners\lora.py文件的第902行,将以下代码:

result = F.linear(x, transpose(self.weight, self.fan_in_fan_out), bias=self.bias)

替换为:

result = F.linear(x.float(), transpose(self.weight.float(), self.fan_in_fan_out), bias=self.bias)

这样,xself.weight都将转换为单精度浮点数,从而避免了错误。
这个错误是由于在计算过程中使用了半精度浮点数(Half),而 "addmm_impl_cpu*" 函数不支持半精度浮点数。为了解决这个问题,你可以尝试将模型和输入数据转换为全精度浮点数(Float)。

首先,确保你的模型和输入数据都是全精度浮点数。你可以使用 torch.float32 将模型和输入数据转换为全精度浮点数。例如:

model = model.float()
inputs = inputs.float()

然后,重新运行你的代码,看看问题是否得到解决。

uyto3xhc

uyto3xhc1#

很高兴看到你取得了进展。Gradio的app.py和requirements.txt仅在我们的HuggingFace空间中进行了测试,因此可能无法在所有平台上正常工作。顺便说一下,我们使用的gradio SDK版本可以在huggingface的README.md中找到。

针对你最近的问题,我猜你的模型没有正确地加载到GPU上。或许可以尝试手动将其加载到GPU上,而不是使用device_map="auto"。

相关问题