export
Function
Reads the sparse table checkpoint saved in the current step and saves it as a NumPy file in key-value format. The key indicates the query ID, and the value indicates the embedding layer. You can use this API to export sparse table data in the following modes:
- On-chip memory (non-dynamic capacity expansion)
- DDR mode
Prototype
1 | def export(table_list=None): |
Parameters
Parameter |
Type |
Mandatory/Optional |
Description |
|---|---|---|---|
table_list |
list[str] |
Optional |
List of sparse tables to be exported. If no parameter is passed, all sparse tables are exported by default. Range of the list length: [1, 2^31 – 1] |
Return Value
- Success: None
- Failure: An exception is thrown.
Example
1 2 3 | from mx_rec.saver.sparse import export table_list=["sparse_embedding_table"] export(table_list=table_list) |
See Also
For details about the API call sequence and example, see Porting and Training.
Parent topic: Model APIs