# Path: automlk/dataset.py
# def get_dataset_list(include_results=False):
#     """
#     get the list of all datasets
# 
#     :param include_results: flag to determine if the status are also retrieved (default = False)
#     :return: list of datasets objects or empty list if error (eg. redis or environment not set)
#     """
#     # try:
#     return [get_dataset(dataset_id, include_results) for dataset_id in get_dataset_ids()]
#     # except:
#     #    return []
# 
# Path: automlk/store.py
# def get_key_store(key):
#     """
#     retieves value from key in store
# 
#     :param key: key of the data
#     :return: value of the data
#     """
#     if get_use_redis():
#         return json.loads(rds.get(str(key)))
#     else:
#         try:
#             if exists_key_store(key):
#                 return json.load(open(store_folder + '/' + __clean_key(key) + '.json', 'r'))
#             else:
#                 return None
#         except:
#             return None
# 
# def set_key_store(key, value):
#     """
#     sets value to key in store
# 
#     :param key: key of the data
#     :param value: value of the data to store
#     """
#     if get_use_redis():
#         rds.set(str(key), json.dumps(value))
#     else:
#         with open(store_folder + '/' + __clean_key(key) + '.json', 'w') as f:
#             json.dump(value, f)
# 
# def exists_key_store(key):
#     """
#     checks if a key exists
# 
#     :param key: key of the data
#     :return: True if the key exists else False
#     """
#     if get_use_redis():
#         return rds.exists(str(key))
#     else:
#         return os.path.exists(store_folder + '/' + __clean_key(key) + '.json')


from automlk.dataset import get_dataset_list
from automlk.store import get_key_store, set_key_store, exists_key_store

"""
update results with pct and cv
"""

missing = []

for dt in get_dataset_list():


# Path: automlk/dataset.py
# def get_dataset_list(include_results=False):
#     """
#     get the list of all datasets
# 
#     :param include_results: flag to determine if the status are also retrieved (default = False)
#     :return: list of datasets objects or empty list if error (eg. redis or environment not set)
#     """
#     # try:
#     return [get_dataset(dataset_id, include_results) for dataset_id in get_dataset_ids()]
#     # except:
#     #    return []
# 
# Path: automlk/store.py
# def get_key_store(key):
#     """
#     retieves value from key in store
# 
#     :param key: key of the data
#     :return: value of the data
#     """
#     if get_use_redis():
#         return json.loads(rds.get(str(key)))
#     else:
#         try:
#             if exists_key_store(key):
#                 return json.load(open(store_folder + '/' + __clean_key(key) + '.json', 'r'))
#             else:
#                 return None
#         except:
#             return None
# 
# def set_key_store(key, value):
#     """
#     sets value to key in store
# 
#     :param key: key of the data
#     :param value: value of the data to store
#     """
#     if get_use_redis():
#         rds.set(str(key), json.dumps(value))
#     else:
#         with open(store_folder + '/' + __clean_key(key) + '.json', 'w') as f:
#             json.dump(value, f)
# 
# def exists_key_store(key):
#     """
#     checks if a key exists
# 
#     :param key: key of the data
#     :return: True if the key exists else False
#     """
#     if get_use_redis():
#         return rds.exists(str(key))
#     else:
#         return os.path.exists(store_folder + '/' + __clean_key(key) + '.json')


# Path: scripts/update_pct_cv.py
from automlk.dataset import get_dataset_list
from automlk.store import get_key_store, set_key_store, exists_key_store


"""
update results with pct and cv
"""

missing = []

for dt in get_dataset_list():


    res = get_key_store('dataset:%s:rounds' % dt.dataset_id)