Skip to main content

Bessa Research Group

L2CO Tasks

| GitHub | Documentation

Optimization tasks compatible with the L2CO library

First publication: April 13, 2026


Summary

l2co-tasks provides a unified collection of optimization tasks for the L2CO ecosystem. Each Task bundles a JAX/Equinox model, a loss function, an optional dataset, and metadata tags into a single, serializable object that any L2CO optimizer or rollout can consume. The package ships ready-made task families — analytic black-box benchmarks (BBOB and CEC 2005), quadratic problems, supervised-learning tasks (spiral, MNIST-1D, Gaussian classification), and PINN-style PDE problems (convection, reaction, wave) — together with create_*_task factories and f3dasm samplers for building experiment datasets.

Statement of need

Research on learning to optimize and optimizer selection requires evaluating many optimizers across a diverse, well-characterized set of problems — but these problems usually come from incompatible sources with different input ranges, calling conventions, and metadata. l2co-tasks standardizes them behind a single Task abstraction: inputs are normalized to [0, 1]^d and scaled inside the loss, stochasticity and known global minima are tracked explicitly, and every task carries a hashable tag and serializes to a single .eqx file. This makes tasks reproducible, portable, and directly pluggable into the l2co / rl2co rollout machinery and f3dasm experiment pipelines.

Authorship

Authors:

Authors affiliation:

  • Delft University of Technology (Bessa Research Group)

Maintainer:

Maintainer affiliation:

  • Delft University of Technology (Bessa Research Group)

Getting started

l2co-tasks is uv-managed and depends on an editable install of a sibling f3dasm checkout, so lay the repositories out side-by-side before syncing:

git clone https://github.com/bessagroup/f3dasm.git
git clone https://github.com/bessagroup/l2co-tasks.git
cd l2co-tasks
uv sync

Create a task from one of the factories and evaluate its loss:

from l2co_tasks import create_bbob_task

task = create_bbob_task(fn_name="sphere", seed=0, dimensionality=2)
loss = task.loss_fn(task.model)   # model is the [0, 1]^d input vector

Tasks serialize to a single-file .eqx format via Task.save / Task.load. See the documentation for the full list of task families and create_*_task factories. To build your own task from scratch, see the Create your own task guide.

Examples and benchmarks

Two runnable notebooks demonstrate and benchmark the core functionality end-to-end. Both run against the installed package after uv sync and are rendered in the documentation:

  • Create your own task — builds a Task from scratch and exercises the Task API (loss evaluation, serialization, metadata).
  • PINN benchmark tasks — instantiates and evaluates the physics-informed PDE benchmark suite (Helmholtz, Burgers, Euler, Stokes, PK–PD).

Community Support

If you find any issues, bugs or problems with this package, please use the GitHub issue tracker to report them.

License

Copyright (c) 2026, Martin van der Schelling

All rights reserved.

This project is licensed under the BSD 3-Clause License. See LICENSE for the full license text.

This package is part of the L2CO ecosystem developed in the Bessa Research Group. The repositories below work together:

  • l2co — Learning to Choose Optimizers: a meta-learner that selects an optimizer from problem features before any evaluations, then reassesses that choice from the observed optimization trajectory.
  • rl2co — Reinforcement Learning to Choose Optimizers: a JAX-based RL agent that dynamically switches between optimizers during a run.
  • l2co-tasks — Optimization task definitions (BBOB, CEC 2005, PDE, spiral, …) compatible with the L2CO library.
  • l2co_experiments — Hydra + f3dasm experiment pipelines (dataset creation, training, rollouts, figures) for the L2CO studies.
  • agentic-l2co — An LLM-agent drop-in replacement for l2co.L2COModel, driving two-stage optimizer selection with an Ollama-hosted LLM.
  • bbob-jax — JAX implementations of the BBOB and CEC 2005 black-box optimization benchmark functions.
  • f3dasm — Framework for Data-Driven Design and Analysis of Structures and Materials; provides ExperimentData, pipelines, and SLURM orchestration.

Metadata

Release files for l2co-tasks 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for l2co-tasks 0.1.0
File Size Uploaded
l2co_tasks-0.1.0.tar.gz 79.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for l2co-tasks 0.1.0
File Interpreter ABI Platform
l2co_tasks-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 155.9 kB

Release files / l2co_tasks-0.1.0.tar.gz

Download URL l2co_tasks-0.1.0.tar.gz
Size 79.7 kB
Tags Source
SHA-256 checksum
How to use checksums
44f64cc039927a7570269e2cdccff478c867b9989563555c3d7eb866d05ecacc
BLAKE2b-256 checksum
How to use checksums
852bf27d46d8f5ac115e104f20ff346925cdfb328ee36e8e35a9b20e0858965c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / l2co_tasks-0.1.0-py3-none-any.whl

Download URL l2co_tasks-0.1.0-py3-none-any.whl
Size 76.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fef11f7e8f0144805aae79fc8cb2755f3afcebd6c3c8948423c4bdeb11c80773
BLAKE2b-256 checksum
How to use checksums
aaf2d53081c48ad798e57639bb4cde32cd581dabe58bfde1bbe9bb4198c4b2bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page