curobo.opt.newton.lbfgs module

curobo.opt.newton.lbfgs.compute_step_direction(alpha_buffer, rho_buffer, y_buffer, s_buffer, grad_q, m, epsilon, stable_mode=True)
Parameters:
  • m (int) –

  • epsilon (float) –

  • stable_mode (bool) –

class curobo.opt.newton.lbfgs.LBFGSOptConfig(d_action: 'int', action_lows: 'List[float]', action_highs: 'List[float]', action_horizon: 'int', horizon: 'int', n_iters: 'int', cold_start_n_iters: 'Union[int, None]', rollout_fn: 'RolloutBase', tensor_args: 'TensorDeviceType', use_cuda_graph: 'bool', store_debug: 'bool', debug_info: 'Any', n_problems: 'int', num_particles: 'Union[int, None]', sync_cuda_time: 'bool', use_coo_sparse: 'bool', line_search_scale: List[int], cost_convergence: float, cost_delta_threshold: float, fixed_iters: bool, inner_iters: int, line_search_type: curobo.opt.newton.newton_base.LineSearchType, use_cuda_line_search_kernel: bool, use_cuda_update_best_kernel: bool, min_iters: int, step_scale: float, last_best: float = 0, use_temporal_smooth: bool = False, cost_relative_threshold: float = 0.999, history: int = 10, epsilon: float = 0.01, use_cuda_kernel: bool = True, stable_mode: bool = True)

Bases: NewtonOptConfig

Parameters:
  • d_action (int) –

  • action_lows (List[float]) –

  • action_highs (List[float]) –

  • action_horizon (int) –

  • horizon (int) –

  • n_iters (int) –

  • cold_start_n_iters (int | None) –

  • rollout_fn (RolloutBase) –

  • tensor_args (TensorDeviceType) –

  • use_cuda_graph (bool) –

  • store_debug (bool) –

  • debug_info (Any) –

  • n_problems (int) –

  • num_particles (int | None) –

  • sync_cuda_time (bool) –

  • use_coo_sparse (bool) –

  • line_search_scale (List[int]) –

  • cost_convergence (float) –

  • cost_delta_threshold (float) –

  • fixed_iters (bool) –

  • inner_iters (int) –

  • line_search_type (LineSearchType) –

  • use_cuda_line_search_kernel (bool) –

  • use_cuda_update_best_kernel (bool) –

  • min_iters (int) –

  • step_scale (float) –

  • last_best (float) –

  • use_temporal_smooth (bool) –

  • cost_relative_threshold (float) –

  • history (int) –

  • epsilon (float) –

  • use_cuda_kernel (bool) –

  • stable_mode (bool) –

history: int = 10
epsilon: float = 0.01
use_cuda_kernel: bool = True
stable_mode: bool = True
class curobo.opt.newton.lbfgs.LBFGSOpt(config=None)

Bases: NewtonOptBase, LBFGSOptConfig

Base optimization solver class

Parameters:

config (LBFGSOptConfig | None) – Initialized with parameters from a dataclass.

reset()

Reset optimizer.

update_nproblems(n_problems)

Update the number of problems that need to be optimized.

Parameters:

n_problems – number of problems.

init_hessian(b=1)
_get_step_direction(cost, q, grad_q)

Reimplement this function in derived class. Gradient Descent is implemented here.

_update_q(grad_q)
_update_r(r_init)
_update_buffers(q, grad_q)
_shift(shift_steps=0)

Shift the optimizer by shift_steps * d_opt

Parameters:

shift_steps (int, optional) – _description_. Defaults to 0.

_shift_buffer(buffer, shift_d, shift_steps=1)
Parameters:

shift_steps (int) –