An open source, non-profit web search engine
Put the model in a place where we have access to it in prod
Daoud Clarked67d4590ff44
diff --git a/mwmbl/resources/model.pickle b/mwmbl/resources/model.pickleindex f2b0468..c3f0d5a 100644Binary files a/mwmbl/resources/model.pickle and b/mwmbl/resources/model.pickle differdiff --git a/mwmbl/search_setup.py b/mwmbl/search_setup.pyindex 337417c..700ffc3 100644--- a/mwmbl/search_setup.py+++ b/mwmbl/search_setup.py@@ -7,12 +7,10 @@ from redis import Redisfrom mwmbl.indexer.batch_cache import BatchCachefrom mwmbl.models import DomainSubmission-from mwmbl.rankeval.paths import MODEL_PATHfrom mwmbl.redis_url_queue import RedisURLQueuefrom mwmbl.tinysearchengine.completer import Completerfrom mwmbl.tinysearchengine.indexer import TinyIndex, Documentfrom mwmbl.tinysearchengine.ltr_rank import LTRRanker-from mwmbl.tinysearchengine.rank import HeuristicRanker, HeuristicAndWikiRankerdef get_curated_domains() -> set[str]:@@ -27,7 +25,8 @@ index_path = Path(settings.DATA_PATH) / settings.INDEX_NAMEtiny_index = TinyIndex(item_factory=Document, index_path=index_path)tiny_index.__enter__()-model = pickle.load(open(MODEL_PATH, 'rb'))+model_path = Path(__file__).parent / "resources" / "model.pickle"+model = pickle.load(open(model_path, 'rb'))ranker = LTRRanker(tiny_index, completer, model, 1000, True, 5)batch_cache = BatchCache(Path(settings.DATA_PATH) / settings.BATCH_DIR_NAME)