# Path: clustertools/datacube.py
# def build_datacube(exp_name, storage_factory=PickleStorage, force=True,
#                    autopacking=False, **default_meta):
#     """
#     default_meta: mapping str -> str
#         The (potientially) missing metadata
#     """
#     storage = storage_factory(experiment_name=exp_name)
#     parameters_ls, results_ls = storage.load_params_and_results(**default_meta)
#     return Datacube(parameters_ls, results_ls, exp_name, force=force,
#                     autopacking=autopacking)


import time
from clustertools import build_datacube
# -*- coding: utf-8 -*-
#!/usr/bin/env python

"""
This result example is dedicated to the script `009_saving_progress.py`. Make
sure you are running that one simultaneously.

There is nothing to learn from this example. It is just there to show the effect
of partial saving
"""


if __name__ == '__main__':
    exp_name = 'BasicUsagePartialSave'

    mask = "{:15} {:15}"
    print(mask.format("Iter. #", "Root value"))

    for _ in range(100):

# Path: clustertools/datacube.py
# def build_datacube(exp_name, storage_factory=PickleStorage, force=True,
#                    autopacking=False, **default_meta):
#     """
#     default_meta: mapping str -> str
#         The (potientially) missing metadata
#     """
#     storage = storage_factory(experiment_name=exp_name)
#     parameters_ls, results_ls = storage.load_params_and_results(**default_meta)
#     return Datacube(parameters_ls, results_ls, exp_name, force=force,
#                     autopacking=autopacking)


# Path: examples/009_partial_results.py
import time
from clustertools import build_datacube

# -*- coding: utf-8 -*-
#!/usr/bin/env python

"""
This result example is dedicated to the script `009_saving_progress.py`. Make
sure you are running that one simultaneously.

There is nothing to learn from this example. It is just there to show the effect
of partial saving
"""


if __name__ == '__main__':
    exp_name = 'BasicUsagePartialSave'

    mask = "{:15} {:15}"
    print(mask.format("Iter. #", "Root value"))

    for _ in range(100):

        cube = build_datacube(exp_name)