Skip to content

Conversation

KennethEnevoldsen
Copy link
Contributor

@KennethEnevoldsen KennethEnevoldsen commented Jun 16, 2025

This refactors imports following this pattern:

# tasks/__init__
from .Retrieval import *
# tasks/retrieval/__init__
from .eng import *
# tasks/retrieval/eng/__init__
from .task1 import Task1

proposed by @Samoed in #2825. This should reduce the number of imports required, while not exposing any of the module requires at the task definition.

@Samoed, I recommend that you review #2822 first.

This refactors imports following this pattern:

```py
# tasks/__init__
from .Retrieval import *
# tasks/retrieval/__init__
from .eng import *
# tasks/retrieval/eng/__init__
from .task1 import Task1
```
proposed by @Samoed in #2825. This should reduce the number of imports required, while not exposing any of the module requires at the task definition.
@Samoed
Copy link
Member

Samoed commented Jun 16, 2025

Can you add your script for generating imports to the scripts folder? There's a previous version of the import generation script https://github.com/embeddings-benchmark/mteb/blob/v2.0.0/scripts/generate_imports.py

@KennethEnevoldsen
Copy link
Contributor Author

@Samoed no script, just did it manually - didn't take long

@KennethEnevoldsen KennethEnevoldsen marked this pull request as ready for review June 16, 2025 19:33
KennethEnevoldsen added a commit that referenced this pull request Jun 16, 2025
related to: #1124
required for: #2714

Seems like we in multiple places denote the module instead of the intended TaskMetada. This rename should fix that issue

relies on PR #2828
@KennethEnevoldsen KennethEnevoldsen self-assigned this Jun 16, 2025
@KennethEnevoldsen KennethEnevoldsen requested a review from Samoed June 16, 2025 20:13
@KennethEnevoldsen KennethEnevoldsen added the v2 Issues and PRs related to `v2` branch label Jun 16, 2025
Base automatically changed from main2v2 to v2.0.0 June 16, 2025 20:47
@KennethEnevoldsen KennethEnevoldsen merged commit 5ac1a0d into v2.0.0 Jun 17, 2025
8 checks passed
@KennethEnevoldsen KennethEnevoldsen deleted the simplify-imports branch June 17, 2025 06:14
KennethEnevoldsen added a commit that referenced this pull request Jun 24, 2025
* Merge main into v2

* fix model imports

* added missing task imports

* refactor task import

This refactors imports following this pattern:

```py
# tasks/__init__
from .Retrieval import *
# tasks/retrieval/__init__
from .eng import *
# tasks/retrieval/eng/__init__
from .task1 import Task1
```
proposed by @Samoed in #2825. This should reduce the number of imports required, while not exposing any of the module requires at the task definition.

* added missing desriptive stats

* fix: : rename TaskMetadata.py to resolve class/module ambiguity

related to: #1124
required for: #2714

Seems like we in multiple places denote the module instead of the intended TaskMetada. This rename should fix that issue

relies on PR #2828

* format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Issues and PRs related to `v2` branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants