search-engine-stract/scripts/run_dev.py
Mikkel Denker 7ea3dbcca4 [ranking] add a host_centrality_rank and page_centrality_rank signal
it might be easier to score pages based on their rank of the sorted their centralities. for instance the centralities for page A and page B might be very similar numerically, but if a lot of pages are between A and B when looking at the sorted list, the highest ranking page might in reality be a better result than the lower ranking one.

the rankings are calculated using an external sorting algorithm to account for the fact that we might need to sort more nodes than we can feasibly keep in memory at once.
2024-01-05 12:20:24 +01:00

35 lines
822 B
Python
Executable file
Vendored

#!.venv/bin/python3
import argparse
import subprocess
import os
os.environ["LIBTORCH"] = "libtorch"
os.environ["LD_LIBRARY_PATH"] = "libtorch/lib"
os.environ["DYLD_LIBRARY_PATH"] = "libtorch/lib"
parser = argparse.ArgumentParser()
parser.add_argument("--release", action="store_true")
args = parser.parse_args()
if args.release:
os.environ["STRACT_CARGO_ARGS"] = "--release"
processes = []
processes.append(subprocess.Popen(["just", "dev-api"]))
processes.append(subprocess.Popen(["just", "dev-search-server"]))
processes.append(subprocess.Popen(["just", "dev-webgraph"]))
processes.append(subprocess.Popen(["just", "dev-frontend"]))
# kill processes on ctrl-c
import time
while True:
try:
time.sleep(1)
except KeyboardInterrupt:
for p in processes:
p.kill()
break