DEHB#
DEHBBase(cs=None, f=None, dimensions=None, mutation_factor=None, crossover_prob=None, strategy=None, min_budget=None, max_budget=None, eta=None, min_clip=None, max_clip=None, boundary_fix_type='random', max_age=np.inf, **kwargs)
#
Source code in src/dehb/optimizers/dehb.py
get_next_iteration(iteration)
#
Computes the Successive Halving spacing
Given the iteration index, computes the budget spacing to be used and the number of configurations to be used for the SH iterations.
Parameters#
iteration : int Iteration index clip : int, {1, 2, 3, ..., None} If not None, clips the minimum number of configurations to 'clip'
Returns#
ns : array budgets : array
Source code in src/dehb/optimizers/dehb.py
get_incumbents()
#
Returns a tuple of the (incumbent configuration, incumbent score/fitness).
DEHB(cs=None, f=None, dimensions=None, mutation_factor=0.5, crossover_prob=0.5, strategy='rand1_bin', min_budget=None, max_budget=None, eta=3, min_clip=None, max_clip=None, configspace=True, boundary_fix_type='random', max_age=np.inf, n_workers=None, client=None, async_strategy='immediate', **kwargs)
#
Bases: DEHBBase
Source code in src/dehb/optimizers/dehb.py
__getstate__()
#
Allows the object to picklable while having Dask client as a class attribute.
Source code in src/dehb/optimizers/dehb.py
__del__()
#
distribute_gpus()
#
Function to create a GPU usage tracker dict.
The idea is to extract the exact GPU device IDs available. During job submission, each submitted job is given a preference of a GPU device ID based on the GPU device with the least number of active running jobs. On retrieval of the result, this gpu usage dict is updated for the device ID that the finished job was mapped to.
Source code in src/dehb/optimizers/dehb.py
clean_inactive_brackets()
#
Removes brackets from the active list if it is done as communicated by Bracket Manager
Source code in src/dehb/optimizers/dehb.py
is_worker_available(verbose=False)
#
Checks if at least one worker is available to run a job
Source code in src/dehb/optimizers/dehb.py
submit_job(job_info, **kwargs)
#
Asks a free worker to run the objective function on config and budget
Source code in src/dehb/optimizers/dehb.py
run(fevals=None, brackets=None, total_cost=None, single_node_with_gpus=False, verbose=False, debug=False, save_intermediate=True, save_history=True, name=None, **kwargs)
#
Main interface to run optimization by DEHB
This function waits on workers and if a worker is free, asks for a configuration and a budget to evaluate on and submits it to the worker. In each loop, it checks if a job is complete, fetches the results, carries the necessary processing of it asynchronously to the worker computations.
The duration of the DEHB run can be controlled by specifying one of 3 parameters. If more than one are specified, DEHB selects only one in the priority order (high to low): 1) Number of function evaluations (fevals) 2) Number of Successive Halving brackets run under Hyperband (brackets) 3) Total computational cost (in seconds) aggregated by all function evaluations (total_cost)
Source code in src/dehb/optimizers/dehb.py
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 |
|