Skip to content

Releases: flowersteam/autodiscjax

Release v0.4

30 Mar 18:03
Compare
Choose a tag to compare

👉 Corresponds to pypi release 0.4.1

New modules:

  • CustomGoalAchievementLoss: allow users to define custom loss_f functions and pass it to the constructor

Updated modules:

  • L2GoalAchievementLoss: now inherits from CustomGoalAchievementLoss
  • NearestNeighborInterventionSelector: now has a loss_f method (given in constructor) allowing custom distance function
  • BaseIM and IMFlowGoalGenerator have been updated to also allow custom distance_fn function
  • PushPerturbationGenerator: 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
  • 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 logs
  • PiecewiseSetConstantIntervention: removed hardplus when setting w and c
  • NoisePerturbationGenerator, 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

v0.3

22 Feb 12:16
Compare
Choose a tag to compare

AutoDiscJax v0.3

  • New modules:

    • ClampModule: new util module to allow clamping of module outputs
    • UniformGoalGenerator: module to sample goals uniformly between a low and high value
    • RandomInterventionSelector: module to randomly select an intervention among history of prior interventions
    • NullRolloutStatisticsEncoder: module to allow users to not compute any statistics on the system outputs
    • PushPerturbationGenerator: new module to generate push perturbation parameters (separated from the NoisePerturbationGenerator)
  • Updated modules:

    • Module: each autodiscjax module now returns a log_data object

    • BaseGenerator and BaseOptimizer now inherit from the ClampModule module

    • big refacto of optimizers + BaseGCInterventionOptimizer + LearningProgressIM modules to allow save of local optim runs in imgep_experiment_pipeline

    • EAOptimizer now has a noise scheduler

    • GRNRollout: removed the vmap of grn_step (no needed anymore)

    • GRNRolloutStatisticsEncoder: added the is_converging statistic

    • WallPerturbationGenerator:

      • takes a sigma parameter allowing to tune the perpendicular vs radial repulsive forces exerted by the wall
      • positions wall based on distance travelled (instead of time travelled)
    • NoisePerturbationGenerator: added possibility to generate noise for w and c parameters

    • L2GoalAchievementLoss: added sqrt (before was squared L2) and adaptive scaling by current reached goal space extent

    • NearestNeighborInterventionSelector: added adaptive scaling by current reached goal space extent

  • New util functions:

    • create_modules.py: bunch of util functions to instantiate autodiscjax modules from a given config
    • append_to_log: util function to append the module's log_data outputs to log
  • Updated util functions:

    • is_converging: now looks if the signal amplitude has decreased (when compared to a prior phase of the signal)
  • Bug Fixes:

    • HypercubeGoalGenerator: fix hypercube center calculation
    • GRNRolloutStatisticsEncoder: stats were mixed, fixed
  • API changes:

    • big refacto of optimizers + BaseGCInterventionOptimizer + LearningProgressIM modules to allow save of local optim runs in imgep_experiment_pipeline
    • imgep_experiment_pipeline:
      • now saves local optim runs in history
    • rs_experiment_pipeline: added random search experiment pipeline
    • imgep_evaluation_pipeline was renamed into robustness_evaluation_pipeline (and run_imgep_evaluation into run_robustness_tests), and was modified with:
      • vmap vectorization of modules
      • logging
      • perturbation generator now takes raw system outputs as input (instead of just ys as this is more general)
  • jit decorators where removed/added to optimize compute time

  • Tests: renamed, updated and novel tests to test the different modules

  • Examples: updated with the new modules/pipeline

  • TODOs for next release:

    • docs
    • pip package
    • SGDOptimizer: deal with NaN values
    • IMFlowGoalGenerator bug fixes:
      • saving IM_vals into the logs can crash the code
      • can return NaN values

AutoDiscJax v0.2

07 Dec 18:18
Compare
Choose a tag to compare
  • New modules:

    • BaseGoalAchievementLoss: base module for goal-achievement losses
    • BaseOptimizer: base module for optimizers
    • OpenESOptimizer: sgd optimizer where grad is not the exact value but estimated with ES (Salimans et al., 2017)
    • EAOptimizer: simple ea optimizer
    • BaseIM: base module for computing IM values and grad
    • LearningProgressIM: learning-progress IM variant
    • IMFlowGoalGenerator: imgep module for sampling new goals by flowing previous goals along IM gradients
    • BasePerturbationGenerator: base module for generating perturbations during evaluation (dependent of experiment's system_output_library)
    • NoisePerturbationGenerator: submodule for generating noise perturbation params, given experiment's grn trajectories
    • WallPerturbationGenerator: submodule for generating wall perturbation params, given experiment's grn trajectories
    • PiecewiseWallCollisionIntervention: grn intervention module to apply walls
  • New util functions in misc.py :

    • flat_top_gaussian
    • sigmoid
    • calc_segment_intersection
    • wall_sticky_collision
    • wall_elastic_collision
    • calc_perpendicular_wall_distance
    • calc_radial_wall_distance
    • wall_force_field_collision
  • Bug Fixes:

    • Clamp intervention parameters in optimizers
    • NearestNeighborInterventionSelector allow k>1
  • API changes:

    • BaseGCInterventionOptimizer: imgep module now allows several optimizer variants (where optimizer is a BaseOptimizer object)
    • grn interventions __call__() function now takes y, y_, w, w_, c, c_, t_ as arguments
    • GRNRollout output pytree keys are now ys, ws, cs, ts instead of y, w, c, times
    • imgep_experiment_pipeline:
      • goal_generator now takes the target_goal_embedding_library as input
      • saving modules is optional
    • imgep_evaluation_pipeline:
      • removed the goal_embedding_encoder module from the pipeline
      • perturbation_generator now takes the experiment_system_output_library as input
      • saving modules is optional
  • Tests:

    • test_grn_modules
    • test_imgep_modules
  • Examples:

    • new example python scripts to run imgep experiment and evaluation pipelines with different possible configurations
    • new jupyter notebooks to analyze the results