Skip to content

test: Add trajectories in tests#691

Merged
ValerianRey merged 3 commits into
mainfrom
integrate-trajectories
May 20, 2026
Merged

test: Add trajectories in tests#691
ValerianRey merged 3 commits into
mainfrom
integrate-trajectories

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

This PR adds a trajectories package in TorchJD/tests so that we can run the trajectories directly within TorchJD. The goal is to archive the trajectories repo entirely.

I think this has the advantage of making the trajectories scripts much more visible to people who browse the TorchJD repo, and of making it more easily usable for us (for example, we'll be able to very quickly see the trajectories of upgrad with proxsuite if we merge this. Also, it makes it easier to maintain this repo (because ruff will warn us if something breaks, for example if we change the interface of autojac or of aggregators). So it should be really easy to maintain this.

Maybe one days we should have tests to ensure that the scripts such as this, the interactive plotter, the static plotter, the profiler, and so on, are not broken. But I think it's fine if they break, and we repair when we need them, so it's not really urgent. And type checking makes it unlikely to break very frequently.

I think that after merging this, we should make a few easy improvements:

  • Rename quadratic form to quadratic function
  • Remove every objective that we didn't publish in the paper to clean things up a bit (and remove nashmtl20)
  • I like that that results folder is created directly in the trajectories folder: it avoids bloating the TorchJD folder. It would be nice to do the same for the traces (in the profiling folder) and for the images (in the plots folder).

@ValerianRey ValerianRey requested a review from a team as a code owner May 19, 2026 14:33
@ValerianRey ValerianRey added the cc: test Conventional commit type for changes to tests. label May 19, 2026
@ValerianRey ValerianRey self-assigned this May 19, 2026
@ValerianRey ValerianRey requested a review from PierreQuinton May 19, 2026 14:33
@github-actions github-actions Bot changed the title Add trajectories in tests test: Add trajectories in tests May 19, 2026
Copy link
Copy Markdown
Contributor

@PierreQuinton PierreQuinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check it with ruff and ty? Should we run it on the CI to check that there is no bugs? This last question also goes for profling and plots?

@ValerianRey
Copy link
Copy Markdown
Contributor Author

Should we check it with ruff and ty?

We do already. ruff has the default settings of what to check so it checks the whole repo, and ty is set in pyproject.toml to check src (except nashmtl) and tests.

Should we run it on the CI to check that there is no bugs? This last question also goes for profling and plots?

Long term I would say yes for all three, or to at least try. But we need to make those scripts extremely fast (so that CI isn't slowed down), or at least make a parametrization of those scripts that is extremely fast, so it's quite a bit of work. Also if we can't manage to make this run fast, it's not worth IMO.

@ValerianRey ValerianRey merged commit bb52b6f into main May 20, 2026
38 of 41 checks passed
@ValerianRey ValerianRey deleted the integrate-trajectories branch May 20, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: test Conventional commit type for changes to tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants