Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,8 +49,13 @@ except ImportError:
|
|
| 49 |
# ----------------------------------------------------------------------
|
| 50 |
# Infrastructure simulator and engines
|
| 51 |
# ----------------------------------------------------------------------
|
| 52 |
-
|
| 53 |
policy_engine = PolicyEngine() # loads default policies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
risk_engine = RiskEngine(hmc_model_path="hmc_model.json", use_hyperpriors=True)
|
| 55 |
|
| 56 |
# ----------------------------------------------------------------------
|
|
|
|
| 49 |
# ----------------------------------------------------------------------
|
| 50 |
# Infrastructure simulator and engines
|
| 51 |
# ----------------------------------------------------------------------
|
| 52 |
+
# Define policy_engine first
|
| 53 |
policy_engine = PolicyEngine() # loads default policies
|
| 54 |
+
|
| 55 |
+
# Now create simulator, passing the policy_engine
|
| 56 |
+
infra_sim = AzureInfrastructureSimulator(policy=policy_engine)
|
| 57 |
+
|
| 58 |
+
# Risk engine (does not depend on policy_engine)
|
| 59 |
risk_engine = RiskEngine(hmc_model_path="hmc_model.json", use_hyperpriors=True)
|
| 60 |
|
| 61 |
# ----------------------------------------------------------------------
|