diff --git a/gen.sage b/gen.sage index 67012171d3f41ca28698772b29e7bdc122c8df96..87ebbcc751499c9e9c2ef50fb0facdc74c915943 100644 --- a/gen.sage +++ b/gen.sage @@ -153,11 +153,12 @@ class ResultantsCtx(Name, System): self.n_ctx = IntegerCtx(n, default=3, message="Dimension ?") self.d_ctx = IntegerCtx(d, default=3, message="Degree ?") - dense_ctx = DenseCtx([self.d_ctx.value for _ in range(self.n_ctx.value)]) + dense_ctx = DenseCtx( + [self.d_ctx.value for _ in range(self.n_ctx.value)]) self.ring = dense_ctx.ring variables = list(map(str, self.ring.gens())) self.system = dense_ctx.system - + assert "y" not in variables Cpy = PolynomialRing(CC, names=["y"] + variables) f = Cpy.random_element(degree=self.d_ctx.value, terms=1000) @@ -304,7 +305,8 @@ class LinearHomotopyCtx(Name, Problem): self.target_ctx = TargetCtx(target_type=target_type, default="dense") self.start = URootsCtx( degrees=self.target_ctx.target.get_degrees(), compute_fiber=True) - self.name = "linear" / self.target_ctx.target.name / Path(str(self.start.name).replace("uroots-", "")) + self.name = "linear" / self.target_ctx.target.name / \ + Path(str(self.start.name).replace("uroots-", "")) # compute homotopy try: diff --git a/packages/adaptive b/packages/adaptive new file mode 100755 index 0000000000000000000000000000000000000000..a8d36a327954e29dd2daca108cf9f2e7bbaa9679 Binary files /dev/null and b/packages/adaptive differ diff --git a/run_entries.py b/run_entries.py index fc268fe5d51614ea42e0099d2fbbd2794bee883e..d83e24047e482a11732c152ea9e94677d4cbb70d 100644 --- a/run_entries.py +++ b/run_entries.py @@ -37,6 +37,6 @@ for i, pkg_name in enumerate(pkg_list): print(f"Data {j + 1}/{len(data_list)}") pkg_path = (Path("packages") / Path(f"{pkg_name}")).with_suffix(".py") data_name = Path(data_path) - if not ((Path("benchmarks") / data_name / pkg_name).exists() and args.n): + if not ((Path("benchmarks") / data_name / pkg_name / "info.json").exists() and args.n): subprocess.run(["python3", "runtest.py", str(pkg_path), str(("data" / Path(data_path)).with_suffix(".json"))] + ["--timeout", str(args.timeout)]*( args.timeout != None) + ["--mem", str(args.mem)]*(args.mem != None) + ["--perf"]*args.perf) diff --git a/synthesize.py b/synthesize.py index 7908c31d72452fda091bc1fa839f6be4920cb9c5..c1322e94e53fddf55bc9d8813afa5944aed8eb62 100644 --- a/synthesize.py +++ b/synthesize.py @@ -175,7 +175,10 @@ result_stats = { "minsteps": lambda res: steps_format(min([int(p) for p in res["steplist"] if p is not None])), "maxsteps": lambda res: steps_format(max([int(p) for p in res["steplist"] if p is not None])), "q1steps": lambda res: steps_format(round(numpy.quantile([int(p) for p in res["steplist"] if p is not None], 0.25), 1)), - "q3steps": lambda res: steps_format(round(numpy.quantile([int(p) for p in res["steplist"] if p is not None], 0.75), 1)) + "q3steps": lambda res: steps_format(round(numpy.quantile([int(p) for p in res["steplist"] if p is not None], 0.75), 1)), + "maxprec": lambda res: str(max([int(p) for p in res["maxpreclist"]])), + "meanprec": lambda res: str(numpy.mean([int(p) for p in res["meanpreclist"]])), + "wmeanprec": lambda res: str(numpy.mean([int(p) for p in res["weightedmeanpreclist"]])), } def _table(data, branch, node): @@ -200,7 +203,7 @@ def _table(data, branch, node): # Packages handling if key in ["homotopycontinuation", "algpath", "macaulay2", "sirocco", "adaptive"]: dir = f"benchmarks/{data}/{key}/" - if not os.path.exists(dir): + if not (Path(dir) / "info.json").exists(): return [{"str": "not benchmarked", "w": len(get_leaves(node))}] info_dict = json.load(open(f"{dir}info.json")) diff --git a/tables/all/entries.json b/tables/algpath/entries.json similarity index 100% rename from tables/all/entries.json rename to tables/algpath/entries.json diff --git a/tables/all/table.json b/tables/algpath/table.json similarity index 100% rename from tables/all/table.json rename to tables/algpath/table.json