mirror of
https://github.com/luxfhe/ml-sdk.git
synced 2026-10-30 18:13:04 +00:00
Machine Learning with FHE - fork of Zama Concrete-ML - Built-in FHE-friendly ML models - scikit-learn compatible API - PyTorch model conversion - Quantization-aware training
47 lines
1.0 KiB
Python
47 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
"""Helper script for github actions to combine job statuses"""
|
|
import argparse
|
|
import json
|
|
|
|
RESULTS_TO_DISPLAY_LEVEL = {
|
|
"failure": 0,
|
|
"cancelled": 1,
|
|
"success": 2,
|
|
"skipped": 3,
|
|
}
|
|
|
|
DISPLAY_LEVEL_TO_RESULTS = {val: key for key, val in RESULTS_TO_DISPLAY_LEVEL.items()}
|
|
|
|
|
|
def main(args):
|
|
"""Entry point
|
|
|
|
Args:
|
|
args (List[str]): a list of arguments
|
|
"""
|
|
|
|
need_context_data = None
|
|
with open(args.needs_context_json, encoding="utf-8") as f:
|
|
need_context_data = json.load(f)
|
|
|
|
display_level = min(
|
|
RESULTS_TO_DISPLAY_LEVEL[job_object["result"]] for job_object in need_context_data.values()
|
|
)
|
|
|
|
print(DISPLAY_LEVEL_TO_RESULTS[display_level])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser("Combine github actions statuses", allow_abbrev=False)
|
|
|
|
parser.add_argument(
|
|
"--needs_context_json",
|
|
type=str,
|
|
help="Pass the json file path containing the workflow needs context",
|
|
)
|
|
|
|
cli_args = parser.parse_args()
|
|
|
|
main(cli_args)
|