Convert a text file of the given protobuf class to binary.
(proto_class, filename, out_filename)
| 236 | |
| 237 | |
| 238 | def ConvertProtoToBinary(proto_class, filename, out_filename): |
| 239 | """Convert a text file of the given protobuf class to binary.""" |
| 240 | with open(filename) as f: |
| 241 | proto = TryReadProtoWithClass(proto_class, f.read()) |
| 242 | with open(out_filename, 'w') as fid: |
| 243 | fid.write(proto.SerializeToString()) |
| 244 | |
| 245 | |
| 246 | def GetGPUMemoryUsageStats(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…