Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 8731d8bd authored by GUILLEMOT Alexandre's avatar GUILLEMOT Alexandre
Browse files

add adaptive binary

parent a77f75fa
Branches
No related tags found
No related merge requests found
......@@ -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:
......
File added
......@@ -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)
......@@ -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"))
......
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment