Skip to content

Commit a74d33e

Browse files
don't remove the original when writing random forest model eu-cdse/openeo-cdse-infra#636
1 parent 1448bd5 commit a74d33e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

openeogeotrellis/ml/geopysparkrandomforestmodel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ def write_assets(self, directory: Union[str, Path]) -> Dict[str, StacAsset]:
113113
# Archive the saved model.
114114
logging.info(f"Archiving {model_path} to {model_path}.tar.gz")
115115
shutil.make_archive(base_name=str(model_path), format='gztar', root_dir=directory)
116-
logging.info(f"Removing original {model_path}")
117-
shutil.rmtree(model_path)
118116
archived_model_path = Path(str(model_path) + '.tar.gz')
119117
logging.info(f"GeopySparkRandomForestModel stored as {archived_model_path=}")
120118
return {archived_model_path.name: {"href": str(archived_model_path)}}

0 commit comments

Comments
 (0)