Skip to content

Commit

Permalink
correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-sp committed May 2, 2024
1 parent 0f82153 commit 15f01ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/ncopt/functions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ def __init__(
Parameters
----------
model : torch.nn.Module
The Pytorch module for evaluating the function
The Pytorch module for evaluating the function.
dim : Optional[int], optional
Input dimension of the function, by default None.
Needs to be specified for objective functions for the solver.
dim_out : int, optional
Output dimension of the function, by default 1
Output dimension of the function, by default 1.
Needs to be specified for each constraint function for the solver.
name : Optional[str], optional
A name for the function, by default None.
Not needed for solver, only for convenience.
device : Optional[Union[str, torch.device]], optional
A device for the forward pass, by default None.
You normall don't need to specify this: we automatically use the device
You normally don't need to specify this: we automatically use the device
where the parameters of the model lie on.
If you specify the device, please make sure, that the parameters of the model
lie on the correct device.
dtype : Optional[torch.dtype], optional
Format to convert when evaluating a tensor that was converted
from ``np.ndarray``, by default torch.float32
from ``np.ndarray``, by default torch.float32.
prepare_inputs : Optional[Callable], optional
Callable to prepare the model inpt, by default None
Callable to prepare the model inpt, by default None.
Note that the solver always inputs the full optimization variable (as batch).
If your function only needs a subset of the vector as input, or
needs reshaping operations etc, then you can do this via this callable.
Expand Down
10 changes: 5 additions & 5 deletions src/ncopt/sqpgs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,24 @@ def __init__(
Starting point, by default vector of zeros.
tol : float, optional
Tolerance for stopping, measured by E_k in [Curtis and Overton, 2012].
By default DEFAULT_ARG.tol
By default DEFAULT_ARG.tol.
max_iter : int, optional
Maximum number of iterations, by default DEFAULT_ARG.max_iter
Maximum number of iterations, by default DEFAULT_ARG.max_iter.
verbose : bool, optional
Whether to print status updates, by default DEFAULT_ARG.verbose
Whether to print status updates, by default DEFAULT_ARG.verbose.
options : dict, optional
Dictionary with options, by default {}.
All specified entries will overwrite the default value.
See ``./defaults.py`` for possible key names and default values.
assert_tol : float, optional
Assertion tolerance used in mathematical checks, by default DEFAULT_ARG.assert_tol
Assertion tolerance used in mathematical checks, by default DEFAULT_ARG.assert_tol.
You can avoid errors raised by assertions by increasing this number.
Note that in that case, the algorihtm might be not producing correct output.
store_history : bool, optional
Whether to store the history of iterates in every iteration, by default False.
Only use this for small examples, as it might produce memory overflow.
log_every : int, optional
Frequency of status updates (if ``verbose=True``) by default DEFAULT_ARG.log_every
Frequency of status updates (if ``verbose=True``) by default DEFAULT_ARG.log_every.
"""
if tol < 0:
Expand Down

0 comments on commit 15f01ab

Please sign in to comment.