Exemplo n.º 1
0
    class ThreeRankTask(Task):
        """ A strange rank task that runs two searchers on benchmark #1 (via TwoRank) and the third searcher on benchmark #2 """

        module_name = "threerank"
        dependencies = [
            Dependency(key="tworank", module="task", name="tworank"),
            Dependency(key="rank3", module="task", name="rank"),
        ]
Exemplo n.º 2
0
    class TwoRankTask(Task):
        """ A rank tasks two runs two searchers on the same benchmark """

        module_name = "tworank"
        dependencies = [
            Dependency(key="benchmark", module="benchmark", name="rob04yang", provide_this=True, provide_children=["collection"]),
            Dependency(key="rank1a", module="task", name="rank"),
            Dependency(key="rank1b", module="task", name="rank"),
        ]
Exemplo n.º 3
0
 class RankTask(Task):
     module_name = "rank"
     dependencies = [
         Dependency(key="benchmark",
                    module="benchmark",
                    name="rob04yang",
                    provide_this=True,
                    provide_children=["collection"]),
         Dependency(key="searcher", module="searcher", name="bm25"),
     ]
Exemplo n.º 4
0
 class RerankTask(Task):
     module_name = "rerank"
     config_spec = [
         ConfigOption("fold", "s1", "fold to run"),
         ConfigOption(
             "optimize", "map", "metric to maximize on the dev set"
         ),  # affects train() because we check to save weights
     ]
     dependencies = [
         Dependency(key="benchmark", module="benchmark", name="rob04yang", provide_this=True, provide_children=["collection"]),
         Dependency(key="rank", module="task", name="rank"),
         Dependency(key="reranker", module="reranker", name="DRMM"),
     ]
Exemplo n.º 5
0
 class RerankerDRMM(ModuleBase):
     module_type = "reranker"
     module_name = "DRMM"
     dependencies = [
         Dependency(key="extractor", module="extractor", name="embedtext"),
         Dependency(key="trainer", module="trainer", name="pytorch"),
     ]
     config_spec = [
         ConfigOption("nbins", 29, "number of bins in matching histogram"),
         ConfigOption("nodes", 5, "hidden layer dimension for matching network"),
         ConfigOption("histType", "LCH", "histogram type: CH, NH, LCH"),
         ConfigOption("gateType", "IDF", "term gate type: TV or IDF"),
     ]
Exemplo n.º 6
0
 class AParent(ModuleTypeA):
     module_name = "AParent"
     config_spec = [
         ConfigOption(key="key1",
                      default_value="val1",
                      description="test option")
     ]
     dependencies = [
         Dependency(key="myfoo",
                    module="Atype",
                    name="AFoo",
                    default_config_overrides={"changethis": 42}),
         Dependency(key="bar", module="Atype", name="ABar"),
     ]
Exemplo n.º 7
0
 class SearcherBM25(ModuleBase):
     module_type = "searcher"
     module_name = "bm25"
     dependencies = [Dependency(key="index", module="index", name="anserini")]
     config_spec = [ConfigOption(key="k1", default_value=1.0, description="k1 parameter")]
     # Searchers are unlikely to actually need a seed, but we require it for testing
     requires_random_seed = True
Exemplo n.º 8
0
    class ExtractorEmbedtext(ModuleBase):
        module_type = "extractor"
        module_name = "embedtext"

        dependencies = [
            Dependency(key="index", module="index", name="anserini", default_config_overrides={"stemmer": "none"}),
            Dependency(key="tokenizer", module="tokenizer", name="anserini"),
        ]
        config_spec = [
            ConfigOption("embeddings", "glove6b"),
            ConfigOption("zerounk", False),
            ConfigOption("calcidf", True),
            ConfigOption("maxqlen", 4),
            ConfigOption("maxdoclen", 800),
            ConfigOption("usecache", False),
        ]
Exemplo n.º 9
0
 class IndexAnserini(ModuleBase):
     module_type = "index"
     module_name = "anserini"
     dependencies = [
         Dependency(key="collection", module="collection", name="robust04")
     ]
     config_spec = [
         ConfigOption(key="stemmer",
                      default_value="porter",
                      description="stemming")
     ]
Exemplo n.º 10
0
 class AFoo(ModuleTypeA):
     module_name = "AFoo"
     config_spec = [
         ConfigOption(key="foo1",
                      default_value="val1",
                      description="test option"),
         ConfigOption(key="changethis",
                      default_value=0,
                      description="something to override"),
     ]
     dependencies = [
         Dependency(key="myfoobar", module="Atype", name="AFooBar")
     ]
Exemplo n.º 11
0
 class BenchmarkTRECDL(ModuleBase):
     module_type = "benchmark"
     module_name = "trecdl"
     dependencies = [
         Dependency(key="collection", module="collection", name="msmarco")
     ]
Exemplo n.º 12
0
 class BenchmarkRob04(ModuleBase):
     module_type = "benchmark"
     module_name = "rob04yang"
     dependencies = [
         Dependency(key="collection", module="collection", name="robust04")
     ]