Skip to content

experimental feature: error status, test=develop#35624

Merged
Shixiaowei02 merged 4 commits intoPaddlePaddle:developfrom
Shixiaowei02:dev/error
Sep 14, 2021
Merged

experimental feature: error status, test=develop#35624
Shixiaowei02 merged 4 commits intoPaddlePaddle:developfrom
Shixiaowei02:dev/error

Conversation

@Shixiaowei02
Copy link
Contributor

@Shixiaowei02 Shixiaowei02 commented Sep 9, 2021

PR types

New features

PR changes

APIs

Describe

应业务需求,提供了辅助接口将异常转换为错误状态码。

使用示例:

#include "paddle_api.h"
#include "paddle_infer_contrib.h"

using paddle_infer::contrib::Status;

int main() {
  paddle_infer::Config config;
  auto pred = paddle_infer::CreatePredictor(config);
  Status status = paddle_infer::contrib::get_status([&](){predictor->Run();});
  return status.code();
}

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 9, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@Shixiaowei02 Shixiaowei02 force-pushed the dev/error branch 2 times, most recently from a799ff1 to 530bc43 Compare September 9, 2021 13:13
@Shixiaowei02 Shixiaowei02 force-pushed the dev/error branch 2 times, most recently from 3c1bf99 to 2cadff7 Compare September 9, 2021 13:34
@Shixiaowei02 Shixiaowei02 force-pushed the dev/error branch 3 times, most recently from 48ee386 to 77ebfb1 Compare September 10, 2021 05:42
winter-wang
winter-wang previously approved these changes Sep 10, 2021
Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM

@Shixiaowei02 Shixiaowei02 merged commit 657a8c8 into PaddlePaddle:develop Sep 14, 2021
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this pull request Sep 29, 2021
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.

2 participants