-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a413f12
commit 9600e4d
Showing
555 changed files
with
3,272,326 additions
and
33,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
*classes/* | ||
*.settings* | ||
*.idea* | ||
*.project | ||
*.classpath | ||
*.umlproject | ||
*.euml* | ||
*bin/log | ||
.idea/ | ||
result/* | ||
*/.cache-main | ||
*target/* | ||
*/target/* | ||
*/*.iml | ||
*.iml | ||
core/target/* | ||
spark/target/* | ||
gui/target/* | ||
spark/docs/* | ||
spark/file/* | ||
log/* | ||
out/ | ||
.directory | ||
|
||
core/src/log/librec\.log | ||
|
||
core/src/main/java/net/librec/job/test1\.java | ||
|
||
data/ml-10M100K/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# -*- coding:utf-8 -*- | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import shutil | ||
import pandas as pd | ||
import subprocess | ||
import re | ||
from concurrent import futures | ||
import pdb | ||
import pprint | ||
|
||
def runall(path): | ||
algorithmList=[] | ||
result = pd.DataFrame() | ||
for root, folder, files in os.walk(path): | ||
for file in files: | ||
algorithmList.append(root+"/"+file) | ||
if "log" in os.listdir('.'): | ||
shutil.rmtree("log") | ||
os.mkdir("log") | ||
pprint.pprint(algorithmList) | ||
with futures.ProcessPoolExecutor() as pool: | ||
r = pool.map(runAlgorithm, algorithmList) | ||
print("flag 1") | ||
for res in r: | ||
res = res.splitlines() | ||
name = res[0] | ||
for l in res: | ||
if "Evaluator value:" in l: | ||
eva = l.split("Evaluator value:")[-1] | ||
result.loc[name,eva.split(" ")[0]] = eva.split(" ")[-1] | ||
result.to_excel("result.xls") | ||
|
||
|
||
def runAlgorithm(dir): | ||
res = subprocess.run(["librec.cmd", "rec", "-exec", "-conf", dir], | ||
stderr=subprocess.PIPE, stdout=subprocess.PIPE) | ||
name = re.split("/|\.", dir)[-2] | ||
with open("./log/"+name,"w") as f: | ||
f.write(res.stderr.decode("gbk")) | ||
print("{0} is complete".format(name)) | ||
return name + "\n" + res.stderr.decode("gbk") | ||
|
||
|
||
if __name__ == '__main__': | ||
runall('../core/src/main/resources/rec/') | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/bin/ | ||
/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
9600e4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could anybody summarize the change of this beta release ?