Open sambles opened 4 months ago
Thanks for logging this. A related improvement would be to allow these paths to be overridden via environment variables. This would allow a bit more flexibility and an easy workaround if some models want to keep these files separate from the model data (which might be a good thing to do anyway).
CHUNKING_CONFIGURATION_FILE="${OASIS_CHUNKING_CONFIGURATION_PATH:-$OASIS_MODEL_DATA_DIRECTORY/chunking_configuration.json}"
SCALING_CONFIGURATION_FILE="${OASIS_SCALING_CONFIGURATION_PATH:-$OASIS_MODEL_DATA_DIRECTORY/scaling_configuration.json}"
Issue Description
The example piwind model stores optional JSON files
These are intended to be picked up at by a model registration script (when deployed to a cluster), however that script expects these files to be in the models root directory.
https://github.com/OasisLMF/OasisPlatform/blob/626469d0adeadafa6da3fd5a554cfd24cf08c3fd/kubernetes/charts/oasis-models/resources/model_registration.sh#L14-L15
There is a workaround in the piwind deployment script to copy these from
<root>/meta-data/*.json
-><root>/*.json
https://github.com/OasisLMF/OasisAzureDeployment/blob/05561827d6ab51d03f1f3095dbe0be86bfe62d01/deploy.sh#L642-L643Pick a single location and make it consistent.
<root>/meta-data/*.json
or<root>/*.json
, pick and align all examples to that