Skip to content

Make search logging JAX-aware#1176

Merged
Jammy2211 merged 1 commit intomain_buildfrom
feature/jax-search-logging
Apr 5, 2026
Merged

Make search logging JAX-aware#1176
Jammy2211 merged 1 commit intomain_buildfrom
feature/jax-search-logging

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

@Jammy2211 Jammy2211 commented Apr 3, 2026

Summary

When JAX is active, the non-linear search logging displayed misleading messages: "Starting non-linear search with 1 cores" (JAX manages its own cores/GPU) and "Running search where parallelization is disabled" (inaccurate for JAX). This PR makes both messages JAX-aware — reporting the JAX backend (CPU/GPU) and device, and replacing the parallelization message with an accurate JAX vectorization message.

API Changes

None — internal logging changes only.

Test Plan

  • Run pytest test_autofit/non_linear -x — all 222 tests pass unchanged
  • Run a JAX fit and verify the log output shows Starting non-linear search with JAX (GPU: ...) or (CPU: ...)
  • Run a non-JAX fit and verify the original Starting non-linear search with N cores. message is unchanged
  • Run a Nautilus JAX fit and verify Running search with JAX vectorization (parallelization handled by JAX). appears instead of the old message
📋 Full API Changes (for automation & release notes)

No public API changes. Internal logging only.

Changed Behaviour

  • NonLinearSearch.fit() log message now says Starting non-linear search with JAX (<backend>: <device>). when analysis._use_jax is True, instead of Starting non-linear search with N cores.
  • Nautilus.fit_x1_cpu() log message now says Running search with JAX vectorization (parallelization handled by JAX). when analysis._use_jax is True, instead of Running search where parallelization is disabled.

🤖 Generated with Claude Code

…ore count

When JAX is active, the "Starting non-linear search with 1 cores" message
was inaccurate (JAX handles its own parallelization). Now logs the JAX
backend and device instead. Similarly, Nautilus's "parallelization is
disabled" message is replaced with a JAX-specific message when appropriate.

Closes #1175

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit cb54409 into main_build Apr 5, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/jax-search-logging branch April 5, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant