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
This commit is contained in:
Starbeamrainbowlabs 2023-11-30 16:44:43 +00:00
parent 0f9f185983
commit 92fc34ebb1
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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")