Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PSLIB] Add Metrics Module, Support User-defined Add Metric #38230

Merged
merged 11 commits into from
Jan 28, 2022

Conversation

WorgenZhang
Copy link
Contributor

@WorgenZhang WorgenZhang commented Dec 17, 2021

PR types

New features

PR changes

Others

Describe

  • 新增可自定义扩展评估指标模块(metrics.h/metrics.cc),对于新增评估指标,用户只需添加新的MetricMsg类,并在AucCalculator中完成数据添加、指标计算逻辑的实现;
  • 目前评估指标模块已支持AucCalculator、MultiTaskAucCalculator、CmatchRankAucCalculator、MaskAucCalculator、CmatchRankMaskAucCalculator、WuAucCalculator
  • 新增解析uid、并根据uid进行global_shuffle功能,dataset.py新增set_shuffle_by_uid和set_uid_slot函数
  • 新增gloo_context,实现对gloo_wrapper的封装,进行gloo单例的创建并初始化

double _bucket_error = 0;
std::unordered_set<uint64_t> _uid_keys;

// std::vector<std::shared_ptr<memory::Allocation>> _d_positive;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove these lines.

// std::vector<std::shared_ptr<memory::Allocation>> _d_negative;
// std::vector<std::shared_ptr<memory::Allocation>> _d_abserr;
// std::vector<std::shared_ptr<memory::Allocation>> _d_sqrerr;
// std::vector<std::shared_ptr<memory::Allocation>> _d_pred;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove these lines.

int _table_size;
std::vector<double> _table[2];
// std::unordered_map<uint64_t,
// std::map<uint32_t, std::pair<uint64_t, uint64_t>>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove these lines.

// double total_time = 0.0;
// double compute_time = 0.0;
// double allreduce_time = 0.0;
// double reset_time = 0.0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could remove useless lines

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'd better check all the files with useless code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

…ddle#38789)

* [PSLIB] Add Metrics Module, Support User-defined Add Metric

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI Coverage

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI

* [PSLIB] Modify According to CI Coverage

* [PSLIB] Modify According to CI Coverage

* [PSLIB] Modify According to CI Coverage

* modify role_maker

* update CMakeLists.txt
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Jan 28, 2022
@PaddlePaddle PaddlePaddle unlocked this conversation Jan 28, 2022
@fuyinno4 fuyinno4 merged commit 7460a89 into PaddlePaddle:release/1.8 Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants