diff --git a/eda/esmm/Model_pipline/submit.sh b/eda/esmm/Model_pipline/submit.sh index 9d61f741fe3238efcf28e5a3a606d7365cc26f7a..606b84531076be7b1d3621d66878f75055a971c6 100644 --- a/eda/esmm/Model_pipline/submit.sh +++ b/eda/esmm/Model_pipline/submit.sh @@ -3,11 +3,11 @@ PYTHON_PATH=/home/gaoyazhe/miniconda3/bin/python MODEL_PATH=/srv/apps/ffm-baseline/eda/esmm DATA_PATH=/home/gaoyazhe/data -echo "start timestamp" +echo "start time" current=$(date "+%Y-%m-%d %H:%M:%S") timeStamp=$(date -d "$current" +%s) currentTimeStamp=$((timeStamp*1000+`date "+%N"`/1000000)) -echo $currentTimeStamp +echo $current echo "rm leave tfrecord" rm ${DATA_PATH}/tr/* @@ -43,20 +43,20 @@ rm ${DATA_PATH}/va/va_* rm ${DATA_PATH}/native/native_* rm ${DATA_PATH}/nearby/nearby_* -echo "data transform timestamp" +echo "data transform time" current=$(date "+%Y-%m-%d %H:%M:%S") timeStamp=$(date -d "$current" +%s) currentTimeStamp=$((timeStamp*1000+`date "+%N"`/1000000)) -echo $currentTimeStamp +echo $current echo "train..." ${PYTHON_PATH} ${MODEL_PATH}/Model_pipline/DeepCvrMTL.py --ctr_task_wgt=0.3 --learning_rate=0.0001 --deep_layers=256,128 --dropout=0.8,0.5 --optimizer=Adam --num_epochs=1 --embedding_size=16 --batch_size=1024 --field_size=11 --feature_size=354332 --l2_reg=0.005 --log_steps=100 --num_threads=36 --model_dir=${DATA_PATH}/model_ckpt/DeepCvrMTL/ --data_dir="${DATA_PATH}" --task_type="train" -echo "train timestamp" +echo "train time" current=$(date "+%Y-%m-%d %H:%M:%S") timeStamp=$(date -d "$current" +%s) currentTimeStamp=$((timeStamp*1000+`date "+%N"`/1000000)) -echo $currentTimeStamp +echo $current echo "infer native..." ${PYTHON_PATH} ${MODEL_PATH}/Model_pipline/DeepCvrMTL.py --ctr_task_wgt=0.3 --learning_rate=0.0001 --deep_layers=256,128 --dropout=0.8,0.5 --optimizer=Adam --num_epochs=1 --embedding_size=16 --batch_size=1024 --field_size=11 --feature_size=354332 --l2_reg=0.005 --log_steps=100 --num_threads=36 --model_dir=${DATA_PATH}/model_ckpt/DeepCvrMTL/ --data_dir="${DATA_PATH}/native" --task_type="infer" > ${DATA_PATH}/infer.log @@ -68,10 +68,10 @@ ${PYTHON_PATH} ${MODEL_PATH}/Model_pipline/DeepCvrMTL.py --ctr_task_wgt=0.3 --le echo "sort and 2sql" ${PYTHON_PATH} ${MODEL_PATH}/Model_pipline/sort_and_2sql.py -echo "infer and sort and 2sql timestamp" +echo "infer and sort and 2sql time" current=$(date "+%Y-%m-%d %H:%M:%S") timeStamp=$(date -d "$current" +%s) currentTimeStamp=$((timeStamp*1000+`date "+%N"`/1000000)) -echo $currentTimeStamp +echo $current ${PYTHON_PATH} ${MODEL_PATH}/Model_pipline/send_mail.py \ No newline at end of file diff --git a/eda/merge_sort.py b/eda/merge_sort.py new file mode 100644 index 0000000000000000000000000000000000000000..e70a6986e862c7e2c9118588e808e7ad52c687d0 --- /dev/null +++ b/eda/merge_sort.py @@ -0,0 +1,13 @@ +def merge_sort(lst): + if len(lst) <= 1: + return lst + middle = int(len(lst) / 2) + left = merge_sort(lst[:middle]) + right = merge_sort(lst[middle:]) + merged = [] + while left and right: + merged.append(left.pop(0) if left[0] <= right[0] else right.pop(0)) + merged.extend(right if right else left) + return merged +data_lst = [6,202,100,301,38,8,1] +print(merge_sort(data_lst)) \ No newline at end of file