[Solved] MindSpore Error: “RuntimeError: Invalid data, Page size.”

1 Error description

1.1 System Environment

ardware Environment(Ascend/GPU/CPU): CPU
Software Environment:
– MindSpore version (source or binary): 1.6.0
– Python version (eg, Python 3.7.5): 3.7.6
– OS platform and distribution (eg, Linux Ubuntu 16.04): Ubuntu 4.15.0-74-generic
– GCC/Compiler version (if compiled from source):

1.2 Basic information

1.2.1 Script

This example converts the custom dataset into the MindSpore Record data format.

1.2.2 Error reporting

RuntimeError: Syntax error. Invalid data, Page size: 1048576 is too small to save a blob row. Please try to use the mindrecord api ‘set_page_size’ to enable 64MB page size.
Line of code : 1153

2 Reason analysis

According to the error message, the Pagesize setting is too small to read that much data.

3 Solutions

Refer to the provided set_page_size API to set the pagesize to a larger size.

4 Summary

1. Set the size of the page that represents the area where data is stored. These areas are divided into two types: row page and blob page. The larger the page, the more data can be stored.
2. When the pagesize is not set, the default sample size that can be stored is 32MB. If the sample size is larger than the default size, the user needs to call the API to set the appropriate size.
3. The adjustable range of pagesize is 32 1024 (32KB) to 256 1024*1024 (256MB).

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *