Skip to content

0.4.0

Latest

Choose a tag to compare

@iLampard iLampard released this 01 Dec 10:30
047e2c7

A correctness release. A code review found likelihood, sampling and
prediction bugs in several models; they are fixed here, each with
regression tests, and a shared contract test suite now runs on every model.

Breaking changes

  • Python 3.10 or newer is required (3.9 is end-of-life).
  • Runner.evaluate(), and Runner.run() in evaluation mode, return the
    metrics dict instead of the RMSE value (#101).
  • Multi-step prediction returns [batch, num_step_gen] arrays; the copied
    last observed event is no longer included (#100).
  • IntensityFree's mark head no longer has an output for the PAD token, so
    checkpoints saved by 0.3.x do not load (#107).
  • FullyNN's likelihood subtracts H(0) from the integral. Set
    model_specs.subtract_zero_hazard: false for the previous behaviour (#96).
  • With use_mc_samples: true the log-likelihood integral uses random sample
    times, so values vary between runs unless seeded (#108).
  • Optuna is an optional extra: pip install 'easy_tpp[hpo]' (#109).

Fixed

  • ANHN: the likelihood no longer sees future events, and prediction no
    longer crashes (#93).
  • AttNHP: one-step prediction no longer treats time offsets as absolute
    timestamps (#94).
  • FullyNN: the shipped config no longer crashes (#95), and prediction works
    under no_grad (#103).
  • iTHP: multi-step prediction no longer crashes, and events are counted
    correctly (#92).
  • ODETPP: parameter gradients are correct when time steps differ within a
    batch (#97).
  • Thinning sampler: the intensity bound covers the sampled window, samples
    are independent, and a bound violation triggers a retry (#98).
  • ScaledSoftplus no longer has a flat, zero-gradient region (#99).
  • S2P2: no NaN with complex_values: false (#105).
  • Generation runs in eval mode without gradients (#103).
  • Config: get/pop defaults, saving and reloading, and copy() keep every
    field. dropout is accepted as an alias of dropout_rate (#102).
  • Tokenizer: masks respect left padding, and truncation shortens padded
    length (#104).
  • HPO: trials use their own data loaders, so a tuned batch size takes
    effect (#109). Fixed crashes in OptunaTuner (#91).
  • Evaluation and generation from a checkpoint no longer need the training
    set; IntensityFree statistics and time_scale are saved with the
    checkpoint (#110).

Added

  • Interpretable Transformer Hawkes Process (iTHP) (#88).
  • Model contract tests for all 12 models, plus data pipeline and end-to-end
    runner tests (#119).
  • CI tests Python 3.10–3.12, and builds and tests the installed wheel
    before every PyPI upload (#112, #117).
  • README and Sphinx docs updated for the current API (#113).