👉 Corresponds to pypi release 0.4.1
New modules:
CustomGoalAchievementLoss
: allow users to define customloss_f
functions and pass it to the constructor
Updated modules:
L2GoalAchievementLoss
: now inherits from CustomGoalAchievementLossNearestNeighborInterventionSelector
: now has a loss_f method (given in constructor) allowing custom distance functionBaseIM
andIMFlowGoalGenerator
have been updated to also allow customdistance_fn
functionPushPerturbationGenerator
: now the push is sampled on the hyper-rectangle of side magnitude
Updated util functions:
nearest_neighbors
:- Y is now replaced by a vector called
target
- takes a loss_f function as input (allowing custom distance function)
- distance is now computed by vmaping the loss_f function over X
- Y is now replaced by a vector called
is_stable
: now check that the error |y(t)–yfinal| ≤ settling_threshold for all t in time_window (similar to matlab stepinfo function)
API changes:
- in all pipeline,
logs
is now a DictTree that is created and saved in the pipeline, similar to history (removing dependencies to exputils package)
Bug Fixes:
IMFlowGoalGenerator
IM_vals and IM_grads has been reincluded into the logsPiecewiseSetConstantIntervention
: removed hardplus when setting w and cNoisePerturbationGenerator
,PushPerturbationGenerator
,WallPerturbationGenerator
: perturbations are now scaled by trajectories_extent = jnp.nanmax(trajectories[.., 1:], -1) - jnp.nanmin(trajectories[..., 1:], -1) to avoid NaN values, don't take into account the position at t0 when scaling (often big jumps between t0 and t1), and when needed trajectories_extent is set to 1 (to avoid division by zero)
Tests: updated with the new changes
Examples: updated with the new changes