Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

recordio.pack and unpack of header inconsistency (outputting wrong result) #20037

Open
pultarmi opened this issue Mar 16, 2021 · 1 comment
Open
Labels
Bug v1.x Targeting v1.x branch v2.0

Comments

@pultarmi
Copy link

pultarmi commented Mar 16, 2021

Description

mxnet.recordio.pack followed by mxnet.recordio.unpack is returning wrong result.

Input:
HEADER(flag=2, label=17672687.0, id=0, id2=0)

Expected output:
HEADER(flag=2, label=17672687.0, id=0, id2=0)

Actual output:
HEADER(flag=0, label=17672688.0, id=0, id2=0)

To Reproduce

import mxnet as mx

header = mx.recordio.IRHeader(flag=2, label=17672687.0, id=0, id2=0)
s = mx.recordio.pack(header, b'')
header_ = mx.recordio.unpack(s)[0]
print('original header ', header)
print('header packed and unpacked', header_)

What have you tried to solve it?

Tried different versions of Python (3.9.0, 3.8.3, 3.6.13) and of mxnet (mxnet==1.7.0.post1 and mxnet==1.5.0)

Environment

Python 3.9.0, mxnet==1.7.0.post1

@github-actions
Copy link

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.

@leezu leezu added v2.0 v1.x Targeting v1.x branch and removed needs triage labels Mar 16, 2021
@leezu leezu changed the title pack and unpack of header inconsistency (outputting wrong result) recordio.pack and unpack of header inconsistency (outputting wrong result) Mar 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug v1.x Targeting v1.x branch v2.0
Projects
None yet
Development

No branches or pull requests

2 participants