Highlights
HuggingFace-style model inputs. Models now accept keyword inputs — model.loglike_loss(**batch) — matching the named BatchEncoding batches the tokenizer already produced. The legacy positional tuple still works and emits a DeprecationWarning. Equivalence between both styles is enforced by tests across all models.
Flattened, torch-only package layout (breaking). With TensorFlow support long removed, models moved from easy_tpp/model/torch_model/torch_*.py to easy_tpp/model/*.py (e.g. easy_tpp.model.nhp). TorchBaseModel -> BaseModel, TorchModelWrapper -> ModelWrapper, torch_wrapper.py -> model_wrapper.py. The Torch* class aliases remain exported from easy_tpp.model, but the old easy_tpp.model.torch_model.* / easy_tpp.torch_wrapper import paths are removed — update deep imports when upgrading.
Fixes
- ANHN works again: construction crashed on config subscripting, and
compute_states_at_sample_timesstacked duplicate tensors into a 5-D shape that broke the loss (#84-adjacent cleanup; both pre-existing). - Clean-install import crash:
matplotlib(not a declared dependency) was imported at module level in the data loader; now imported lazily in the plot helpers. - Test fixture path fixed so the full suite runs anywhere; suite currently 20 green tests.
Infrastructure
- New
testsCI workflow: full pytest suite on Python 3.9 and 3.11 for every push/PR. - Docs CI fixed and modernized (Python 3.11, real dependencies); documentation fully rewritten for the torch-only library at https://ant-research.github.io/EasyTemporalPointProcess/.
- Reference config gains
IntensityFree_gen(generation via the closed-form hazard, #13) andrescale_timeexamples (#55).
Upgrade note: code doing from easy_tpp.model.torch_model.torch_nhp import NHP should become from easy_tpp.model.nhp import NHP (or from easy_tpp.model import NHP).