List And Load
Source: examples/catalog/list_and_load.py
Introduction
List the packaged catalog, feature flags, and loaded classes.
Technical Implementation
This page is generated from the top-of-file module docstring and the example source code. The full script is included below for direct inspection.
1from __future__ import annotations
2
3import design_research_problems as derp
4
5
6def main() -> None:
7 """Print the catalog IDs, feature flags, and loaded class for each seed problem."""
8 registry = derp.ProblemRegistry()
9 problem_ids = derp.list_problems()
10 print(problem_ids)
11 print(registry.kind_feature_flags())
12 for problem_id in problem_ids:
13 problem = derp.get_problem(problem_id)
14 print(problem_id, problem.metadata.feature_flags, type(problem).__name__)
15
16
17if __name__ == "__main__":
18 main()
Expected Results
Run Command
PYTHONPATH=src python3 examples/catalog/list_and_load.py
Run the command shown below from repository root. Output should summarize the problem setup, a baseline solution, or diagnostic values relevant to this example.