Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug macos tests #291

Merged
merged 56 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5bfddeb
debug macos tests
robsdavis Sep 9, 2024
7fae6eb
update workflows
robsdavis Sep 9, 2024
d1950b0
update workflows
robsdavis Sep 9, 2024
aa64587
update workflows
robsdavis Sep 9, 2024
ccadcc9
update workflows
robsdavis Sep 9, 2024
3de0b45
update workflows
robsdavis Sep 9, 2024
b5ba281
update workflows
robsdavis Sep 9, 2024
ebf72fc
update reduction test params
robsdavis Sep 9, 2024
e189e7f
update reduction test params
robsdavis Sep 9, 2024
05430ce
update workflows
robsdavis Sep 9, 2024
36cc366
update workflows
robsdavis Sep 10, 2024
d5dfb9e
update workflows
robsdavis Sep 10, 2024
ff5da02
update workflows
robsdavis Sep 10, 2024
7630240
update workflows
robsdavis Sep 10, 2024
26e12ab
update workflows
robsdavis Sep 10, 2024
929541a
update conftest
robsdavis Sep 10, 2024
95efe54
update conftest
robsdavis Sep 10, 2024
2a6ca05
update conftest
robsdavis Sep 10, 2024
00f4ef7
update conftest
robsdavis Sep 10, 2024
db0dacf
update conftest
robsdavis Sep 10, 2024
9d77c3f
mark test_attacks directly
robsdavis Sep 10, 2024
c6da10c
skip tests for mac
robsdavis Sep 10, 2024
c456018
skip tests for mac
robsdavis Sep 10, 2024
1a46bf0
skip tests for mac
robsdavis Sep 10, 2024
582ae36
increase timeout length
robsdavis Sep 10, 2024
013a0c1
check cuda
robsdavis Sep 10, 2024
3e81948
edit yml
robsdavis Sep 10, 2024
9040bb8
edit yml
robsdavis Sep 10, 2024
c3f9fb3
edit yml
robsdavis Sep 10, 2024
d6bda07
multi macos runners print cuda in first test
robsdavis Sep 11, 2024
104275f
update yml
robsdavis Sep 11, 2024
4312295
update yml
robsdavis Sep 11, 2024
165591e
update yml
robsdavis Sep 11, 2024
ae5704f
update yml
robsdavis Sep 11, 2024
1ce3ddb
skip slow tests for macos
robsdavis Sep 11, 2024
1728d8c
increase timeout
robsdavis Sep 11, 2024
365272e
old macos only
robsdavis Sep 12, 2024
fa0d313
shorten timeout
robsdavis Sep 12, 2024
8c0fe5b
shorten timeout
robsdavis Sep 12, 2024
03cba21
alternative mnist download
robsdavis Sep 12, 2024
bdcae6d
run with debug logging
robsdavis Sep 12, 2024
43dcad2
use macos-13 only
robsdavis Sep 12, 2024
67a58d2
pip xgboost for macos
robsdavis Sep 13, 2024
36911d2
remove debug logging attempt
robsdavis Sep 13, 2024
8f92254
pin xgboost
robsdavis Sep 13, 2024
4380b4a
pin xgboost in setup
robsdavis Sep 13, 2024
c5fb4ba
remove pin update tree_method
robsdavis Sep 13, 2024
191541d
force x86_64 hardware
robsdavis Sep 13, 2024
c443178
force x86_64 hardware
robsdavis Sep 13, 2024
10ad664
force x86_64 hardware
robsdavis Sep 13, 2024
ac60462
fix covnet test issue introduced
robsdavis Sep 13, 2024
28cb835
fix covnet test issue introduced
robsdavis Sep 13, 2024
8423cdb
set macosx deployment target = 10.13
robsdavis Sep 13, 2024
918a664
clean up
robsdavis Sep 13, 2024
5560763
clean up
robsdavis Sep 13, 2024
3133598
clean up
robsdavis Sep 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/test_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
Expand All @@ -47,19 +47,31 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
- name: Install MacOS dependencies
- name: Set libomp environment variables (macOS only)
run: |
brew install libomp
if: ${{ matrix.os == 'macos-latest' }}
LIBOMP_PATH="/opt/homebrew/opt/libomp"
echo "LDFLAGS=-L${LIBOMP_PATH}/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I${LIBOMP_PATH}/include" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=${LIBOMP_PATH}/lib:\$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
echo "OMP_PATH=${LIBOMP_PATH}/include" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -r prereq.txt
- name: Limit OpenMP threads (Critical for macOS else it can hang without error)
run: |
echo "OMP_NUM_THREADS=2" >> $GITHUB_ENV
- name: Test Core
run: |
pip install .[testing]
pip freeze
pytest -vvvsx -m "not slow" --durations=50
- name: Set macOS deployment target
run: |
echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
- name: Test GOGGLE
run: |
pip install .[testing,goggle]
Expand Down
1 change: 1 addition & 0 deletions src/synthcity/metrics/eval_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ def evaluate(

elif self._task_type == "classification":
model = XGBClassifier(
tree_method="approx",
n_jobs=2,
verbosity=0,
depth=3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def _fit(
raise ValueError(f"unsupported strategy {self.strategy}")

xgb_params = {
"tree_method": "approx",
"n_jobs": 2,
"verbosity": 0,
"depth": 3,
Expand Down
7 changes: 6 additions & 1 deletion src/synthcity/utils/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ def compress_dataset(
y = df[column]

if len(df[column].unique()) < cat_limit:
model = XGBClassifier()
model = model = XGBClassifier(
tree_method="approx",
n_jobs=2,
verbosity=0,
depth=3,
)
try:
score = evaluate_classifier(model, X, y)["clf"]["aucroc"][0]
except BaseException:
Expand Down
3 changes: 2 additions & 1 deletion tests/metrics/test_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ def test_detect_synth_timeseries(test_plugin: Plugin, evaluator_t: Type) -> None
assert evaluator.direction() == "minimize"


@pytest.mark.skipif(sys.platform == "linux", reason="Linux only for faster results")
@pytest.mark.skipif(sys.platform != "linux", reason="Linux only for faster results")
@pytest.mark.slow_1
@pytest.mark.slow
def test_image_support_detection() -> None:

dataset = datasets.MNIST(".", download=True)

X1 = ImageDataLoader(dataset).sample(100)
Expand Down
Loading