From 65d3dfe09a392dc9a4834501f035f03ec309872c Mon Sep 17 00:00:00 2001 From: muxator Date: Fri, 6 Sep 2024 14:15:13 +0200 Subject: [PATCH] replace MethodOfMomentsLoss with MinkowskiLoss to see if the problem arises from a different numerical accuracy of MethodOfMomentsLoss between MacOS and other platforms re-enable ubuntu to quickly see if one platform fails and another works (I expect that both are passing now). --- .github/workflows/test.yml | 2 +- examples/main.py | 4 ++-- tests/test_examples/test_main.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index edc4be8e..24e06315 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - os: [macos-latest] + os: [ubuntu-latest, macos-latest] python-version: ["3.12"] timeout-minutes: 30 diff --git a/examples/main.py b/examples/main.py index 859c655b..0b3bf63e 100755 --- a/examples/main.py +++ b/examples/main.py @@ -23,7 +23,7 @@ import models.simple_models as md from black_it.calibrator import Calibrator -from black_it.loss_functions.msm import MethodOfMomentsLoss +from black_it.loss_functions.minkowski import MinkowskiLoss from black_it.samplers.best_batch import BestBatchSampler from black_it.samplers.halton import HaltonSampler from black_it.samplers.random_forest import RandomForestSampler @@ -53,7 +53,7 @@ print("Real data:", real_data) # define a loss - loss = MethodOfMomentsLoss() + loss = MinkowskiLoss() # define the calibration seed calibration_seed = 1 diff --git a/tests/test_examples/test_main.py b/tests/test_examples/test_main.py index 9cbb41e2..6c43d2c3 100644 --- a/tests/test_examples/test_main.py +++ b/tests/test_examples/test_main.py @@ -24,7 +24,7 @@ TRUE_PARAMETERS_STR = "True parameters: [0.2, 0.2, 0.75]" -BEST_PARAMETERS_STR = "Best parameters found: [0.19 0.21 0.68]" +BEST_PARAMETERS_STR = "Best parameters found: [0.11 0.13 0.87]" class TestMainExample(BaseMainExampleTestClass):