pfnet / pytorch-pfn-extras

Supplementary components to accelerate research and development in PyTorch
https://medium.com/pytorch/migration-from-chainer-to-pytorch-8ed92c12c8
MIT License
271 stars 52 forks source link

Append mode Chrome Tracing profiler #798

Closed linshokaku closed 8 months ago

linshokaku commented 9 months ago

https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

When provided as a string to the importer the ] at the end of the JSON Array Format is optional. The Trace Viewer importer will automatically add a ] if needed to turn the string into valid JSON.. This is to support tracing systems that can not cleanly finish writing the trace. For example, when tracing the exit of a program.

Since there is no need to add a trailing ], it is possible to implement appending a json string without removing it from the file.