使用train.py脚本训练排名

时间:2017-02-20 14:36:31

标签: python python-2.7 solr ibm-cloud retrieve-and-rank

我目前正在尝试通过运行Retrieve& amp;提供的train.py脚本来创建排名。排名文档。

我在尝试创建排名时发出以下命令:

train.py -u usernameHere:PasswordHere -i  Mainframe_Batch_Automation_CA7.csv -c clusterIdHere -x Mainframe_Batch_Automation_CA7 -n Mainframe_Batch_Automation_CA7

我收到以下错误:

Input file is Mainframe_Batch_Automation_CA7.csv
Solr cluster is sc0c2398d4_d087_4516_99dd_10c25cc06b0a
Solr collection is Mainframe_Batch_Automation_CA7
Ranker name is Mainframe_Batch_Automation_CA7
Rows per query 10
Generating training data...

Traceback (most recent call last):
  File "C:\Users\IBM_ADMIN\Documents\Retrieve & Rank\train.py", line 83, in <module>
    process = subprocess.Popen(shlex.split(curl_cmd), stdout=subprocess.PIPE)
  File "C:\Python27\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the specified file

起初我以为是因为Python不在我的PATH环境变量中但是在将它添加到PATH变量后它仍然给我同样的错误......

1 个答案:

答案 0 :(得分:1)

脚本运行curl命令,连接到solr和ranker url。此错误是由防火墙问题引起的。尝试在防火墙外执行脚本。