sagemaker-debugger
sagemaker-debugger copied to clipboard
Saving tensors and scalars which are not part of model graph
Q. In the example I created, I needed to save data that is not part of the model training. I did this by calling directly hook._write_raw_tensor_simple(), which worked fine. But is this the recommended way?
For saving scalars, yes it is possible to save any arbitrary scalar from code. Please refer to save_scalar method in this part of docs - https://github.com/awslabs/sagemaker-debugger/blob/59de1452edd5d00252813d00425ef357541f51d9/docs/api.md#common-hook-api
For saving raw tensor which is not part of model graph, we don't have implementation currently. Please refer to https://github.com/awslabs/sagemaker-debugger/issues/154 for updates