In T391958 it was clear that the model-upload script needs some improvements, since it assumes that we upload a single model binary file at any given time. There are new use cases, like uploading an entire file path (with subdirs etc..) that should probably be encoded in Python rather than bash, for ease of debuggability/testability/readability.
The script is currently living in the puppet repository (./modules/profile/templates/statistics/explorer/ml/model_upload.sh.erb) and it gets deployed to all the statxxxx nodes (with the related s3 credentials etc..).