pilgr/Paper

[ASK] How can view the contents of a PT file

Closed this issue · 1 comments

Hi,

I wish to implement a database viewer in my app. I play a lot with my local database so I need a way to constantly view the data that is being persisted or modified.

From the documentation, I figured it was internally saving .pt files. But I cannot find a way to view the contents of a .pt file. From scouring the internet I only get suggestions that this is a PyTorch file.

I attempted loading the .pt file using PyTorch but that too failed.
Can you suggest a way through which I can view the contents of a .pt file ?

pilgr commented

Paper DB is not a traditional DB. You may think about Paper DB as key-value storage, or HashMap that can be stored on disk.

So you can't load the content of .pt file without having access to the same classes that has been used to save data.

Every time you save data, the objects are serialized using Kryo serializer and .pt file is getting rewritten using new set of data. To deserialize the data, Kryo reads file content and tries to makes objects for the classes that has been used to save data.