From 6261a3351da6b075d2a1228f6c759750df8a7fa0 Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:33:34 +0100 Subject: [PATCH] Add timestamp to bootstrap weights file --- record_rep_weights.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/record_rep_weights.py b/record_rep_weights.py index b3cb6f80..62b3d54a 100644 --- a/record_rep_weights.py +++ b/record_rep_weights.py @@ -1,9 +1,8 @@ import requests import argparse -from binascii import unhexlify from base64 import b32decode -from binascii import hexlify, unhexlify - +from binascii import hexlify +from datetime import date parser = argparse.ArgumentParser( description='Generate bootstrap representative weight file.') @@ -44,10 +43,11 @@ supplymax /= int('1000000000000000000000000000000') supplymax = int(supplymax * args.limit) supplymax *= int('1000000000000000000000000000000') outputfile = 'bootstrap_weights_' + args.network + '.hpp' +today = date.today().strftime("%d-%m-%Y") with open(outputfile, 'w') as of: of.write(f"#pragma once\n\n#include \n#include \n\nnamespace nano::weights\n{{\n") - of.write(f"// Bootstrap weights for {args.network} network\n") + of.write(f"// Bootstrap weights for {args.network} network as of {today}\n") of.write(f"std::vector> preconfigured_weights_{args.network} = {{\n") total = int(0)