ads.model.model_artifact_boilerplate.artifact_introspection_test package#

Submodules#

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate module#

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.check_mandatory_files(files_present) Tuple[bool, str][source]#

Check if score.py and runtime.yaml are present or not.

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.check_runtime_yml(file_path) Tuple[bool, str][source]#

Check runtime yaml mandatory fields

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.check_score_file(file_path) Tuple[bool, str][source]#

Change current working directory to temporary directory and validate python file

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.combine_msgs(test_list) str[source]#

For a given test_list combine all error_msg if test failed

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.get_object_storage_client()[source]#
ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.get_test_result(test_id) int[source]#

Gives a number based on test result: 0: test was success 1: test failed 2: didn’t run test

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.model_deployment_find_fields(cfg) None[source]#

Recursively checks in MODEL_DEPLOYMENT if INFERENCE_ENV_SLUG, INFERENCE_ENV_TYPE, INFERENCE_ENV_PATH Also saves its value if present.

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.validate_artifact(artifact) Tuple[bool, str][source]#

Unzip the artifact zip file passed. Check for test cases. The method returns the status of check and error message if any. :artifact: str

ads.model.model_artifact_boilerplate.artifact_introspection_test.model_artifact_validate.write_html(output_path) None[source]#

writes an html file to output_path based on TESTS

Module contents#