Skip to content

Further tasks for v0.2.x #4

@alcrene

Description

@alcrene

Grab-bag of tasks that should be done in the v0.2 cycle, but don't have a specific version milestone.

General

  • Make modules or classes which depend on dynamics types "postponed" (see mackelab_toolbox.transform_postponed), so that they don't have to be loaded after freeze_types().
  • Better string representations for BaseModel-derived classes.

Kernel changes

  • When discretizing kernels, discretization of time axis should be handled by Axis.discretize.
  • Allow kernels to be specified as HistoryUpdateFunction inputs, which would would be replaced by the appropriate discretized kernel when it is discretized.

History changes

  • History.dtype should be a property (not attribute), because it is redundant with History._sym_data.dtype.

Model changes

  • In the Model metaclass, add str, repr method(s) to State so that it prints something useful (the list of state histories).

DynArray changes

  • Rename “AxisData” to DynArray to better align with PyData's “DataArray”.
  • Distinguish shapes:
    • axis_shape: The number of stops on each axis. Use None for axes with no stops.
    • sampling_shape: Number of samples. Might as well allow for multiple sampling dimensions (same effort). Can be used for multiple batches, particle filter. Use empty tuple if there are no sampling dimensions. Can just return empty tuple for v0.2.
    • var_shape: The shape of the dynamic variable
    • data_shape: full shape of the data
      @property
      def data_shape(self):
          return self.axis_shape + self.sampling_shape + self.var_shape
    • shape = sampling_shape + var_shape (@property)
      (keep definition of shape consistent with current code)
  • Copy functions from History
    • update_function() -> compute()
    • Indexing functions (and have them use to DiscreteAxis)
    • locking function and attributes
    • Add warning to unlock that it should not be used in normal code.
      (intended for interactive sessions/testing.)
      (Sinn methods assume that a locked DataAxes will never change.)
    • observed keyword

Unit tests

  • Reduce redundancy in test code.
    Where possible, use loops over axis/history types and theano/numpy execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions