Skip to content

Commit 5842fcd

Browse files
committed
cleaning 516 jan
1 parent 28cd25d commit 5842fcd

File tree

9 files changed

+12
-25
lines changed

9 files changed

+12
-25
lines changed

.github/workflows/run_benchmark.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ on:
66
modality:
77
required: true
88
type: string
9-
sdgym_ref:
10-
required: false
11-
type: string
12-
default: issue-516-add-workflows
139
secrets:
1410
SDV_ENTERPRISE_USERNAME:
1511
required: true
@@ -55,8 +51,7 @@ jobs:
5551
license_key='${LICENSE_KEY}',
5652
package='sdv-enterprise',
5753
)
58-
"
59-
python -m pip install "sdgym[all] @ git+https://github.com/sdv-dev/SDGym.git@${{ inputs.sdgym_ref }}"
54+
python -m pip install sdgym[all]
6055
6156
echo "VIRTUAL_ENV=$(pwd)/venv" >> $GITHUB_ENV
6257
echo "$(pwd)/venv/bin" >> $GITHUB_PATH

.github/workflows/run_benchmark_multi_table.yaml

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

118
jobs:
129
call-run-sdgym-benchmark:

.github/workflows/run_benchmark_single_table.yml

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

118
jobs:
129
call-run-sdgym-benchmark:

.github/workflows/upload_benchmark_results_multi_table.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
workflow_dispatch:
88
schedule:
99
- cron: "0 6 * * *"
10-
push:
11-
branches:
12-
- issue-516-add-workflows
1310

1411
jobs:
1512
call-upload-benchmark-results:

sdgym/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ def _get_user_data_script(access_key, secret_key, region_name, script_content):
16441644
16451645
echo "======== Install Dependencies in venv ============"
16461646
pip install --upgrade pip
1647-
pip install "sdgym[all] @ git+https://github.com/sdv-dev/SDGym.git@feature_branch/mutli_table_benchmark"
1647+
pip install sdgym[all]
16481648
pip install s3fs
16491649
16501650
echo "======== Write Script ==========="

sdgym/run_benchmark/upload_benchmark_results.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
'Column': 'top center',
3535
'CopulaGAN': 'top center',
3636
'RealTabFormer': 'bottom center',
37+
'HSA': 'bottom center',
38+
'Independent': 'top center',
3739
}
3840
RESULT_FILENAME = 'SDGym Monthly Run.xlsx'
3941

sdgym/run_benchmark/utils.py

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

1111
from sdgym.s3 import parse_s3_path
1212

13-
OUTPUT_DESTINATION_AWS = 's3://sdgym-benchmark/Debug/GCP_Github_2/'
14-
UPLOAD_DESTINATION_AWS = 's3://sdgym-benchmark/Debug/GCP/'
13+
OUTPUT_DESTINATION_AWS = 's3://sdgym-benchmark/Benchmarks/'
1514
DEBUG_SLACK_CHANNEL = 'sdv-alerts-debug'
1615
SLACK_CHANNEL = 'sdv-alerts'
1716
KEY_DATE_FILE = '_BENCHMARK_DATES.json'
@@ -49,7 +48,7 @@
4948
]
5049
MODALITY_TO_GDRIVE_LINK = {
5150
'single_table': 'https://docs.google.com/spreadsheets/d/1W3tsGOOtbtTw3g0EVE0irLgY_TN_cy2W4ONiZQ57OPo/edit?usp=sharing',
52-
'multi_table': 'https://docs.google.com/spreadsheets/d/1R13RktVvKnxRecYIge07OBpbX1vbEkE2D1_2idNAKSY/edit?usp=sharing',
51+
'multi_table': 'https://docs.google.com/spreadsheets/d/1srmXx2ddq025hqzAE4JRdebuoBfro_7wbgeUHUkMEMM/edit?usp=sharing',
5352
}
5453

5554
# The synthesizers inside the same list will be run by the same ec2 instance
@@ -102,7 +101,7 @@ def post_slack_message(channel, text):
102101

103102
def post_benchmark_launch_message(date_str, compute_service='AWS', modality='single_table'):
104103
"""Post a message to the SDV Alerts Slack channel when the benchmark is launched."""
105-
channel = DEBUG_SLACK_CHANNEL
104+
channel = SLACK_CHANNEL
106105
folder_name = get_result_folder_name(date_str)
107106
bucket, prefix = parse_s3_path(OUTPUT_DESTINATION_AWS)
108107
url_link = get_s3_console_link(bucket, f'{prefix}{modality}/{folder_name}/')
@@ -114,7 +113,7 @@ def post_benchmark_launch_message(date_str, compute_service='AWS', modality='sin
114113

115114
def post_benchmark_uploaded_message(folder_name, commit_url=None, modality='single_table'):
116115
"""Post benchmark uploaded message to sdv-alerts slack channel."""
117-
channel = DEBUG_SLACK_CHANNEL
116+
channel = SLACK_CHANNEL
118117
bucket, prefix = parse_s3_path(OUTPUT_DESTINATION_AWS)
119118
modality_text = modality.replace('_', '-')
120119
url_link = get_s3_console_link(bucket, quote_plus(f'{prefix}{modality}/SDGym Monthly Run.xlsx'))

tests/unit/run_benchmark/test_upload_benchmark_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def test_upload_results(
195195
'10_01_2023_Detailed_results': 'results',
196196
'10_01_2023_plot_data': 'df_to_plot',
197197
}
198-
local_path = str(Path('/tmp/sdgym_results/SDGym Monthly Run.xlsx'))
198+
local_path = str(Path('/tmp/sdgym_results/[single_table] SDGym Monthly Run.xlsx'))
199199
mock_extract_google_file_id.return_value = 'google_file_id'
200200

201201
# Run

tests/unit/run_benchmark/test_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_post_benchmark_launch_message(
107107
mock_get_s3_console_link.assert_called_once_with(
108108
'my-bucket', f'my-prefix/single_table/{folder_name}/'
109109
)
110-
mock_post_slack_message.assert_called_once_with('sdv-alerts-debug', expected_body)
110+
mock_post_slack_message.assert_called_once_with('sdv-alerts', expected_body)
111111

112112

113113
@patch('sdgym.run_benchmark.utils.post_slack_message')
@@ -135,7 +135,7 @@ def test_post_benchmark_uploaded_message(
135135
post_benchmark_uploaded_message(folder_name)
136136

137137
# Assert
138-
mock_post_slack_message.assert_called_once_with('sdv-alerts-debug', expected_body)
138+
mock_post_slack_message.assert_called_once_with('sdv-alerts', expected_body)
139139
mock_parse_s3_path.assert_called_once_with(OUTPUT_DESTINATION_AWS)
140140
mock_get_s3_console_link.assert_called_once_with(
141141
'my-bucket', 'my-prefix%2Fsingle_table%2FSDGym+Monthly+Run.xlsx'
@@ -169,7 +169,7 @@ def test_post_benchmark_uploaded_message_with_commit(
169169
post_benchmark_uploaded_message(folder_name, commit_url)
170170

171171
# Assert
172-
mock_post_slack_message.assert_called_once_with('sdv-alerts-debug', expected_body)
172+
mock_post_slack_message.assert_called_once_with('sdv-alerts', expected_body)
173173
mock_parse_s3_path.assert_called_once_with(OUTPUT_DESTINATION_AWS)
174174
mock_get_s3_console_link.assert_called_once_with(
175175
'my-bucket', 'my-prefix%2Fsingle_table%2FSDGym+Monthly+Run.xlsx'

0 commit comments

Comments
 (0)