Skip to content

Commit 9600e4d

Browse files
Release librec-3.0.0-beta version.
1 parent a413f12 commit 9600e4d

File tree

555 files changed

+3272326
-33160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

555 files changed

+3272326
-33160
lines changed

.gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
*classes/*
2+
*.settings*
3+
*.idea*
4+
*.project
5+
*.classpath
6+
*.umlproject
7+
*.euml*
8+
*bin/log
9+
.idea/
10+
result/*
11+
*/.cache-main
12+
*target/*
13+
*/target/*
14+
*/*.iml
15+
*.iml
16+
core/target/*
17+
spark/target/*
18+
gui/target/*
19+
spark/docs/*
20+
spark/file/*
21+
log/*
22+
out/
23+
.directory
24+
25+
core/src/log/librec\.log
26+
27+
core/src/main/java/net/librec/job/test1\.java
28+
29+
data/ml-10M100K/

.travis.yml

-7
This file was deleted.

LICENSE

-674
Large diffs are not rendered by default.

README.md

-132
This file was deleted.

Recruitment.md

-57
This file was deleted.

Team.md

-19
This file was deleted.

bin/runall.py

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- coding:utf-8 -*-
2+
#!/usr/bin/env python3
3+
4+
import os
5+
import shutil
6+
import pandas as pd
7+
import subprocess
8+
import re
9+
from concurrent import futures
10+
import pdb
11+
import pprint
12+
13+
def runall(path):
14+
algorithmList=[]
15+
result = pd.DataFrame()
16+
for root, folder, files in os.walk(path):
17+
for file in files:
18+
algorithmList.append(root+"/"+file)
19+
if "log" in os.listdir('.'):
20+
shutil.rmtree("log")
21+
os.mkdir("log")
22+
pprint.pprint(algorithmList)
23+
with futures.ProcessPoolExecutor() as pool:
24+
r = pool.map(runAlgorithm, algorithmList)
25+
print("flag 1")
26+
for res in r:
27+
res = res.splitlines()
28+
name = res[0]
29+
for l in res:
30+
if "Evaluator value:" in l:
31+
eva = l.split("Evaluator value:")[-1]
32+
result.loc[name,eva.split(" ")[0]] = eva.split(" ")[-1]
33+
result.to_excel("result.xls")
34+
35+
36+
def runAlgorithm(dir):
37+
res = subprocess.run(["librec.cmd", "rec", "-exec", "-conf", dir],
38+
stderr=subprocess.PIPE, stdout=subprocess.PIPE)
39+
name = re.split("/|\.", dir)[-2]
40+
with open("./log/"+name,"w") as f:
41+
f.write(res.stderr.decode("gbk"))
42+
print("{0} is complete".format(name))
43+
return name + "\n" + res.stderr.decode("gbk")
44+
45+
46+
if __name__ == '__main__':
47+
runall('../core/src/main/resources/rec/')
48+
pass

core/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/bin/
2+
/target/

core/pom.xml

+41-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4+
45
<parent>
56
<groupId>net.librec</groupId>
67
<artifactId>librec</artifactId>
7-
<version>2.0.0</version>
8+
<version>3.0.0-beta</version>
89
</parent>
10+
911
<artifactId>librec-core</artifactId>
1012
<name>librec-core</name>
13+
14+
<packaging>jar</packaging>
15+
1116
<properties>
1217
<jar.commons-logging.version>1.2</jar.commons-logging.version>
1318
</properties>
19+
1420
<dependencies>
1521
<dependency>
1622
<groupId>commons-logging</groupId>
@@ -31,6 +37,7 @@
3137
<groupId>com.google.guava</groupId>
3238
<artifactId>guava</artifactId>
3339
<version>15.0</version>
40+
<!--<version>15.0</version>-->
3441
</dependency>
3542
<dependency>
3643
<groupId>junit</groupId>
@@ -41,6 +48,38 @@
4148
<groupId>log4j</groupId>
4249
<artifactId>log4j</artifactId>
4350
<version>1.2.17</version>
44-
</dependency>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.squareup.okio</groupId>
54+
<artifactId>okio</artifactId>
55+
<version>1.14.0</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>it.unimi.dsi</groupId>
59+
<artifactId>fastutil</artifactId>
60+
<version>8.2.1</version>
61+
</dependency>
62+
63+
<!-- Core DL4J functionality -->
64+
<dependency>
65+
<groupId>org.deeplearning4j</groupId>
66+
<artifactId>deeplearning4j-core</artifactId>
67+
<version>${dl4j.version}</version>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.deeplearning4j</groupId>
71+
<artifactId>deeplearning4j-nlp</artifactId>
72+
<version>${dl4j.version}</version>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.nd4j</groupId>
76+
<artifactId>nd4j-native-platform</artifactId>
77+
<version>${nd4j.version}</version>
78+
</dependency>
79+
<dependency>
80+
<groupId>net.librec</groupId>
81+
<artifactId>librec-core</artifactId>
82+
<version>3.0.0-beta</version>
83+
</dependency>
4584
</dependencies>
4685
</project>

core/src/main/java/net/librec/annotation/ModelData.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818
package net.librec.annotation;
1919

20+
import net.librec.io.NullWritable;
2021

2122
import java.lang.annotation.*;
2223

@@ -32,9 +33,9 @@
3233
public @interface ModelData {
3334
String[] value();
3435

35-
// Class<?> writable() default NullWritable.class;
36-
//
37-
// Class<?> mapKey() default NullWritable.class;
38-
//
39-
// Class<?> mapVal() default NullWritable.class;
36+
Class<?> writable() default NullWritable.class;
37+
38+
Class<?> mapKey() default NullWritable.class;
39+
40+
Class<?> mapVal() default NullWritable.class;
4041
}

0 commit comments

Comments
 (0)