syne_tune.blackbox_repository.conversion_scripts.utils module

syne_tune.blackbox_repository.conversion_scripts.utils.s3_blackbox_folder(s3_root=None)[source]
syne_tune.blackbox_repository.conversion_scripts.utils.get_sub_directory_and_name(name)[source]

Blackboxes are either stored under “{blackbox-repository}/{name}” (such as fcnet, nas201, …) or “{blackbox-repository}/{subdir}/{subname}” for all yahpo benchmark. In the Yahpo case, “yahpo-rbv2_xgboost” is for instance stored on “{blackbox-repository}/yahpo/rbv2_xgboost/”. :type name: str :param name: name of the blackbox, for instance “fcnet”, “lcbench” or “yahpo-rbv2_xgboost”. :return: subdirectory and subname such that the blackbox should be stored on {blackbox_repository}/{subdir}/{name}.

syne_tune.blackbox_repository.conversion_scripts.utils.blackbox_local_path(name)[source]
Return type:

Path

syne_tune.blackbox_repository.conversion_scripts.utils.blackbox_s3_path(name, s3_root=None)[source]
Return type:

Path

syne_tune.blackbox_repository.conversion_scripts.utils.upload_blackbox(name, s3_root=None)[source]

Uploads a blackbox locally present in repository_path to S3. :type name: str :param name: folder must be available in repository_path/name

syne_tune.blackbox_repository.conversion_scripts.utils.download_file(source, destination)[source]
syne_tune.blackbox_repository.conversion_scripts.utils.compute_hash_binary(filename)[source]
syne_tune.blackbox_repository.conversion_scripts.utils.compute_hash_benchmark(tgt_folder)[source]
syne_tune.blackbox_repository.conversion_scripts.utils.validate_hash(tgt_folder, original_hash)[source]

Computes hash of the files in tgt_folder and validates it with the original hash :type tgt_folder: :param tgt_folder: target folder that contains the files of the original benchmark :type original_hash: :param original_hash: original sha256 hash :return: