Download code/macrolens/_compat.py from DeepAuto-AI/MacroLens: direct link, hf CLI and curl.
- Browser
- Download file 1.7 kB
-
https://huggingface.co/datasets/DeepAuto-AI/MacroLens/resolve/main/code/macrolens/_compat.py
- Command line
-
hf download hf://datasets/DeepAuto-AI/MacroLens/code/macrolens/_compat.py
-
curl -L -o _compat.py https://huggingface.co/datasets/DeepAuto-AI/MacroLens/resolve/main/code/macrolens/_compat.py
1.7 kB
| """Internal compatibility layer for imports. | |
| Handles both in-monorepo usage (``whatif_bench.macrolens``) and standalone | |
| ``macrolens`` pip package (future). | |
| """ | |
| from __future__ import annotations | |
| try: | |
| from projects.agent_builder.scripts.whatif_bench import config as _config | |
| from projects.agent_builder.scripts.whatif_bench.benchmark_loader import ( | |
| WhatIfTSFDataset as _WhatIfTSFDataset, | |
| ValuationDataset as _ValuationDataset, | |
| ) | |
| from projects.agent_builder.scripts.whatif_bench.agents.valuation.evaluate import ( | |
| evaluate_valuation as _evaluate_valuation, | |
| evaluate_generation as _evaluate_generation, | |
| evaluate_scenario_forecast as _evaluate_scenario_forecast, | |
| evaluate_re_valuation as _evaluate_re_valuation, | |
| ) | |
| except ImportError: | |
| # Fallback: relative import within whatif_bench | |
| from .. import config as _config # type: ignore[no-redef] | |
| from ..benchmark_loader import ( # type: ignore[no-redef] | |
| WhatIfTSFDataset as _WhatIfTSFDataset, | |
| ValuationDataset as _ValuationDataset, | |
| ) | |
| from ..agents.valuation.evaluate import ( # type: ignore[no-redef] | |
| evaluate_valuation as _evaluate_valuation, | |
| evaluate_generation as _evaluate_generation, | |
| evaluate_scenario_forecast as _evaluate_scenario_forecast, | |
| evaluate_re_valuation as _evaluate_re_valuation, | |
| ) | |
| # Re-export under stable names | |
| config = _config | |
| WhatIfTSFDataset = _WhatIfTSFDataset | |
| ValuationDataset = _ValuationDataset | |
| evaluate_valuation = _evaluate_valuation | |
| evaluate_generation = _evaluate_generation | |
| evaluate_scenario_forecast = _evaluate_scenario_forecast | |
| evaluate_re_valuation = _evaluate_re_valuation | |