Skip to content

Commit

Permalink
removing some differences between main and experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
FilippoAiraldi committed Oct 23, 2024
1 parent 6c83283 commit 674752d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/csnlp/nlps/objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ def _solve_and_get_stats(
sol = solver(**kwargs)
sol["p"] = kwargs["p"] # add to solution the parameters for which it was computed
sol["stats"] = solver.func.stats() # add to solution the solver stats
# NOTE: in case of failure in retrieving the stats
# try:
# stats = solver.func.stats()
# except RuntimeError:
# stats = {"success": False}
# sol["stats"] = stats # add to solution the solver stats
return sol


Expand Down
6 changes: 3 additions & 3 deletions src/csnlp/wrappers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Motivation
==========
The standard class :class:`csnlp.Mpc` provides a way to solve NLP problems; however, it
The standard class :class:`csnlp.Nlp` provides a way to solve NLP problems; however, it
lacks many features that are useful in practice in different fields. For instance, it
does not provide a way to scale the problem, in cases where the primal variables have
widely different orders of magnitude and convergence is difficult to numerically
Expand All @@ -12,8 +12,8 @@
the optimization problems.
To address this, inspired by the approach adopted by the
`gymnasium <https://gymnasium.farama.org/>` package, we provide a way to wrap instances
of the basic :class:`csnlp.Mpc` class with wrapper classes that can add desired
`gymnasium <https://gymnasium.farama.org/>`_ package, we provide a way to wrap instances
of the basic :class:`csnlp.Nlp` class with wrapper classes that can add desired
features.
Overview
Expand Down

0 comments on commit 674752d

Please sign in to comment.