<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Running on TransTTE</title><link>https://vlzm.github.io/TransTTE/docs/running/</link><description>Recent content in Running on TransTTE</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://vlzm.github.io/TransTTE/docs/running/index.xml" rel="self" type="application/rss+xml"/><item><title>Backend</title><link>https://vlzm.github.io/TransTTE/docs/running/backend/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://vlzm.github.io/TransTTE/docs/running/backend/</guid><description>&lt;h1 id="running-the-backend"&gt;Running the Backend&lt;a class="anchor" href="#running-the-backend"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The backend is the &lt;strong&gt;CPU service + web UI&lt;/strong&gt;. It loads the precomputed edge weights and the
road graphs, answers &lt;code&gt;POST /get_path&lt;/code&gt;, and serves the map at &lt;code&gt;GET /&lt;/code&gt;. See
&lt;a href="https://vlzm.github.io/TransTTE/docs/architecture/backend-service/"&gt;Backend Service&lt;/a&gt; for what it does
internally.&lt;/p&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;Make sure the &lt;a href="https://vlzm.github.io/TransTTE/docs/running/data-assets/"&gt;data assets&lt;/a&gt; are in
&lt;code&gt;backend/app/data/&lt;/code&gt; first — the backend loads graphs, embeddings, and weight pickles at
startup and will fail on a missing file.&lt;/p&gt;
&lt;/blockquote&gt;&lt;h2 id="run-it-directly-python"&gt;Run it directly (Python)&lt;a class="anchor" href="#run-it-directly-python"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The backend is a plain FastAPI app; the entrypoint is
&lt;a href="https://github.com/vlzm/TransTTE/blob/main/backend/start.sh"&gt;&lt;code&gt;start.sh&lt;/code&gt;&lt;/a&gt;, which just
runs the app:&lt;/p&gt;</description></item><item><title>Graphormer</title><link>https://vlzm.github.io/TransTTE/docs/running/graphormer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://vlzm.github.io/TransTTE/docs/running/graphormer/</guid><description>&lt;h1 id="running-graphormer"&gt;Running Graphormer&lt;a class="anchor" href="#running-graphormer"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The Graphormer service is the &lt;strong&gt;GPU side&lt;/strong&gt;: it loads a trained checkpoint per city and
produces one travel-time weight per road-graph edge, served at &lt;code&gt;POST /get_weights&lt;/code&gt;. This is
expensive and normally run &lt;strong&gt;once&lt;/strong&gt; — the backend then consumes the cached result. See
&lt;a href="https://vlzm.github.io/TransTTE/docs/architecture/graphormer-service/"&gt;Graphormer Service&lt;/a&gt; for the
internals.&lt;/p&gt;
&lt;blockquote class='book-hint '&gt;
&lt;p&gt;This service needs a &lt;strong&gt;GPU&lt;/strong&gt; and the trained checkpoints under
&lt;code&gt;graphormer/app/models/{abakan,omsk}/&lt;/code&gt;. Get them from
&lt;a href="https://vlzm.github.io/TransTTE/docs/running/data-assets/"&gt;Data Assets&lt;/a&gt; first.&lt;/p&gt;
&lt;/blockquote&gt;&lt;h2 id="build-and-run-docker"&gt;Build and run (Docker)&lt;a class="anchor" href="#build-and-run-docker"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Docker is the recommended path — the dependency stack (torch 1.9.1+cu111,
torch-geometric 1.7.2, dgl 0.7.2, and a source build of fairseq) is finicky to reproduce by
hand. The &lt;a href="https://github.com/vlzm/TransTTE/blob/main/graphormer/Dockerfile"&gt;&lt;code&gt;Dockerfile&lt;/code&gt;&lt;/a&gt;
installs the pinned packages and runs
&lt;a href="https://github.com/vlzm/TransTTE/blob/main/graphormer/app/install.sh"&gt;&lt;code&gt;install.sh&lt;/code&gt;&lt;/a&gt;,
which clones and source-builds &lt;strong&gt;fairseq&lt;/strong&gt; into &lt;code&gt;graphormer_repo/&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Data Assets</title><link>https://vlzm.github.io/TransTTE/docs/running/data-assets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://vlzm.github.io/TransTTE/docs/running/data-assets/</guid><description>&lt;h1 id="data-assets"&gt;Data Assets&lt;a class="anchor" href="#data-assets"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Neither service runs without large binary assets that are &lt;strong&gt;not in git&lt;/strong&gt; — they are
downloaded separately. When a load fails, it is almost always a &lt;strong&gt;missing or renamed asset&lt;/strong&gt;
under &lt;code&gt;data/&lt;/code&gt; or &lt;code&gt;models/&lt;/code&gt;, not a code bug. File paths are hardcoded relative to each
script&amp;rsquo;s location.&lt;/p&gt;
&lt;h2 id="what-to-download"&gt;What to download&lt;a class="anchor" href="#what-to-download"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Bundle&lt;/th&gt;
					&lt;th&gt;Download&lt;/th&gt;
					&lt;th&gt;Extract to&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Backend data&lt;/td&gt;
					&lt;td&gt;&lt;a href="https://disk.yandex.ru/d/NHj3ukteUGn-dA"&gt;Yandex.Disk&lt;/a&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;backend/app/data/&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Graphormer models&lt;/td&gt;
					&lt;td&gt;&lt;a href="https://disk.yandex.ru/d/rQCIJs_7Q7Li6g"&gt;Yandex.Disk&lt;/a&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;graphormer/app/models/&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="backend-data-backendappdata"&gt;Backend data (&lt;code&gt;backend/app/data/&lt;/code&gt;)&lt;a class="anchor" href="#backend-data-backendappdata"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;File / folder&lt;/th&gt;
					&lt;th&gt;What it is&lt;/th&gt;
					&lt;th&gt;Used by&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;SimpleTTE.pth&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;FFNet&lt;/code&gt; weights (152-input feed-forward net)&lt;/td&gt;
					&lt;td&gt;Neural ETA (Abakan non-Graphormer)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;dijkstra.pickle&lt;/code&gt;, &lt;code&gt;graph_omsk.pkl&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;igraph road graphs&lt;/td&gt;
					&lt;td&gt;Shortest-path routing&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;clear_nodes.pkl&lt;/code&gt;, &lt;code&gt;clear_nodes_omsk.pkl&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Node coordinate tables&lt;/td&gt;
					&lt;td&gt;Snapping endpoints to nodes (&lt;code&gt;BallTree&lt;/code&gt;)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;balltree.pkl&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Prebuilt haversine &lt;code&gt;BallTree&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Nearest-node lookup&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;dgi_*.csv&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;DGI + GraphSAGE node embeddings&lt;/td&gt;
					&lt;td&gt;Neural ETA feature vector&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;meteoData.csv&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Weather data&lt;/td&gt;
					&lt;td&gt;Neural ETA feature vector&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;graphormer_weights/&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;weights_abakan.pickle&lt;/code&gt;, &lt;code&gt;weights_omsk.pickle&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;graphormer_weights&lt;/code&gt; route variant&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;weights_abakan/&lt;/code&gt;, &lt;code&gt;weights_omsk/&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Per-objective &lt;code&gt;*.pkl&lt;/code&gt; weight lists (dist / green / hist / …)&lt;/td&gt;
					&lt;td&gt;One route &lt;code&gt;type&lt;/code&gt; each&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Each file in &lt;code&gt;weights_{city}/&lt;/code&gt; is an &lt;strong&gt;edge-aligned weight list&lt;/strong&gt; that becomes a separate
routing objective in the &lt;code&gt;/get_path&lt;/code&gt; response — see
&lt;a href="https://vlzm.github.io/TransTTE/docs/architecture/routing-objectives/"&gt;Routing Objectives&lt;/a&gt;. The
&lt;code&gt;graphormer_weights/&lt;/code&gt; pickles are the output of the
&lt;a href="https://vlzm.github.io/TransTTE/docs/running/graphormer/"&gt;Graphormer service&lt;/a&gt;; the ordering must match the
graph&amp;rsquo;s edge order (the &lt;a href="https://vlzm.github.io/TransTTE/docs/architecture/weight-contract/"&gt;weight contract&lt;/a&gt;).&lt;/p&gt;</description></item></channel></rss>