Skip to content

Commit

Permalink
do proper filename substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
laszewsk committed Oct 5, 2023
1 parent c985e89 commit cbf9b49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benchmarks/cloudmask/target/greene_v0.5/slstr_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import yaml
import os
os.environ['PYTHONHASHSEED']=str(0)

prgname = os.path.basename(__file__)

import atexit
import h5py
Expand Down Expand Up @@ -99,7 +99,7 @@ def reconstruct_from_patches(config, patches: tf.Tensor, nx: int, ny: int, patch

# Inference
def cloud_inference(config) -> None:
print('Running benchmark slstr_cloud in inference mode.')
print(f'Running benchmark "{prgname}" in inference mode.')
global modelPath
# Read arguments
CROP_SIZE = config['image.CROP_SIZE']
Expand Down Expand Up @@ -201,7 +201,7 @@ def reset_random_seeds(seed):
#####################################################################

def cloud_training(config) -> None:
print('Running benchmark slstr_cloud in training mode.')
print(f'Running benchmark {prgname} in training mode.')
global modelPath
reset_random_seeds(config['experiment.seed'])
#tf.random.set_seed(config['experiment.seed'])
Expand Down Expand Up @@ -300,7 +300,7 @@ def string_to_boolean(input_string):
else: # mode: original
modelPath = os.path.expanduser(config['model_file'])
tf.keras.models.save_model(model, modelPath)
print('END slstr_cloud in training mode.')
print(f'END {prgname} in training mode.')
StopWatch.stop("training_on_mutiple_GPU")


Expand All @@ -327,7 +327,7 @@ def string_to_boolean(input_string):
# #################################
# Main
# #################################
# Running the benchmark: python slstr_cloud.py --config ./config.yaml
# Running the benchmark: python cloudmesh_v0.5.py --config ./config.yaml

def main():

Expand Down

0 comments on commit cbf9b49

Please sign in to comment.