Skip to content

Commit

Permalink
feat: Added comment on that data should be fully prepared for the mod…
Browse files Browse the repository at this point in the history
…el building
  • Loading branch information
d-krupke committed Oct 16, 2024
1 parent 4512c43 commit 41d1d8d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 06_coding_patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@ class KnapsackSolution(BaseModel):
)
```

> [!WARNING]
>
> Your data schema should be fully prepared for the optimization process,
> requiring no further preprocessing. Data preparation and optimization are both
> complex tasks, and combining them can significantly increase complexity,
> making your code difficult to maintain. Ideally, your optimization code should
> simply iterate over the data and add the corresponding constraints and
> objectives to the model.
The original code needs to be adapted to use these data classes.

```python
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4779,6 +4779,15 @@ class KnapsackSolution(BaseModel):
)
```

> [!WARNING]
>
> Your data schema should be fully prepared for the optimization process,
> requiring no further preprocessing. Data preparation and optimization are both
> complex tasks, and combining them can significantly increase complexity,
> making your code difficult to maintain. Ideally, your optimization code should
> simply iterate over the data and add the corresponding constraints and
> objectives to the model.
The original code needs to be adapted to use these data classes.

```python
Expand Down

0 comments on commit 41d1d8d

Please sign in to comment.