Editing Centralized Stages

The following only applies to centralized stages.

Once you've created and registered a centralized stage you can continue updating your stage configuration. Your changes will immediately be reflected in any further invocations.

To update a stage, you can call gp.update_stage():

import galileo_protect as gp

gp.update_stage(project_id="<project_id>", # Alternatively, use project_name
                stage_id="<stage_id>", # Alternatively, use stage_name
                prioritized_rulesets=[
    {
        "rules": [
            {
                "metric": "pii",
                "operator": "contains",
                "target_value": "ssn",
            },
        ],
        "action": {
            "type": "OVERRIDE",
            "choices": [
                "Personal Identifiable Information detected in the model output. Sorry, I cannot answer that question."
            ],
        },
    },
])

Your changes will immediately be reflected. Any subsequent calls to gp.invoke() will use the updated prioritized_rulesets.

Last updated