From 92fc34ebb1ca98138fe4b46feba3f5d51a37f29d Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 30 Nov 2023 16:44:43 +0000 Subject: [PATCH] rw/child_process:json2tfrecord: Add RAINFALL_MAX_NUMBER env var use use you'd need to export RAINFALL_MAX_NUMBER=some_integer_value, since it is used by a subprocess rather than the main Node.js process itself --- rainfallwrangler/src/lib/python/json2tfrecord.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rainfallwrangler/src/lib/python/json2tfrecord.py b/rainfallwrangler/src/lib/python/json2tfrecord.py index e279775..64c3984 100755 --- a/rainfallwrangler/src/lib/python/json2tfrecord.py +++ b/rainfallwrangler/src/lib/python/json2tfrecord.py @@ -12,8 +12,8 @@ if not os.environ.get("NO_SILENCE"): import tensorflow as tf # The maximum value allowed for the rainfall radar data. Used to normalise the data when converting to .tfrecord files -# TODO: Enter the optimal value for this. -RAINFALL_MAX_NUMBER = 100 +# TODO: Find the optimal value for this. +RAINFALL_MAX_NUMBER = int(os.environ["RAINFALL_MAX_NUMBER"]) if "RAINFALL_MAX_NUMBER" in os.environ else 100 def parse_args(): parser = argparse.ArgumentParser(description="Convert a generated .jsonl.gz file to a .tfrecord.gz file")