Skip to content

Commit

Permalink
add NVJPEG error meassage spider to fix ci build. test=develop
Browse files Browse the repository at this point in the history
  • Loading branch information
heavengate committed Apr 6, 2022
1 parent 03783f2 commit 6d20a9f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
1 change: 0 additions & 1 deletion paddle/fluid/operators/data/map_runner.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <memory>
#include <mutex>
#include <vector>
#include "ThreadPool.h"

#include "paddle/fluid/framework/parallel_executor.h"
#include "paddle/fluid/operators/reader/lod_tensor_blocking_queue.h"
Expand Down
46 changes: 46 additions & 0 deletions tools/externalError/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,52 @@ def handle_data(self, data):
desc.strip())

CUFFTHTMLParser().feed(html)
#*************************************************************************************************#

#*********************************** nvJPEG Error Message **************************************#
nvjpegStatus_t = {
"NVJPEG_STATUS_SUCCESS": 0,
"NVJPEG_STATUS_NOT_INITIALIZED": 1,
"NVJPEG_STATUS_INVALID_PARAMETER": 2,
"NVJPEG_STATUS_BAD_JPEG": 3,
"NVJPEG_STATUS_JPEG_NOT_SUPPORTED": 4,
"NVJPEG_STATUS_ALLOCATOR_FAILURE": 5,
"NVJPEG_STATUS_EXECUTION_FAILED": 6,
"NVJPEG_STATUS_ARCH_MISMATCH": 7,
"NVJPEG_STATUS_INTERNAL_ERROR": 8,
"NVJPEG_STATUS_IMPLEMENTATION_NOT_SUPPORTED": 9,
"NVJPEG_STATUS_INCOMPLETE_BITSTREAM": 10,
}

print("start crawling errorMessage for nvidia nvJPEG API--->")
url = 'https://docs.nvidia.com/cuda/nvjpeg/#nvjpeg-api-return-codes'

allMessageDesc = externalErrorDesc.errors.add()
allMessageDesc.type = external_error_pb2.NVJPEG

html = urllib.request.urlopen(url).read().decode('utf-8')

res_div = r'Description of the returned error codes:.*?<div class="tablenoborder">(.*?)</div>'
m_div = re.findall(res_div, html, re.S | re.M)[0]

res_dt = r'<samp class="ph codeph">(.*?)</samp></td>.*?colspan="1">(.*?)</td>'
m_dt = re.findall(res_dt, m_div, re.S | re.M)

for error in m_dt:
m_code = error[0]
m_code = m_code.split()[0].strip()

m_message = error[1]
m_message = re.sub(r'\t', ' ', m_message)
m_message = re.sub(r'\n +', ' ', m_message)
m_message = re.sub(r'<.*?>', '', m_message)

_Messages = allMessageDesc.messages.add()
_Messages.code = int(nvjpegStatus_t[m_code])
_Messages.message = "'%s'. %s" % (m_code, m_message)

print("End crawling errorMessage for nvidia NVJPEG API!\n")
#*************************************************************************************************#


def main(argv):
Expand Down

1 comment on commit 6d20a9f

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 6d20a9f Apr 6, 2022

Choose a reason for hiding this comment

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

🕵️ CI failures summary

🔍 PR: #11 Commit ID: 6d20a9f contains failed CI.

🔹 Failed: PR-CI-APPROVAL

Unknown Failed
Unknown Failed

🔹 Failed: PR-CI-Windows

Unknown Failed
Unknown Failed

🔹 Failed: PR-CI-Windows-OPENBLAS

Unknown Failed
Unknown Failed

🔹 Failed: PR-CI-Model-benchmark

Unknown Failed
Unknown Failed

🔹 Failed: PR-CI-Static-Check

Unknown Failed
Unknown Failed

🔹 Failed: PR-CI-Windows-Inference

Unknown Failed
Unknown Failed

🔹 Failed: PR-CI-Coverage

Unknown Failed
Unknown Failed

Please sign in to comment.