import hashlib import json def calculate_hash(experiment_params): params_str = json.dumps(experiment_params, sort_keys=True) return hashlib.sha256(params_str.encode()).hexdigest()