Skip to content

Commit 562d2d1

Browse files
committed
clean runnning part
1 parent 038584e commit 562d2d1

File tree

7 files changed

+8
-77
lines changed

7 files changed

+8
-77
lines changed

.github/workflows/run_benchmark_multi_table.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ on:
44
workflow_dispatch:
55
schedule:
66
- cron: '0 5 1 * *'
7-
push:
8-
branches:
9-
- issue-516-add-workflows
107

118
jobs:
12-
run-sdgym-benchmark:
9+
run-sdgym-multi-table-benchmark:
1310
runs-on: ubuntu-latest
1411

1512
steps:
@@ -31,15 +28,12 @@ jobs:
3128
source venv/bin/activate
3229
3330
python -m pip install --upgrade pip
34-
python -m pip install invoke tomli packaging
35-
invoke install-sdv-enterprise
31+
python -m pip install sdv-enterprise --index-url "https://${USERNAME}:${LICENSE_KEY}@pypi.datacebo.com"
3632
python -m pip install "sdgym[all] @ git+https://github.com/sdv-dev/SDGym.git@issue-516-add-workflows"
3733
3834
echo "VIRTUAL_ENV=$(pwd)/venv" >> $GITHUB_ENV
3935
echo "$(pwd)/venv/bin" >> $GITHUB_PATH
4036
41-
- name: Stop workflow after dependency install (temporary)
42-
run: exit 0
4337
- name: Run SDGym Benchmark
4438
env:
4539
GCP_SERVICE_ACCOUNT_JSON: ${{ secrets.GCP_SERVICE_ACCOUNT_JSON }}

.github/workflows/run_benchmark_single_table.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- cron: '0 5 1 * *'
77

88
jobs:
9-
run-sdgym-benchmark:
9+
run-sdgym-single-table-benchmark:
1010
runs-on: ubuntu-latest
1111

1212
steps:
@@ -28,7 +28,6 @@ jobs:
2828
source venv/bin/activate
2929
3030
python -m pip install --upgrade pip
31-
python -m pip install invoke tomli packaging
3231
python -m pip install sdv-enterprise --index-url "https://${USERNAME}:${LICENSE_KEY}@pypi.datacebo.com"
3332
python -m pip install "sdgym[all] @ git+https://github.com/sdv-dev/SDGym.git@issue-516-add-workflows"
3433

.github/workflows/upload_benchmark_results_multi_table.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- issue-516-add-workflows
1414

1515
jobs:
16-
upload-sdgym-benchmark:
16+
upload-sdgym-multi-table-benchmark:
1717
runs-on: ubuntu-latest
1818

1919
steps:

.github/workflows/upload_benchmark_results_single_table.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- cron: '0 6 * * *'
1111

1212
jobs:
13-
upload-sdgym-benchmark:
13+
upload-sdgym-single-table-benchmark:
1414
runs-on: ubuntu-latest
1515

1616
steps:

sdgym/run_benchmark/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
from sdgym.s3 import parse_s3_path
1212

13-
OUTPUT_DESTINATION_AWS = (
14-
's3://sdgym-benchmark/Debug/GCP_Github/' # 's3://sdgym-benchmark/Benchmarks/'
15-
)
13+
OUTPUT_DESTINATION_AWS = 's3://sdgym-benchmark/Benchmarks/'
1614
UPLOAD_DESTINATION_AWS = 's3://sdgym-benchmark/Debug/GCP/'
1715
DEBUG_SLACK_CHANNEL = 'sdv-alerts-debug'
1816
SLACK_CHANNEL = 'sdv-alerts'
@@ -104,7 +102,7 @@ def post_slack_message(channel, text):
104102

