def test_store_artifacts(store_artifact_locally, copy_from_local_to_remote, data, local_dir, filename, remote_dir, overwrite_remote, keep_local): global mock_local_state global mock_remote_state store_artifacts(store_artifact_locally, copy_from_local_to_remote, data, local_dir, filename, remote_dir, overwrite_remote, keep_local) assert mock_local_state["data"] == mock_remote_state["data"]
loss = get_loss_function(**config["exec"]["get_loss_function"]["params"]) custom_objects = {loss.__name__: loss} else: custom_objects = None print(custom_objects) model = tasks.load_model(load_model=load_model, copy_from_remote_to_local=copy_from_remote_to_local, custom_objects=custom_objects, **config["exec"]["load_model"]) # ### Save (formatted) config tasks.store_artifacts(store_artifact_locally, copy_from_local_to_remote, config, **config["exec"]["save_formatted_config"]["params"]) print("Config stored with following parameters") print_dict(config["exec"]["save_formatted_config"]["params"]) # ### Save Session # ##### Save session info tasks.store_artifacts(store_artifact_locally, copy_from_local_to_remote, evaluation_session, **config["exec"]["save_evaluation_session"]["params"]) print("Session dictionary stored with following parameters") print_dict(config["exec"]["save_evaluation_session"]["params"])