#!/usr/bin/env python import json from eas_prediction import TFRequest shape = 5 if __name__ == '__main__': fg_config = {} with open("/Users/zhao/Downloads/feature_list_20260424.json", "r") as f: fg_config = json.load(f) req = TFRequest('serving_default') for feature_info in fg_config['features']: feature_name = feature_info['feature_name'] value_type = feature_info['value_type'] if value_type == 'Double': req.add_feed(feature_name, [shape], TFRequest.DT_DOUBLE, [0.0] * shape) else: req.add_feed(feature_name, [shape], TFRequest.DT_STRING, [b"-1024"] * shape) req.add_fetch('probs_pLeave') with open("/Users/zhao/Desktop/warm_up_20260424.bin", "wb") as fw: fw.write(req.to_string())