From 2f19f0cbdca915fc8e198d1689be03f59e9a1250 Mon Sep 17 00:00:00 2001 From: WrathfulSpatula Date: Thu, 16 Jan 2025 10:43:10 -0500 Subject: [PATCH] Smaller batch size default --- FindAFactor/find_a_factor.py | 2 +- find_a_factor | 2 +- pyproject.toml | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FindAFactor/find_a_factor.py b/FindAFactor/find_a_factor.py index 7b87b2c..e944ddb 100644 --- a/FindAFactor/find_a_factor.py +++ b/FindAFactor/find_a_factor.py @@ -17,7 +17,7 @@ def find_a_factor(n, gear_factorization_level=int(os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL') else 11, wheel_factorization_level=int(os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL') else 11, smoothness_bound_multiplier=float(os.environ.get('FINDAFACTOR_SMOOTHNESS_BOUND_MULTIPLIER')) if os.environ.get('FINDAFACTOR_SMOOTHNESS_BOUND_MULTIPLIER') else 1.0, - batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else 8.0): + batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else 2.0): return int(_find_a_factor._find_a_factor(str(n), int(method), node_count, node_id, diff --git a/find_a_factor b/find_a_factor index 99a6cd7..1d30c42 100755 --- a/find_a_factor +++ b/find_a_factor @@ -21,7 +21,7 @@ def main(): gear_factorization_level = int(os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_GEAR_FACTORIZATION_LEVEL') else 11 wheel_factorization_level = int(os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL')) if os.environ.get('FINDAFACTOR_WHEEL_FACTORIZATION_LEVEL') else 11 smoothness_bound_multiplier = float(os.environ.get('FINDAFACTOR_SMOOTHNESS_BOUND_MULTIPLIER')) if os.environ.get('FINDAFACTOR_SMOOTHNESS_BOUND_MULTIPLIER') else 1.0 - batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else 8.0 + batch_size_multiplier=float(os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER')) if os.environ.get('FINDAFACTOR_BATCH_SIZE_MULTIPLIER') else 2.0 if argv_len > 2: method = FactoringMethod(int(sys.argv[2])) diff --git a/pyproject.toml b/pyproject.toml index 9c68447..43f5225 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "FindAFactor" -version = "4.4.0" +version = "4.5.0" requires-python = ">=3.8" description = "Find any nontrivial factor of a number" readme = {file = "README.txt", content-type = "text/markdown"} diff --git a/setup.py b/setup.py index 410126e..8e29d46 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ def build_extension(self, ext): setup( name='FindAFactor', - version='4.4.0', + version='4.5.0', author='Dan Strano', author_email='stranoj@gmail.com', description='Find any nontrivial factor of a number',