未验证 提交 d69bb1da 编写于 作者: P pangengzheng 提交者: GitHub

Align auc with distps (#51434)

* support run haokanctr model in heterps-models

* polish setup.py

* polish JVM_LIB in evn_dict

* align infer auc with DistPsArch pre-stable
上级 a0a6dc6a
......@@ -2504,6 +2504,14 @@ void SlotRecordInMemoryDataFeed::AssignFeedVar(const Scope& scope) {
void SlotRecordInMemoryDataFeed::PutToFeedVec(const SlotRecord* ins_vec,
int num) {
// set ins id
if (parse_ins_id_) {
ins_id_vec_.clear();
ins_id_vec_.resize(num);
for (int i = 0; i < num; ++i) {
ins_id_vec_[i] = ins_vec[i]->ins_id_;
}
}
#if defined(PADDLE_WITH_CUDA) && defined(PADDLE_WITH_HETERPS)
paddle::platform::SetDeviceId(place_.GetDeviceId());
pack_->pack_instance(ins_vec, num);
......
......@@ -415,7 +415,7 @@ void DeviceWorker::DumpField(const Scope& scope,
continue;
}
ars[i] += ins_id_vec[i];
ars[i] += "\t" + ins_content_vec[i];
if (ins_content_vec.size() > i) ars[i] = ars[i] + "\t" + ins_content_vec[i];
}
for (auto& field : *dump_fields_) {
Variable* var = scope.FindVar(field);
......@@ -448,7 +448,8 @@ void DeviceWorker::DumpField(const Scope& scope,
continue;
}
auto bound = GetTensorBound(tensor, i);
ars[i] += "\t" + field + ":" + std::to_string(bound.second - bound.first);
ars[i] +=
"\t" + field + ":" + std::to_string(bound.second - bound.first) + ":";
ars[i] += PrintLodTensor(tensor, bound.first, bound.second);
}
}
......
......@@ -642,13 +642,13 @@ class CommonFeatureValueAccessor {
*(dest_val + common_pull_value.EmbedWIndex()) = 0;
} else {
*(dest_val + common_pull_value.ShowIndex()) =
src_val[common_feature_value.ShowIndex()];
src_val[common_pull_value.ShowIndex()];
*(dest_val + common_pull_value.ClickIndex()) =
src_val[common_feature_value.ClickIndex()];
src_val[common_pull_value.ClickIndex()];
*(dest_val + common_pull_value.EmbedWIndex()) =
src_val[common_feature_value.EmbedWIndex()];
src_val[common_pull_value.EmbedWIndex()];
}
int mf_size = static_cast<int>(src_val[common_feature_value.MfSizeIndex()]);
int mf_size = static_cast<int>(src_val[common_pull_value.MfSizeIndex()]);
if (mf_size == 0 || *key == 0) {
for (int j = 0; j < mf_dim; j++) {
*(dest_val + 3 + j) = 0;
......
......@@ -1295,7 +1295,9 @@ class FleetUtil:
hours = os.popen("echo -n " + hours).read().split(" ")
split_interval = int(split_interval)
split_per_pass = int(split_per_pass)
splits_per_day = 24 * 60 // split_interval
splits_per_day = (
(int(hours[-1]) - int(hours[0]) + 1) * 60 // split_interval
)
pass_per_day = splits_per_day // split_per_pass
left_train_hour = int(hours[0])
right_train_hour = int(hours[-1])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册