File size: 1,409 Bytes
e1ced61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""C1/C2 structured-source adapters (``docs/02`` §4).

A *structured source* is a C1 source whose gold authority is a
machine-checkable certificate built from a structured world (PlotQA,
Geometry3K) rather than a human label. Each adapter implements
:class:`~explicit_learning.sources.base.StructuredSourceAdapter`.

The registry maps a structured-source name (as it appears in
``resources/structured_sources.*``) to its adapter class. The HF-dataset
importers in :mod:`explicit_learning.ingest` are a separate, non-structured
ingest path keyed by ``resources.datasets.*``.
"""

from __future__ import annotations

from .base import (
    ADAPTERS,
    AdapterError,
    CertificateTier,
    Channel,
    RawItem,
    StructuredSourceAdapter,
    World,
)
from .clevr import ClevrAdapter
from .geometry3k import Geometry3KAdapter
from .gqa import GQAAdapter
from .plotqa import PlotQAAdapter

# Populate the registry after the concrete adapters import cleanly, so the
# shared protocol module (base.py) stays free of a circular import.
ADAPTERS["plotqa"] = PlotQAAdapter
ADAPTERS["geometry3k"] = Geometry3KAdapter
ADAPTERS["clevr"] = ClevrAdapter
ADAPTERS["gqa"] = GQAAdapter

__all__ = [
    "ADAPTERS",
    "AdapterError",
    "CertificateTier",
    "Channel",
    "ClevrAdapter",
    "GQAAdapter",
    "Geometry3KAdapter",
    "PlotQAAdapter",
    "RawItem",
    "StructuredSourceAdapter",
    "World",
]