Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
strategy_embedding
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
strategy_embedding
Commits
d8cf717f
Commit
d8cf717f
authored
Dec 22, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add script
parent
4cdb7529
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
answer_item2vec.sh
answer_item2vec.sh
+2
-0
answer.py
word_vector/answer.py
+2
-3
No files found.
answer_item2vec.sh
0 → 100644
View file @
d8cf717f
cd
/srv/apps/strategy_embedding/
nohup
spark-submit
--master
yarn
--deploy-mode
client
--queue
root.strategy
--driver-memory
16g
--executor-memory
1g
--executor-cores
1
--num-executors
70
--conf
spark.default.parallelism
=
100
--conf
spark.storage.memoryFraction
=
0.5
--conf
spark.shuffle.memoryFraction
=
0.3
--conf
spark.locality.wait
=
0
--jars
/srv/apps/tispark-core-2.1-SNAPSHOT-jar-with-dependencies.jar,/srv/apps/spark-connector_2.11-1.9.0-rc2.jar,/srv/apps/mysql-connector-java-5.1.38.jar /srv/apps/strategy_embedding/word_vector/answer.py
>
~/answer_item2vec.log &
word_vector/answer.py
View file @
d8cf717f
...
...
@@ -9,8 +9,7 @@ sys.path.append(os.path.realpath("."))
import
random
from
gensim.models
import
Word2Vec
,
word2vec
from
utils.date
import
(
get_ndays_before_no_minus
,
get_ndays_before_with_format
)
from
utils.date
import
(
get_ndays_before_no_minus
,
get_ndays_before_with_format
)
from
utils.es
import
get_online_ids
from
utils.files
import
DATA_PATH
,
MODEL_PATH
from
utils.spark
import
get_spark
...
...
@@ -35,7 +34,7 @@ def get_answer_click_data(spark, start, end):
where action = 'page_view'
AND partition_date BETWEEN '{}' AND '{}'
AND page_name='answer_detail'
AND page_stay>=
1
AND page_stay>=
2
AND cl_id is not null
AND cl_id != ''
AND business_id is not null
...
...
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