ans requires integer
2 changed files+9−4
benchcompress/src/benchcompress/algorithms/ans/__init__.pymodified+4−4View file
@@ -441,7 +441,7 @@ algorithms = [
441441 "encode": lambda x: ans_encode(x),
442442 "decode": lambda x, dtype, shape: ans0_decode(x, dtype, shape),
443443 "description": "ANS compression via simple_ans for efficient data compression.",
444- "tags": ["ANS"],
444+ "tags": ["ANS", "integer"],
445445 "source_file": SOURCE_FILE,
446446 },
447447 {
@@ -450,7 +450,7 @@ algorithms = [
450450 "encode": lambda x: ans_delta_encode(x),
451451 "decode": lambda x, dtype, shape: ans_delta_decode(x, dtype, shape),
452452 "description": "ANS compression via simple_ans with delta encoding for improved compression of sequential data.",
453- "tags": ["ANS", "delta_encoding", "1d"],
453+ "tags": ["ANS", "integer", "delta_encoding", "1d"],
454454 "source_file": SOURCE_FILE,
455455 },
456456 {
@@ -459,7 +459,7 @@ algorithms = [
459459 "encode": lambda x: ans_markov_encode(x),
460460 "decode": lambda x, dtype, shape: ans_markov_decode(x, dtype, shape),
461461 "description": "ANS compression via simple_ans with Markov prediction for exploiting temporal correlations in the data.",
462- "tags": ["ANS", "markov_prediction", "1d"],
462+ "tags": ["ANS", "integer", "markov_prediction", "1d"],
463463 "source_file": SOURCE_FILE,
464464 },
465465 {
@@ -468,7 +468,7 @@ algorithms = [
468468 "encode": lambda x: ans_markov_sparse_encode(x),
469469 "decode": lambda x, dtype, shape: ans_markov_sparse_decode(x, dtype, shape),
470470 "description": "ANS compression via simple_ans with Markov prediction and zero run-length encoding for sparse data.",
471- "tags": ["ANS", "markov_prediction", "zero_rle", "1d"],
471+ "tags": ["ANS", "integer", "markov_prediction", "zero_rle", "1d"],
472472 "source_file": SOURCE_FILE,
473473 },
474474 ]
benchcompress/src/benchcompress/run_benchmarks.pymodified+5−0View file
@@ -48,6 +48,11 @@ def is_compatible(algorithm_tags: List[str], dataset_tags: List[str]) -> bool:
4848 ):
4949 return False
5050
51+ # If algorithm has integer, dataset must have integer
52+ if "integer" in algorithm_tags:
53+ if "integer" not in dataset_tags:
54+ return False
55+
5156 return True
5257
5358