Skip to content

[ENH] Move MultiEmbedding to layers/_embeddings - #2391

Open
richardmilles wants to merge 1 commit into
sktime:mainfrom
richardmilles:enh/move-embeddings-to-layers-2388
Open

[ENH] Move MultiEmbedding to layers/_embeddings#2391
richardmilles wants to merge 1 commit into
sktime:mainfrom
richardmilles:enh/move-embeddings-to-layers-2388

Conversation

@richardmilles

Copy link
Copy Markdown

Reference Issues/PRs

Fixes #2388.

What does this implement/fix? Explain your changes.

Moves MultiEmbedding / TimeDistributedEmbeddingBag into layers/_embeddings and leaves a thin re-export in models.nn.embeddings so existing imports keep working.

Did you add any tests for the change?

No — existing test_embeddings covers the public import path.

PR checklist

  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG].
  • Added/modified tests
  • Used pre-commit hooks when committing to ensure that code is compliant with hooks.

Relocate the shared embedding module out of models/nn and keep a
backward-compatible re-export so existing imports continue to work.

@phoeenniixx phoeenniixx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Can you please make sure the code-quality is passing?
We use pre-commit. See the coding- standards here: https://www.sktime.net/docs/developer-guide/coding-standards/

@phoeenniixx phoeenniixx added enhancement New feature or request module:layers labels Aug 22, 2026

@Muhammad-Rebaal Muhammad-Rebaal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @richardmilles,
The idea is to move this file from this dir to _embeddings completely so having this file up here is useless and ensure imports correctly where it is used.

@@ -1,219 +1,11 @@
from typing import Optional, Union
"""Backward-compatible re-export of embedding layers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request module:layers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Move embeddings.py to the _embeddings folder

4 participants