105103
def post_benchmark_launch_message(date_str, compute_service='AWS', modality='single_table'):
106104
"""Post a message to the SDV Alerts Slack channel when the benchmark is launched."""
107-
channel = DEBUG_SLACK_CHANNEL
105+
channel = SLACK_CHANNEL
108106
folder_name = get_result_folder_name(date_str)
109107
bucket, prefix = parse_s3_path(OUTPUT_DESTINATION_AWS)
110108
url_link = get_s3_console_link(bucket, f'{prefix}{modality}/{folder_name}/')
@@ -116,7 +114,7 @@ def post_benchmark_launch_message(date_str, compute_service='AWS', modality='sin
116114

117115
def post_benchmark_uploaded_message(folder_name, commit_url=None, modality='single_table'):
118116
"""Post benchmark uploaded message to sdv-alerts slack channel."""
119-
channel = DEBUG_SLACK_CHANNEL
117+
channel = SLACK_CHANNEL
120118
bucket, prefix = parse_s3_path(OUTPUT_DESTINATION_AWS)
121119
modality_text = modality.replace('_', '-')
122120
url_link = get_s3_console_link(bucket, quote_plus(f'{prefix}{modality}/SDGym Monthly Run.xlsx'))

tasks.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -218,25 +218,3 @@ def notify_sdgym_benchmark_uploaded(c, folder_name, commit_url=None, modality='s
218218
from sdgym.run_benchmark.utils import post_benchmark_uploaded_message
219219

220220
post_benchmark_uploaded_message(folder_name, commit_url, modality)
221-
222-
223-
@task
224-
def install_sdv_enterprise(c, username=None, license_key=None):
225-
"""Install sdv-enterprise using sdv-installer if credentials are available."""
226-
# 🔹 Import here to avoid triggering sdgym imports at load time
227-
from sdgym._benchmark.credentials_utils import sdv_install_cmd
228-
229-
username = username or os.getenv("SDV_ENTERPRISE_USERNAME")
230-
license_key = license_key or os.getenv("SDV_ENTERPRISE_LICENSE_KEY")
231-
credentials = {
232-
"sdv": {
233-
"username": username,
234-
"license_key": license_key,
235-
}
236-
}
237-
238-
install_cmd = sdv_install_cmd(credentials)
239-
if install_cmd:
240-
c.run(install_cmd)
241-
else:
242-
print("No sdv-enterprise credentials found. Skipping installation.")

tests/test_tasks.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
"""Tests for the ``tasks.py`` file."""
22

3-
from unittest.mock import Mock, patch
4-
53
from tasks import (
64
_get_extra_dependencies,
75
_get_minimum_versions,
86
_resolve_version_conflicts,
9-
install_sdv_enterprise,
107
)
118

129

@@ -212,38 +209,3 @@ def test__resolve_version_conflicts_pointing_to_branch():
212209
'rdt==1.1.2',
213210
'copulas==0.12.0',
214211
])
215-
216-
217-
@patch('sdgym._benchmark.credentials_utils.sdv_install_cmd')
218-
def test_install_sdv_enterprise(mock_sdv_install_cmd):
219-
"""Test the `install_sdv_enterprise` task."""
220-
# Setup
221-
username = 'test_user'
222-
license_key = 'test_license_key'
223-
mock_context = Mock()
224-
mock_sdv_install_cmd.return_value = 'install command'
225-
226-
# Run
227-
install_sdv_enterprise.body(mock_context, username=username, license_key=license_key)
228-
229-
# Assert
230-
mock_sdv_install_cmd.assert_called_once_with({
231-
'sdv': {
232-
'username': username,
233-
'license_key': license_key,
234-
}
235-
})
236-
mock_context.run.assert_called_once_with('install command')
237-
238-
239-
def test_install_sdv_enterprise_no_credentials(capsys):
240-
"""Test the `install_sdv_enterprise` task without credentials."""
241-
# Setup
242-
mock_context = Mock()
243-
244-
# Run
245-
install_sdv_enterprise.body(mock_context)
246-
247-
# Assert
248-
captured = capsys.readouterr()
249-
assert 'No sdv-enterprise credentials found. Skipping installation.' in captured.out

0 commit comments

Comments
 (0)