Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autoemulate/core/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def configure_logging(log_to_file=False, level: str = "INFO"):
logger = logging.getLogger("autoemulate")
logger.handlers = [] # Clear existing handlers

logger.setLevel(logging.DEBUG)

verbose_lower = level.lower()
match verbose_lower:
case "error":
Expand All @@ -38,6 +36,8 @@ def configure_logging(log_to_file=False, level: str = "INFO"):
msg = 'verbose must be "critical", "error", "warning", "info", or "debug"'
raise ValueError(msg)

logger.setLevel(console_log_level)

# Create console handler with a higher log level
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(console_log_level)
Expand Down
12 changes: 5 additions & 7 deletions docs/tutorials/tasks/03_bayes_calibration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Run MCMC using the NUTS sampler. The `BayesianCalibration` class uses Pyro under the hood. Below we use `pyro.set_rng_seed` to ensure reproducibility."
"Run MCMC using the NUTS sampler. The `BayesianCalibration` class uses Pyro under the hood."
]
},
{
Expand Down Expand Up @@ -464,19 +464,17 @@
"from autoemulate.calibration.evidence import EvidenceComputation\n",
"\n",
"# Compute evidence using the MCMC samples from emulator calibration\n",
"ec = EvidenceComputation(mcmc_emu, bc.model)\n",
"ec = EvidenceComputation(mcmc_emu, bc.model, log_level=\"error\")\n",
"results = ec.run(epochs=30, verbose=False)\n",
"\n",
"print(f\"ln(Evidence) = {results['ln_evidence']:.2f}\")\n",
"print(f\"Error bounds: [{results['error_lower']:.3f}, {results['error_upper']:.3f}]\")\n",
"print(f\"\\nUsed {results['num_chains']} chains with {results['num_samples_per_chain']} samples each\")\n",
"print(f\"Number of parameters: {results['num_parameters']}\")"
"print(f\"Error bounds: [{results['error_lower']:.3f}, {results['error_upper']:.3f}]\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "newalan",
"display_name": "autoemulate (3.12.7)",
"language": "python",
"name": "python3"
},
Expand All @@ -490,7 +488,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.19"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
Loading