Conversation
Adds a formal schema definition for problems, generators, suites and implementations. These are packaged in a bare bones python module named opltools. A minimal usage example is located in examples/demo.py. To check if a given yaml file adheres to the schema, there's an included cli tool. Run uv run opl validate my-file.yaml to check it.
d8e0ef5 to
42cccc0
Compare
Add a minimal (AI generated) set of unit tests for opltools. Run the tests on push and for pull requests.
42cccc0 to
5f3c385
Compare
f51be96 to
5bcb5f8
Compare
Variables and constraints are now lists (technically sets) with a description of each type. This is more flexible than the previous approach and allows iterative refinement.
Co-authored-by: Vanessa
5bcb5f8 to
d49220a
Compare
Manual translation of the EMDO problem from the old problems.yaml file to the new format to check if schema supports storing all information from old format.
d49220a to
0d4225c
Compare
Rudimentary design document and reference for the new schema that attempts to summarize the discussion at the OPL hackathon in April. The core structure was written by the author, then fleshed out using Claude and finally reviewed by again the author. Co-Authored-By: Claude Opus 4.7
159ba06 to
16dc860
Compare
1d059cd to
240bfa7
Compare
240bfa7 to
3343cd8
Compare
|
PRs #172, #180, and #181 depend on this one and we need to either temporarily disable the HTML rebuild or also commit @Dvermetten's changes to the build scripts for this PR to land. |
| implementations={"cobi_impl"}, | ||
| can_evaluate_objectives_independently="no", | ||
| constraints=[ | ||
| # FIXME: Check |
There was a problem hiding this comment.
We should make issues for these FIXME's to not forget them after merging.
kvdblom
left a comment
There was a problem hiding this comment.
I see only minor issues we can either quickly fix before merging, or make sure to record somewhere to fix later.
| return hash(self.title) + hash(self.link) | ||
|
|
||
|
|
||
| class Usage(BaseModel): |
| yes = "yes" | ||
| no = "no" | ||
| some = "some" | ||
| unknown = "?" |
| Fields shared by [Problem](#problem), [Suite](#suite), and [Generator](#generator). | ||
| The schema deliberately puts most descriptive fields here so suites can be characterised without explicitly having to add all problems in the suite. | ||
|
|
||
| | Field | Type | Notes | |
There was a problem hiding this comment.
Verify types and remove questionmarks
|
|
||
| | Field | Type | Notes | | ||
| |------------|--------------|-----------------------------------------------| | ||
| | `problems` | set of IDs? | must resolve to [Problem](#problem)s | |
There was a problem hiding this comment.
Veryfiy type + remove questionmark
| |------------|--------------|-----------------------------------------------| | ||
| | `problems` | set of IDs? | must resolve to [Problem](#problem)s | | ||
|
|
||
| `fidelity_levels` is auto-unioned from member problems at validation time. |
There was a problem hiding this comment.
Maybe move this comment to ProblemLike where other such cases are also covered?
|
|
||
| ```yaml | ||
| references: | ||
| - title: "Honey Badger Algorithm: New metaheuristic algorithm for solving optimization problems." |
There was a problem hiding this comment.
Replace with a standard algorithm (basic GA/ES?). Fun-named algorithm as example is not a good look on us.
|
|
||
| ### Link | ||
|
|
||
| `{type?: str, url: str}`. |
Adds a formal schema definition for problems, generators, suites and implementations. These are packaged in a bare bones python module named opltools. A minimal usage example is located in examples/demo.py.
To check if a given yaml file adheres to the schema, there's an included cli tool. Run
to check it.