Closed hezihao-hfut closed 1 year ago
Thanks for your interest in our work.
The fcntl library used here is for thread/process safety, especially for conducting the search with multiple threads or processes. If you just use it in a single process, you can replace the two functions as follows, where the fcntl library has been removed.
def savePickleReader(file):
if os.path.exists(file):
data = pkl.load(open(file, "rb"))
return data
else:
return None
def savePickleWriter(data, file):
pkl.dump(data, open(file, "wb"))
return
Besides, the parameter max_trials
is the maximum number of searched hyper-parameters, which is related to the function of HPO_instance.runTrials()
. To be specific, max_trials=200
means that 200 HP will be sampled from the search space and then run on the sampled/original KG.
运行环境
运行命令
后,进程阻塞,经排查,在code/utils.py line 22处
发生Exception,内容如下
原因是我安装的fcntl库内未定义LOCK_EX常量。 请问该处代码是否是必要的,以及其作用是什么?若是必要的,则如何建议修改?
另外,在code/run.py line 46内参数&arg.max_trials=200&对结果有何影响