Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
f55f775b
Commit
f55f775b
authored
Jun 14, 2019
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
predict native
parent
e8f6dcd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dist_predict.py
eda/esmm/Model_pipline/dist_predict.py
+4
-4
No files found.
eda/esmm/Model_pipline/dist_predict.py
View file @
f55f775b
...
...
@@ -200,14 +200,14 @@ if __name__ == "__main__":
spark
.
sparkContext
.
setLogLevel
(
"WARN"
)
path
=
"hdfs://172.16.32.4:8020/strategy/esmm/"
df
=
spark
.
read
.
format
(
"tfrecords"
)
.
load
(
path
+
"test_n
earby
/part-r-00000"
)
df
=
spark
.
read
.
format
(
"tfrecords"
)
.
load
(
path
+
"test_n
ative
/part-r-00000"
)
df
.
show
()
te_files
=
[]
for
i
in
range
(
0
,
10
):
te_files
.
append
([
path
+
"test_n
earby
/part-r-0000"
+
str
(
i
)])
te_files
.
append
([
path
+
"test_n
ative
/part-r-0000"
+
str
(
i
)])
for
i
in
range
(
10
,
100
):
te_files
.
append
([
path
+
"test_n
earby
/part-r-000"
+
str
(
i
)])
te_files
.
append
([
path
+
"test_n
ative
/part-r-000"
+
str
(
i
)])
rdd_te_files
=
spark
.
sparkContext
.
parallelize
(
te_files
)
print
(
"-"
*
100
)
...
...
@@ -218,7 +218,7 @@ if __name__ == "__main__":
te_result_dataframe
=
spark
.
createDataFrame
(
indices
.
flatMap
(
lambda
x
:
x
.
split
(
";"
))
.
map
(
lambda
l
:
Row
(
sample_id
=
l
.
split
(
":"
)[
0
],
ctcvr
=
l
.
split
(
":"
)[
1
])))
te_result_dataframe
.
show
()
te_result_dataframe
.
toPandas
()
.
to_csv
(
"/home/gmuser/esmm/n
earby
/pred.txt"
,
header
=
True
)
te_result_dataframe
.
toPandas
()
.
to_csv
(
"/home/gmuser/esmm/n
ative
/pred.txt"
,
header
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment