Skip to content

Commit

Permalink
fixing lost f strings
Browse files Browse the repository at this point in the history
  • Loading branch information
richpsharp committed Sep 12, 2023
1 parent 3efcf0e commit e8d71ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion carbon_edge_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def main():
sum_in_out_forest_carbon_density_by_mask_task))
task_graph.join()
raster_info = geoprocessing.get_raster_info(carbon_opt_forest_step_path)
LOGGER.debug(f'writing regression_optimization_carbon')
LOGGER.debug('writing regression_optimization_carbon')
with open('regression_optimization_carbon.csv', 'w') as opt_table:
opt_table.write(
'file,'
Expand Down
4 changes: 2 additions & 2 deletions extract_landcover_masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def main():
target_path_list=[target_path],
task_name=f'mask {target_path}')

LOGGER.info(f'waiting for jobs to complete')
LOGGER.info('waiting for jobs to complete')
task_graph.close()
task_graph.join()
del task_graph
LOGGER.info(f'all done!')
LOGGER.info('all done!')


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def regression_carbon_model(
LOGGER.info(f'load model at {carbon_model_path}')
with open(carbon_model_path, 'rb') as model_file:
model = pickle.load(model_file).copy()
LOGGER.info(f'ensure raster base data are present')
LOGGER.info('ensure raster base data are present')
missing_predictor_list = []
predictor_id_path_list = []
for predictor_id in model['predictor_list']:
Expand Down
2 changes: 1 addition & 1 deletion train_regression_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def main():

k = trainset[0].shape[1]

r2_table = open(os.path.join(FIG_DIR, f'r2_summary.csv'), 'a')
r2_table = open(os.path.join(FIG_DIR, 'r2_summary.csv'), 'a')
r2_table.write('model,r2,r2_adjusted,explained_variance,mean_absolute_error,mse,mean_squared_log_error,median_absolute_error\n')
for expected_values, modeled_values, n, prefix in [
(trainset[1].flatten(), clip_to_range(model.predict(trainset[0]).flatten(), 10, 400), trainset[0].shape[0], 'training'),
Expand Down

0 comments on commit e8d71ad

Please sign in to comment.