ML模型在测试服务器上运行,但不在生产服务器上运行

问题描述

我的先知模型正在测试服务器上运行。但是同一型号在生产服务器中会出错。我使用的是Python 3.7.6,而先知libray是0.6版本。其他库是相同的版本。但是我在生产中遇到了这个错误。

Fatal Python error: Segmentation fault

Current thread 0x00007f5425728740 (most recent call first):
  File "/vhosting/anaconda3/lib/python3.7/site-packages/pandas/core/indexers.py",line 211 in maybe_convert_indices
  File "/vhosting/anaconda3/lib/python3.7/site-packages/pandas/core/internals/managers.py",line 1386 in take
  File "/vhosting/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py",line 4937 in sort_values
  File "/vhosting/GBYATANOMALY/scripts/GBYATANOMALY.py",line 109 in pre_processing
  File "/vhosting/GBYATANOMALY/scripts/GBYATANOMALY.py",line 318 in <module>

数据没有问题。它与开发服务器上的生产数据一起运行。

预处理功能在下面。

def pre_processing(df_upd):
df_notnull = df_upd

df_notnull['TIME'] = pd.to_datetime(df_notnull['TIME_X'],format='%Y-%m-%d %H:%M:%S.%f')
df_dt = df_notnull[['TIME','DIMENSION','TARGET']]
df_dt['TARGET'] = df_dt['TARGET'].astype('float32')
df_dt.sort_values(by='TIME',ascending=True,inplace=True)
df_dt = df_dt[df_dt['TARGET'] == df_dt.groupby(['TIME','DIMENSION'])['TARGET'].transform(max)]

return df_dt

解决方法

这听起来像是安装问题。我会尝试卸载并安装Pandas。

如果这没有帮助,请对python进行同样的操作

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...