kwargs in the Model class.
Retrieve the environment
Access the environment in__init__:
model/model.py
Configure behavior per environment
Use the environment in yourload() method to set up environment-specific behavior:
model/model.py
- Customize logging levels.
- Load environment-specific model weights.
- Enable monitoring tools (for example, Sentry).
When you promote a deployment without re-deploying,
load() doesn’t re-run, so environment-specific configuration from the original deployment persists. You can configure an environment to create a fresh deployment on every promotion. See Re-deploy on promotion for details.Next steps
- The Model class: Read configuration, secrets, and runtime information in
__init__andload. - Environments: Promote deployments across stages and configure re-deploy on promotion.