repo stringlengths 1 99 | file stringlengths 13 215 | code stringlengths 12 59.2M | file_length int64 12 59.2M | avg_line_length float64 3.82 1.48M | max_line_length int64 12 2.51M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
HEBO | HEBO-master/MCBO/tests/optimizers/manual/test_bodi.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 3,607 | 40.953488 | 117 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/manual/test_casmopolitan.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 3,357 | 42.61039 | 117 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/manual/test_combo.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 3,062 | 43.391304 | 117 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/manual/test_cocabo.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 3,703 | 42.576471 | 117 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/manual/test_boss.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 3,068 | 42.225352 | 117 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/non_bo/test_random_search.py | import os
from pathlib import Path
import sys
ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent.parent)
sys.path[0] = ROOT_PROJECT
import torch
from mcbo.task_factory import task_factory
from mcbo.optimizers.random_search import RandomSearch
from mcbo.utils.general_utils import set_random_seed
from mcbo.ut... | 1,122 | 31.085714 | 114 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/non_bo/test_local_search.py | import os
from pathlib import Path
import sys
ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent.parent)
sys.path[0] = ROOT_PROJECT
import torch
from mcbo.optimizers.non_bo.local_search import LocalSearch
from mcbo.utils.plotting_utils import plot_convergence_curve
if __name__ == '__main__':
from mcbo.t... | 1,000 | 33.517241 | 114 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/non_bo/test_mab.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 3,524 | 43.0625 | 119 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/non_bo/test_pymoo_ga.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 4,995 | 43.607143 | 213 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/non_bo/test_genetic_algorithm.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 2,587 | 48.769231 | 117 | py |
HEBO | HEBO-master/MCBO/tests/optimizers/non_bo/test_simulated_annealing.py | import os
import sys
from pathlib import Path
ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent.parent)
sys.path[0] = ROOT_PROJECT
from mcbo.search_space import SearchSpace
from mcbo.tasks import TaskBase
from mcbo.trust_region.random_restart_tr_manager import RandomRestartTrManager
import torch
from mcbo.... | 2,362 | 36.507937 | 112 | py |
HEBO | HEBO-master/MCBO/tests/tasks/test_aig_hyp_task.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 2,115 | 51.9 | 117 | py |
HEBO | HEBO-master/MCBO/tests/tasks/test_antibody_design.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 1,903 | 51.888889 | 117 | py |
HEBO | HEBO-master/MCBO/tests/tasks/test_rna_inverse_fold.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 1,965 | 50.736842 | 117 | py |
HEBO | HEBO-master/MCBO/tests/tasks/test_aig_task.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 2,422 | 45.596154 | 117 | py |
HEBO | HEBO-master/MCBO/tests/tasks/test_mig_task.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 2,015 | 52.052632 | 117 | py |
HEBO | HEBO-master/MCBO/tests/tasks/test_xgboost_opt_task.py | # Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions ... | 1,893 | 51.611111 | 117 | py |
HEBO | HEBO-master/MCBO/mcbo/task_factory.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 4,431 | 39.290909 | 109 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/search_space_eda.py | from typing import List, Dict
import numpy as np
import torch
import pandas as pd
from mcbo.search_space import SearchSpace
from mcbo.tasks.eda_seq_opt.utils.utils_operators import get_seq_operators_pattern
class SearchSpaceEDA(SearchSpace):
def __init__(self, params: List[dict], dtype: torch.dtype, seq_operato... | 2,429 | 46.647059 | 114 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/search_space.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 11,205 | 34.574603 | 115 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/sigmoid_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,297 | 25.413793 | 118 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/nominal_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,389 | 28.875 | 89 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/permutation_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,806 | 25.188406 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/int_exponent_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,315 | 29.473684 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/numeric_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,795 | 24.657143 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/pow_integer_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,179 | 28.863014 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/bool_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,645 | 23.939394 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/step_int_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,180 | 26.2625 | 99 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/pow_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,062 | 26.878378 | 114 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,912 | 21.244186 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/integer_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,845 | 25.371429 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/search_space/params/ordinal_param.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,345 | 28.696203 | 89 | py |
HEBO | HEBO-master/MCBO/mcbo/models/model_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 8,980 | 32.386617 | 119 | py |
HEBO | HEBO-master/MCBO/mcbo/models/linear_reagression/linear_regression.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 15,864 | 36.684086 | 142 | py |
HEBO | HEBO-master/MCBO/mcbo/models/gp/exact_gp.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 14,703 | 41.744186 | 139 | py |
HEBO | HEBO-master/MCBO/mcbo/models/gp/kernels.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 30,466 | 40.90784 | 134 | py |
HEBO | HEBO-master/MCBO/mcbo/models/gp/combo_gp.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 23,092 | 39.872566 | 122 | py |
HEBO | HEBO-master/MCBO/mcbo/models/gp/kernel_factory.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 7,951 | 38.959799 | 105 | py |
HEBO | HEBO-master/MCBO/mcbo/trust_region/proxy_tr_manager.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,017 | 32.081967 | 111 | py |
HEBO | HEBO-master/MCBO/mcbo/trust_region/casmo_tr_manager.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 10,460 | 44.482609 | 118 | py |
HEBO | HEBO-master/MCBO/mcbo/trust_region/random_restart_tr_manager.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 7,475 | 43.236686 | 118 | py |
HEBO | HEBO-master/MCBO/mcbo/trust_region/tr_manager_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 3,965 | 31.243902 | 113 | py |
HEBO | HEBO-master/MCBO/mcbo/trust_region/tr_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 6,594 | 39.460123 | 116 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_funcs/pi.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,385 | 27.875 | 88 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_funcs/ei.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,948 | 30.435484 | 106 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_funcs/thompson_sampling.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 888 | 27.677419 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_funcs/lcb.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,025 | 27.5 | 81 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_funcs/acq_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,777 | 26.50495 | 117 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/bo_builder.py | import copy
from dataclasses import dataclass, field
from typing import Optional, Dict, Any, List, Callable
import math
import numpy as np
import torch
from mcbo.acq_funcs import acq_factory
from mcbo.acq_optimizers import AcqOptimizerBase
from mcbo.acq_optimizers.genetic_algorithm_acq_optimizer import GeneticAlgoAcq... | 17,941 | 40.43649 | 129 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/optimizer_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MER... | 7,695 | 30.670782 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/bo_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 11,275 | 33.695385 | 114 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/combo.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 7,737 | 41.054348 | 124 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/casmopolitan.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 10,872 | 41.639216 | 129 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/bocs.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 7,509 | 38.526316 | 121 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/cocabo.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 12,162 | 42.131206 | 129 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/boils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 8,798 | 38.81448 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/boss.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 8,581 | 38.731481 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/manual/bodi.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 12,198 | 45.561069 | 129 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/non_bo/genetic_algorithm.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 31,318 | 38.896815 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/non_bo/multi_armed_bandit.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 15,953 | 42.590164 | 127 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/non_bo/simulated_annealing.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 14,330 | 41.907186 | 118 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/non_bo/local_search.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
from typing import Optional, List, Callable, Dict
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
#... | 8,814 | 35.576763 | 115 | py |
HEBO | HEBO-master/MCBO/mcbo/optimizers/non_bo/random_search.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
from typing import Optional, List, Callable, Dict
import numpy as np
import pandas as pd
import torch
from mcbo.optimizers.optimizer_base import OptimizerNotBO
from mcbo.search_space import SearchSpace
from mcbo.utils.plot_resource_utils import ... | 4,045 | 31.894309 | 110 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/pymoo_utils.py | from typing import Dict, Optional, List, Callable
import numpy as np
import pandas as pd
import torch
from pymoo.config import Config
from mcbo.trust_region.tr_utils import sample_numeric_and_nominal_within_tr
from mcbo.utils.constraints_utils import input_eval_from_origx, sample_input_valid_points
Config.warnings['... | 9,134 | 42.708134 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/constraints_utils.py | import numpy as np
import torch
from typing import Union, Dict, Callable, Optional, List
import pandas as pd
from mcbo.search_space import SearchSpace
def input_eval_from_transfx(transf_x: torch.Tensor, search_space: SearchSpace,
input_constraints: Optional[List[Callable[[Dict], b... | 4,557 | 41.203704 | 116 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/model_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,561 | 30.877551 | 97 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/plotting_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 10,253 | 37.404494 | 116 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/training_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,994 | 31.912088 | 106 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/graph_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 3,916 | 35.268519 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/onehot_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,320 | 31.219512 | 92 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/general_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 11,426 | 30.830084 | 160 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/distance_metrics.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 1,381 | 29.711111 | 113 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/data_buffer.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,299 | 28.87013 | 83 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/experiment_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 9,905 | 38.624 | 149 | py |
HEBO | HEBO-master/MCBO/mcbo/utils/discrete_vars_utils.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,672 | 42.819672 | 144 | py |
HEBO | HEBO-master/MCBO/mcbo/tasks/task_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 2,231 | 28.76 | 119 | py |
HEBO | HEBO-master/MCBO/mcbo/tasks/xgboost_opt/xgboost_opt_task.py | # Greatly inspired by:
# https://github.com/xingchenwan/Casmopolitan/blob/ae7f5a06206712e7776562c5c0e8f771c8780575/mixed_test_func/xgboost_hp.py
import os
from pathlib import Path
from typing import Any, Dict, List
import numpy as np
import pandas as pd
import xgboost
from sklearn import model_selection, metrics, data... | 6,177 | 33.707865 | 121 | py |
HEBO | HEBO-master/MCBO/mcbo/tasks/svm_opt/svm_opt.py | import os
import pathlib
from typing import Tuple, List, Dict, Any
import numpy as np
import pandas as pd
import sklearn
from sklearn.metrics import mean_squared_error
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import MinMaxScaler
from sklearn.svm import SVR
from xgboost import XGBRegressor
... | 4,713 | 36.412698 | 119 | py |
HEBO | HEBO-master/MCBO/mcbo/tasks/eda_seq_opt/eda_seq_opt_task.py | import itertools
import os
from subprocess import CalledProcessError
from typing import List, Tuple, Dict, Any, Type, Optional
import numpy as np
import pandas as pd
import torch
from joblib import Parallel, delayed
from tqdm import tqdm
from mcbo.search_space.search_space_eda import SearchSpaceEDA
from mcbo.tasks.ed... | 26,615 | 45.369338 | 119 | py |
HEBO | HEBO-master/MCBO/mcbo/tasks/eda_seq_opt/utils/utils_operators.py | import os
from abc import ABC, abstractmethod
from typing import List, Dict, Any, Tuple, Type, Union, Set, Optional
################################
# Logic optimization operators
################################
import numpy as np
import torch
from mcbo.tasks.eda_seq_opt.utils.utils import get_circuits_path_root
LU... | 33,158 | 28.553476 | 144 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_optimizers/local_search_acq_optimizer.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 13,090 | 41.921311 | 118 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_optimizers/acq_optimizer_base.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 5,643 | 38.194444 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_optimizers/simulated_annealing_acq_optimizer.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 8,308 | 36.427928 | 122 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_optimizers/interleaved_search_acq_optimizer.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 12,660 | 41.773649 | 129 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_optimizers/mixed_mab_acq_optimizer.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 15,498 | 42.536517 | 120 | py |
HEBO | HEBO-master/MCBO/mcbo/acq_optimizers/genetic_algorithm_acq_optimizer.py | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the terms of the MIT license.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of ME... | 13,845 | 40.086053 | 120 | py |
HEBO | HEBO-master/MCBO/analysis/model_fit/model_fit.py | import os
import numpy as np
import pandas as pd
import torch
from mcbo.optimizers import BoBuilder
from mcbo.utils.general_utils import load_w_pickle, get_project_root
from mcbo.utils.model_utils import move_model_to_device
from mcbo.utils.experiment_utils import get_task_and_search_space
def get_fit_result_dir(ta... | 4,325 | 38.327273 | 118 | py |
HEBO | HEBO-master/MCBO/experiments/run_task_exps.py | import argparse
import os
import sys
from pathlib import Path
import torch
sys.path.insert(0, str(Path(os.path.realpath(__file__)).parent.parent))
from mcbo.utils.experiment_utils import run_experiment, get_task_and_search_space, get_opt
if __name__ == '__main__':
parser = argparse.ArgumentParser(add_help=True,... | 1,991 | 33.947368 | 115 | py |
HEBO | HEBO-master/PMDB/main.py | import gym
import d4rl
import numpy as np
import datetime
from tqdm import tqdm
from torch.utils.tensorboard import SummaryWriter
from config import args_setting
from module.ensemble_trainer import EnsembleTrainer
from module.adversarial_dynamics import AdversarialDynamics
from module.offline_agent import OfflineAgent... | 2,803 | 35.415584 | 103 | py |
HEBO | HEBO-master/PMDB/module/ensemble_trainer.py | import os
import torch
import numpy as np
import datetime
from tqdm import tqdm
from torch.utils.tensorboard import SummaryWriter
from model.dynamics import EnsembleTransition
REWARD_GENERALIZATION_LIMIT = 1.1
STATE_GENERALIZATION_LIMIT = 11.
class EnsembleTrainer(object):
def __init__(self, state_dim, action_d... | 9,795 | 53.422222 | 119 | py |
HEBO | HEBO-master/PMDB/module/offline_agent.py | import numpy as np
import torch
import torch.nn.functional as F
from torch.nn.functional import softmax, pad
from torch.optim import Adam
from utils.utils import soft_update, hard_update
from model.policy import GaussianPolicy, DoubleQNetwork, RealNvpPolicy
REAL_RATIO = 0.5
def cal_alpha(target_kld, qf, log_ratio=N... | 13,860 | 50.147601 | 120 | py |
HEBO | HEBO-master/PMDB/module/adversarial_dynamics.py | import torch
import numpy as np
from torch.distributions import Normal
BATCH_SIZE_T = None
BATCH_SIZE_A = None
class AdversarialDynamics(object):
def __init__(self, state_buffer, agent, transition, args, done_func=None, reward_func=None):
self.state_buffer = state_buffer
self.device = torch.devic... | 10,136 | 49.183168 | 120 | py |
HEBO | HEBO-master/PMDB/utils/utils.py | import math
import torch
from torch.functional import F
from torch.utils.tensorboard import SummaryWriter
import numpy as np
import random
from prettytable import PrettyTable
def setup_seed(seed):
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed) # if you are using mul... | 7,442 | 44.662577 | 119 | py |
HEBO | HEBO-master/PMDB/model/MAF.py | """
Masked Autoregressive Flow for Density Estimation
arXiv:1705.07057v4
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.distributions as D
# import torchvision.transforms as T
# from torchvision.utils import save_image
# import matplotlib
# matplotlib.use('Agg')
# import matplotli... | 21,417 | 43.252066 | 169 | py |
HEBO | HEBO-master/PMDB/model/policy.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from torch.distributions import Normal
import numpy as np
from .MAF import RealNVP
from utils.utils import soft_clamp
epsilon = 1e-6
NOISE_STD = 0.2
LOG_SIG_MIN = -4
LOG_SIG_MAX = 2
def weights_init_(m):
if isinstance(m... | 8,891 | 37.493506 | 117 | py |
HEBO | HEBO-master/PMDB/model/dynamics.py | import torch
import numpy as np
from torch.nn import SiLU
from utils.utils import soft_clamp
class EnsembleLinear(torch.nn.Module):
def __init__(self, in_features, out_features, ensemble_size=7):
super().__init__()
self.ensemble_size = ensemble_size
self.register_parameter('weight', tor... | 5,820 | 43.435115 | 133 | py |
HEBO | HEBO-master/RDUCB/hdbo/bo_torch.py | import torch
import argparse
import pandas as pd
import numpy as np
from botorch.models import SingleTaskGP
from botorch.fit import fit_gpytorch_mll
from botorch.utils import standardize
from gpytorch.mlls import ExactMarginalLogLikelihood
from botorch.acquisition import UpperConfidenceBound
from botorch.optim import o... | 3,519 | 33.509804 | 151 | py |
HEBO | HEBO-master/RDUCB/hdbo/febo/models/gpm.py | import numpy as np
import torch
from febo.utils import locate, get_logger
from febo.utils.config import ConfigField, Config, assign_config, Configurable
from febo.models import ConfidenceBoundModel
from febo.models.model import ModelConfig
from stpy.gauss_procc import GaussianProcess
from stpy.kernels import KernelFun... | 4,172 | 25.922581 | 141 | py |
HEBO | HEBO-master/AntBO/demo.py | import argparse
import os
import sys
from pathlib import Path
ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent)
sys.path.insert(0, ROOT_PROJECT)
import warnings
from gpytorch.utils.warnings import NumericalWarning
from bo.main import BOExperiments
import time
import pandas as pd
warnings.simplefilter('ig... | 2,853 | 32.97619 | 119 | py |
HEBO | HEBO-master/AntBO/experiment/base.py | import os
import sys
import abc
from typing import Optional
import torch
import model
class BaseExperiment(abc):
def __init__(self, config: dict):
self.experiment_config = config.get('experiment_config')
self.gp_config = config.get('gp_config')
self.model_config = config.get('model_config'... | 1,086 | 30.057143 | 102 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.