- bugfix: serialization now fails fast when a covariance function (or a predictor) belongs to a class that could not be resolved again on loading. Mellon stores classes by name and recovers them with
getattr(import_module(module_name), classname), so a class that is not bound at the top level of its module — most commonly one defined inside a factory function — produced a file thatCovariance.from_dict/Predictor.from_jsoncould not load. Previouslyto_json()wrote that file without complaint and theAttributeErrorsurfaced only at load time, potentially long after the fit it was meant to preserve.to_json()/to_dict()now raise aTypeErrornaming the offending qualified name and asking for a module-level definition. Module-level covariance functions, including user-defined ones, are unaffected and still round-trip exactly; existing serialized files still load.Predictor.copy()is deliberately not affected, as it never resolves the predictor class by name. - the guard above lives in
Covariance.__getstate__, which is also Python'scopy/picklehook, socopy.deepcopy()andpickle.dumps()of such a covariance function now raise the sameTypeError. Previouslydeepcopysucceeded, since it carries the class by reference instead of resolving it by name;picklefailed on its own. Only classes that were already unserializable are affected. For the same reasonPredictor.copy()of a predictor with such a covariance function now raisesTypeErrorup front instead of the previousAttributeErrorfrom the load path — it did not work before either. - composite covariance functions (
+,*,**) now record the full module of their class instead of only the top-level package, so a user-definedCovariancePairsubclass living in a subpackage can be resolved on loading. Files written by earlier versions continue to load unchanged. compute_d_factalis renamed tocompute_d_fractal, correcting the spelling of "fractal". The new name is the canonical one and is whatd_method="fractal"now calls internally.compute_d_factalcontinues to work: it is retained as an alias that forwards tocompute_d_fractal, is still exported frommellon.parameters, and remains listed in__all__, so existing code needs no change. No deprecation warning is emitted — the old name is used widely enough downstream that a warning on by default would be noise rather than signal. Callers writing new code should prefercompute_d_fractal.- removed: the
mellon-testconsole script. It was declared asmellon-test = "pytest:main"whilepytestis only adevextra, so on a normal install it failed immediately withModuleNotFoundError: No module named 'pytest'. It could not have worked even withpytestpresent: the installed distribution contains only themellonpackage, never the test suite, and the script invokedpytest.main()with no arguments — so it would have collected from whatever directory it happened to be run in. Run the tests from a source checkout withpytestinstead. This removes a published command, so any script invokingmellon-testwill now get "command not found" rather than theModuleNotFoundErrorit got before. - bugfix: declare
packagingas a runtime dependency.mellon.base_predictorhas importedpackaging.versionat module scope since v1.5.0, butpackagingwas never listed in the project dependencies, so installing Mellon into an environment that provided only its declared requirements failed atimport mellonwithModuleNotFoundError: No module named 'packaging'. Environments that happened to supplypackagingtransitively — including any install of thedevordocsextras — were unaffected, which is why it went unnoticed. If you have ever hitModuleNotFoundError: No module named 'packaging'on a fresh install of Mellon, this is the fix. - the GP leverage diagonal
diag(B M^-1 B^T)is now computed with a Cholesky solve instead of an explicitjnp.linalg.inv(M).M = sigma^2 K_uu + B^T B(plus jitter) is symmetric positive definite by construction, so the inverse was never needed. All five sites are converted:_LandmarksConditional._compute_obs_varianceand._leverage(scalar and per-feature sigma) and_LandmarksConditionalCholesky._leverage. Results are unchanged to within rounding (worst relative difference 1.8e-7 across 30 public-API comparisons; 1.9e-4 on a real 5,000-landmark problem with cond(M) = 2.5e13, where both forms agree with a QR reference to about 1e-4 and neither is uniformly the more accurate). - this also removes a segfault.
jnp.linalg.invlowers to LU (getrf), which dispatches to OpenBLAS's threadeddgetrf_parallel; at 5,000 landmarks that routine overflows the stack of the thread JAX calls it on and the process dies with SIGSEGV. Measured on OpenBLAS 0.3.30: 12/12 crashes end-to-end atOPENBLAS_NUM_THREADS=16against 0/12 at 1 thread, and 6/12 against 0/12 for the unpatched and patched code run back to back (not concurrently). Affects any caller using landmarks withobs_variance=TrueorPredictor.leverage(). The Cholesky path usespotrfand is unaffected.export OPENBLAS_NUM_THREADS=1remains a valid workaround on older versions. - note: with
jitter=0, or in float32, the Cholesky form returns NaN for matrices where the oldinvreturned finite values. In every such case checked the old values were numerically meaningless (errors above 25%, leverages outside [0, 1]), so this surfaces a failure that was previously silent. The defaultjitter=1e-6in float64 — what every estimator uses — is unaffected.