Test In Colab

Extending TemporAI Tutorial 04: Writing a Custom Data Format

This tutorial shows how to extend TemporAI by wring a custom data format plugin.

⚠️ This feature is experimental and may not yet work as expected.

Note

  • See “Writing a Custom Plugin 101” section in “Writing a Custom Method Plugin” tutorial.

  • See also the “Other Data Formats” tutorial.

Inherit from the appropriate base class for the category of the data format plugin you are writing.

The base classes for data format plugins are: - StaticSamplesBase - TimeSeriesSamplesBase - EventSamplesBase

These are all found in: src/tempor/data/samples.py

Implement the methods the plugin needs.

The base classes require various abstract methods to be implemented, e.g.: * num_samples, * sample_index(), * …

Find the methods in the appropriate base class indicated with @abc.abstractmethod and implement them.

Register the plugin with TemporAI.

Registering your plugin with TemporAI analogously to the other tutorials.