Skip to content

Commit e38dde4

Browse files
committed
test with 1s time out
1 parent 734045e commit e38dde4

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

sdgym/benchmark.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,13 @@ def _score_with_timeout(
577577
process = multiprocessing.Process(target=_score, args=args)
578578
process.start()
579579
process.join(timeout)
580-
if process.is_alive():
580+
process.terminate()
581+
582+
output = dict(output)
583+
if output.get('timeout'):
581584
LOGGER.error('Timeout running %s on dataset %s;', synthesizer['name'], dataset_name)
582-
process.terminate()
583-
return {'timeout': True, 'error': 'Timeout'}
584585

585-
return dict(output)
586+
return output
586587

587588

588589
def _format_output(

sdgym/run_benchmark/run_benchmark.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
OUTPUT_DESTINATION_AWS,
1313
SYNTHESIZERS_SPLIT,
1414
get_result_folder_name,
15+
post_benchmark_launch_message,
1516
)
1617
from sdgym.s3 import get_s3_client, parse_s3_path
1718

@@ -53,11 +54,11 @@ def main():
5354
sdv_datasets=['expedia_hotel_logs', 'fake_companies'],
5455
synthesizers=synthesizer_group,
5556
compute_privacy_score=False,
56-
timeout=345600, # 4 days
57+
timeout=1, # 4 days
5758
)
5859

5960
append_benchmark_run(aws_access_key_id, aws_secret_access_key, date_str)
60-
# post_benchmark_launch_message(date_str)
61+
post_benchmark_launch_message(date_str)
6162

6263

6364
if __name__ == '__main__':

0 commit comments

Comments
 (0)