prain: span profiler with flame graphs (PRAIN_PROFILE: engine step, every model module, MoE route/plan/copy/round, call counts; python -m prain.profile); prain web --host
This commit is contained in:
@@ -61,6 +61,13 @@ class Cli(TmpCase):
|
||||
main(["serve", config, "/models/m", "--", "--max-num-seqs=4"])
|
||||
execvp.assert_not_called()
|
||||
|
||||
def test_web_binds_the_host_it_is_given(self):
|
||||
with mock.patch("prain.web.serve") as web:
|
||||
main(["web", "--port", "8081"])
|
||||
self.assertEqual(web.call_args.kwargs["host"], "127.0.0.1")
|
||||
main(["web", "--host", "0.0.0.0"])
|
||||
self.assertEqual(web.call_args.kwargs["host"], "0.0.0.0")
|
||||
|
||||
def test_synth_sim_and_tune(self):
|
||||
hf = self.write("config.json", json.dumps(GEMMA4))
|
||||
trace = os.path.join(self.dir, "trace.jsonl.gz")
|
||||
|
||||
Reference in New Issue
Block a user