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
catboost
catboost-master/contrib/python/appnope/appnope/_nope.py
#----------------------------------------------------------------------------- # Copyright (C) 2013 Min RK # # Distributed under the terms of the 2-clause BSD License. #----------------------------------------------------------------------------- from contextlib import contextmanager import ctypes import ctypes.uti...
4,106
29.422222
111
py
catboost
catboost-master/contrib/python/numpy/py3/numpy/core/_add_newdocs.py
""" This is only meant to add docs to objects defined in C-extension modules. The purpose is to allow easier editing of the docstrings without requiring a re-compile. NOTE: Many of the methods of ndarray have corresponding functions. If you update these docstrings, please keep also the ones in core/fromnum...
201,399
28.397168
128
py
catboost
catboost-master/contrib/python/numpy/py3/numpy/ma/tests/test_core.py
# pylint: disable-msg=W0400,W0511,W0611,W0612,W0614,R0201,E1102 """Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ __author__ = "Pierre GF Gerard-Marchant" import sys import warnings import operator import itertools import textwrap import pytest from f...
205,567
36.725821
102
py
catboost
catboost-master/contrib/python/pandas/py3/pandas/core/config_init.py
""" This module is imported from the pandas package __init__.py file in order to ensure that the core.config options registered here will be available as soon as the user loads the package. if register_option is invoked inside specific modules, they will not be registered until that module is imported, which may or may...
28,429
27.659274
88
py
catboost
catboost-master/contrib/python/pandas/py3/pandas/core/frame.py
""" DataFrame --------- An efficient 2D container for potentially mixed-type time series or other labeled data series. Similar to its R counterpart, data.frame, except providing automatic data alignment and a host of useful data manipulation methods having to do with the labeling information """ from __future__ import...
412,820
33.313108
170
py
catboost
catboost-master/contrib/python/pandas/py3/pandas/io/formats/html.py
""" Module for formatting output data in HTML. """ from __future__ import annotations from textwrap import dedent from typing import ( Any, Final, Hashable, Iterable, Mapping, cast, ) from pandas._config import get_option from pandas._libs import lib from pandas import ( MultiIndex, ...
23,515
36.033071
88
py
catboost
catboost-master/contrib/python/pandas/py3/pandas/io/formats/style_render.py
from __future__ import annotations from collections import defaultdict from functools import partial import re from typing import ( Any, Callable, DefaultDict, Dict, List, Optional, Sequence, Tuple, TypedDict, Union, ) from uuid import uuid4 import numpy as np from pandas._con...
85,621
35.481466
88
py
catboost
catboost-master/contrib/python/pandas/py2/pandas/core/config_init.py
""" This module is imported from the pandas package __init__.py file in order to ensure that the core.config options registered here will be available as soon as the user loads the package. if register_option is invoked inside specific modules, they will not be registered until that module is imported, which may or may...
17,143
32.748031
79
py
catboost
catboost-master/contrib/python/pandas/py2/pandas/io/formats/style.py
""" Module for applying conditional formatting to DataFrames and Series. """ from collections import defaultdict from contextlib import contextmanager import copy from functools import partial from itertools import product from uuid import uuid1 import numpy as np from pandas.compat import range from pandas.util._de...
46,534
33.016813
79
py
catboost
catboost-master/contrib/python/pandas/py2/pandas/io/formats/html.py
# -*- coding: utf-8 -*- """ Module for formatting output data in HTML. """ from __future__ import print_function from textwrap import dedent from pandas.compat import OrderedDict, lzip, map, range, u, unichr, zip from pandas.core.dtypes.generic import ABCMultiIndex from pandas import compat import pandas.core.comm...
21,226
38.900376
79
py
catboost
catboost-master/contrib/python/jupyter-core/py3/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py
# Configuration file for ipython-notebook. c = get_config() # ------------------------------------------------------------------------------ # NotebookApp configuration # ------------------------------------------------------------------------------ # NotebookApp will inherit config from: BaseIPythonApplication, App...
19,945
35.331512
113
py
catboost
catboost-master/contrib/python/jupyter-core/py2/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py
# Configuration file for ipython-notebook. c = get_config() #------------------------------------------------------------------------------ # NotebookApp configuration #------------------------------------------------------------------------------ # NotebookApp will inherit config from: BaseIPythonApplication, Appli...
19,986
35.406193
113
py
catboost
catboost-master/contrib/python/Pygments/py3/pygments/lexers/_lasso_builtins.py
""" pygments.lexers._lasso_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Built-in Lasso types, traits, methods, and members. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTINS = { 'Types': ( 'array', 'atbegin', ...
134,510
24.250798
70
py
catboost
catboost-master/contrib/python/Pygments/py2/pygments/lexers/_lasso_builtins.py
# -*- coding: utf-8 -*- """ pygments.lexers._lasso_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Built-in Lasso types, traits, methods, and members. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTINS = { 'Types': ( 'array...
134,534
24.250563
70
py
catboost
catboost-master/contrib/python/ipywidgets/py3/ipywidgets/embed.py
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # # # Parts of this code is from IPyVolume (24.05.2017), used here under # this copyright and license with permission from the author # (see https://github.com/jupyter-widgets/ipywidgets/pull/1387) """ Functions for ge...
11,287
34.275
182
py
catboost
catboost-master/contrib/python/ipywidgets/py2/ipywidgets/embed.py
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # # # Parts of this code is from IPyVolume (24.05.2017), used here under # this copyright and license with permission from the author # (see https://github.com/jupyter-widgets/ipywidgets/pull/1387) """ Functions for ge...
11,227
34.0875
182
py
catboost
catboost-master/contrib/python/threadpoolctl/threadpoolctl.py
"""threadpoolctl This module provides utilities to introspect native libraries that relies on thread pools (notably BLAS and OpenMP implementations) and dynamically set the maximal number of threads they can use. """ # License: BSD 3-Clause # The code to introspect dynamically loaded libraries on POSIX systems is # a...
41,112
37.351679
88
py
catboost
catboost-master/contrib/python/plotly/py3/plotly/basedatatypes.py
from __future__ import absolute_import import collections from collections import OrderedDict import re import warnings from contextlib import contextmanager from copy import deepcopy, copy import itertools from functools import reduce from _plotly_utils.utils import ( _natural_sort_strings, _get_int_type, ...
224,978
34.468863
193
py
catboost
catboost-master/contrib/python/plotly/py3/plotly/io/_html.py
import uuid import os from pathlib import Path import webbrowser from _plotly_utils.optional_imports import get_module from plotly.io._utils import validate_coerce_fig_to_dict, plotly_cdn_url from plotly.offline.offline import _get_jconfig, get_plotlyjs from plotly import utils _json = get_module("json") # Build sc...
20,879
36.826087
127
py
catboost
catboost-master/contrib/python/plotly/py3/plotly/io/_kaleido.py
from __future__ import absolute_import import os import json from pathlib import Path import plotly from plotly.io._utils import validate_coerce_fig_to_dict try: from kaleido.scopes.plotly import PlotlyScope scope = PlotlyScope() # Compute absolute path to the 'plotly/package_data/' directory root_di...
11,251
30.695775
87
py
catboost
catboost-master/contrib/python/plotly/py3/plotly/io/_orca.py
from __future__ import absolute_import import atexit import json import os import socket import subprocess import sys import threading import warnings from copy import copy from contextlib import contextmanager from pathlib import Path import tenacity import _plotly_utils.utils import plotly from plotly.files import...
54,008
28.888766
88
py
catboost
catboost-master/contrib/python/plotly/py3/plotly/io/_base_renderers.py
from __future__ import absolute_import import base64 import json import webbrowser import inspect import os from os.path import isdir from plotly import utils, optional_imports from plotly.io import to_json, to_image, write_image, write_html from plotly.io._orca import ensure_server from plotly.io._utils import plotly...
26,809
28.888517
129
py
catboost
catboost-master/contrib/python/plotly/py3/plotly/offline/offline.py
""" Plotly Offline A module to use Plotly's graphing library with Python without connecting to a public or private plotly enterprise server. """ from __future__ import absolute_import import os import warnings import pkgutil import plotly import plotly.tools from plotly.optional_imports import get_module ...
31,708
36.703924
127
py
catboost
catboost-master/contrib/python/plotly/py2/plotly/io/_html.py
import uuid import json import os import webbrowser import six from plotly.io._utils import validate_coerce_fig_to_dict from plotly.offline.offline import _get_jconfig, get_plotlyjs from plotly import utils # Build script to set global PlotlyConfig object. This must execute before # plotly.js is loaded. _window_plo...
20,152
36.045956
89
py
catboost
catboost-master/contrib/python/plotly/py2/plotly/io/_orca.py
from __future__ import absolute_import import atexit import json import os import socket import subprocess import sys import threading import warnings from copy import copy from contextlib import contextmanager import retrying from six import string_types import _plotly_utils.utils import plotly from plotly.files im...
53,125
28.846067
88
py
catboost
catboost-master/contrib/python/plotly/py2/plotly/io/_base_renderers.py
from __future__ import absolute_import import base64 import json import webbrowser import inspect import os from os.path import isdir import six from plotly.io import to_json, to_image, write_image, write_html from plotly import utils, optional_imports from plotly.io._orca import ensure_server from plotly.offline.offl...
24,000
28.521525
87
py
catboost
catboost-master/contrib/python/plotly/py2/plotly/offline/offline.py
""" Plotly Offline A module to use Plotly's graphing library with Python without connecting to a public or private plotly enterprise server. """ from __future__ import absolute_import import os import warnings import pkgutil import plotly import plotly.tools from plotly.optional_imports import get_module ...
31,651
36.636147
89
py
catboost
catboost-master/contrib/python/ipython/py3/IPython/core/magics/display.py
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
3,130
32.308511
84
py
catboost
catboost-master/contrib/python/ipython/py2/IPython/core/magics/display.py
"""Simple magics for display formats""" #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
2,127
31.242424
80
py
catboost
catboost-master/contrib/python/ipython/py2/IPython/external/mathjax.py
#!/usr/bin/python """ `IPython.external.mathjax` is deprecated with IPython 4.0+ mathjax is now install by default with the notebook package """ import sys if __name__ == '__main__' : sys.exit("IPython.external.mathjax is deprecated, Mathjax is now installed by default with the notebook package")
308
21.071429
117
py
catboost
catboost-master/build/scripts/link_exe.py
import sys import subprocess import optparse import process_command_files as pcf from process_whole_archive_option import ProcessWholeArchiveOption def get_leaks_suppressions(cmd): supp, newcmd = [], [] for arg in cmd: if arg.endswith(".supp"): supp.append(arg) else: ...
6,210
31.689474
165
py
catboost
catboost-master/build/scripts/link_dyn_lib.py
import sys import os import subprocess import tempfile import collections import optparse import pipes from process_whole_archive_option import ProcessWholeArchiveOption def shlex_join(cmd): # equivalent to shlex.join() in python 3 return ' '.join( pipes.quote(part) for part in cmd ) de...
10,945
29.920904
165
py
AvatarCLIP
AvatarCLIP-main/AvatarAnimate/main.py
import os import argparse from pyhocon import ConfigFactory import torch from models.builder import ( build_pose_generator, build_motion_generator ) import numpy as np from visualize import render_pose, render_motion def main(conf_path): with open(conf_path) as f: conf_text = f.read() f....
1,733
31.716981
77
py
AvatarCLIP
AvatarCLIP-main/AvatarAnimate/visualize.py
import torch from torch import Tensor import numpy as np import os os.environ['PYOPENGL_PLATFORM'] = 'osmesa' import cv2 import smplx import pyrender import trimesh from body_visualizer.tools.vis_tools import imagearray2file from human_body_prior.body_model.body_model import BodyModel class Renderer: """ Ren...
4,225
32.808
98
py
AvatarCLIP
AvatarCLIP-main/AvatarAnimate/models/motion_generation.py
from abc import ABCMeta, abstractmethod from typing import Optional, Tuple, Union import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F from torch import distributions import numpy as np import clip import smplx from tqdm import tqdm from .render import render_one_batch from huma...
13,926
37.686111
94
py
AvatarCLIP
AvatarCLIP-main/AvatarAnimate/models/render.py
import torch import numpy as np import neural_renderer as nr obj_fname = 'data/smpl_uv.obj' _, _, t = nr.load_obj(obj_fname, load_texture=True, texture_size=8) def render_one_batch(vertices, faces, angles, device): camera_distance = 2 texture_size = 8 textures = t.reshape( 1, face...
1,036
24.925
67
py
AvatarCLIP
AvatarCLIP-main/AvatarAnimate/models/utils.py
# -------------------------------------------------------------------------------------------- # Borrowed from https://github.com/facebookresearch/pytorch3d # Original licence: Copyright (c) Meta Platforms, Inc. and affiliates., under the BSD License. # ------------------------------------------------------------------...
8,416
36.914414
94
py
AvatarCLIP
AvatarCLIP-main/AvatarAnimate/models/pose_generation.py
from abc import ABCMeta, abstractmethod from typing import Optional, Union, Tuple import torch from torch import Tensor import torch.nn as nn import torch.nn.functional as F from torch import distributions import numpy as np import clip import smplx from tqdm import tqdm from .render import render_one_batch from huma...
12,891
38.066667
95
py
AvatarCLIP
AvatarCLIP-main/Avatar2FBX/export_fbx.py
""" Copyright (C) 2017 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. """ import sys sys.path.appe...
4,967
34.741007
149
py
AvatarCLIP
AvatarCLIP-main/Avatar2FBX/utils/ply_utils.py
import torch import open3d as o3d import numpy as np from smplx import build_layer from torch import Tensor import torch.nn.functional as F def read_ply(fname): mesh = o3d.io.read_triangle_mesh(fname) # vertices = np.asarray(mesh.vertices) # vertex_colors = np.asarray(mesh.vertex_colors) # faces = np....
7,072
31.74537
132
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/main.py
import os import time import logging import argparse import random import numpy as np import cv2 as cv import trimesh import torch import torch.nn.functional as F from torchvision import transforms from torch.utils.tensorboard import SummaryWriter from shutil import copyfile from icecream import ic from tqdm import tqd...
46,387
46.286442
148
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/drive.py
import os import copy import torch import struct import pickle import numpy as np import open3d as o3d from tqdm import tqdm from torch import Tensor from smplx import build_layer import torch.nn.functional as F def batch_rodrigues( rot_vecs: Tensor, epsilon: float = 1e-8) -> Tensor: ''' Calculates the rot...
14,384
35.143216
194
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/models/renderer.py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import logging import mcubes from icecream import ic def extract_fields(bound_min, bound_max, resolution, query_func): N = 64 X = torch.linspace(bound_min[0], bound_max[0], resolution).split(N) Y = torch.linspace(bound_m...
17,826
43.017284
116
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/models/embedder.py
import torch import torch.nn as nn # Positional encoding embedding. Code was taken from https://github.com/bmild/nerf. class Embedder: def __init__(self, **kwargs): self.kwargs = kwargs self.create_embedding_fn() def create_embedding_fn(self): embed_fns = [] d = self.kwargs['i...
1,528
28.403846
83
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/models/utils.py
import torch import numpy as np import neural_renderer as nr from smplx.lbs import * def norm_np_arr(arr): return arr / np.linalg.norm(arr) def lookat(eye, at, up): zaxis = norm_np_arr(eye - at) xaxis = norm_np_arr(np.cross(up, zaxis)) yaxis = np.cross(zaxis, xaxis) viewMatrix = np.array([ ...
8,909
34.07874
133
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/models/dataset.py
import torch import torch.nn.functional as F import cv2 as cv import numpy as np import os from glob import glob from icecream import ic from scipy.spatial.transform import Rotation as Rot from scipy.spatial.transform import Slerp import json import imageio import logging from scipy import ndimage pil_logger = logging....
16,112
45.301724
125
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/AppearanceGen/models/fields.py
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from models.embedder import get_embedder # This implementation is borrowed from IDR: https://github.com/lioryariv/idr class SDFNetwork(nn.Module): def __init__(self, d_in, d_out, ...
9,340
32.722022
112
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/ShapeGen/main.py
import os import sys import math import torch import imageio import argparse import numpy as np import neural_renderer as nr import matplotlib.pyplot as plt from torch import nn, optim from torch.nn import functional as F from smplx.lbs import batch_rodrigues from smplx import build_layer from tqdm import tqdm import...
6,072
39.486667
108
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/ShapeGen/render.py
import os import json import torch import argparse import numpy as np import neural_renderer as nr import matplotlib.pyplot as plt from PIL import Image from smplx.lbs import * from smplx import build_layer from utils import readOBJ def norm_np_arr(arr): return arr / np.linalg.norm(arr) def lookat(eye, target,...
6,795
38.283237
133
py
AvatarCLIP
AvatarCLIP-main/AvatarGen/ShapeGen/utils.py
import os import torch import numpy as np import neural_renderer as nr obj_fname = './data/smpl_uv.obj' _, _, texture = nr.load_obj(obj_fname, load_texture=True, texture_size=8) def render_one_batch(v, f): camera_distance = 2 elevation = 0 texture_size = 8 batch_size = v.shape[0] vertices = v ...
3,099
34.227273
142
py
HEBO
HEBO-master/NAP/HPO_data/fit_xgb_gps.py
# Copyright (C) 2023. 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,462
40.8
104
py
HEBO
HEBO-master/NAP/scripts/metabo/test_metabo_antigen.py
# Copyright (C) 2023. 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,203
34.401361
136
py
HEBO
HEBO-master/NAP/scripts/metabo/train_metabo_hpo.py
# Copyright (C) 2023. 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,939
33.26087
136
py
HEBO
HEBO-master/NAP/scripts/metabo/train_metabo_antigen.py
# Copyright (C) 2023. 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,938
35.051095
136
py
HEBO
HEBO-master/NAP/scripts/metabo/validate_metabo_antigen.py
# Copyright (C) 2023. 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,882
41.15508
144
py
HEBO
HEBO-master/NAP/scripts/metabo/test_metabo_hpo.py
# Copyright (C) 2023. 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,378
34.314516
136
py
HEBO
HEBO-master/NAP/scripts/fsbo/test_fsbo_antigen.py
# Copyright (C) 2023. 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,443
37.586826
116
py
HEBO
HEBO-master/NAP/scripts/nap/train_nap_hpo.py
# Copyright (C) 2023. 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,915
35.787234
138
py
HEBO
HEBO-master/NAP/scripts/nap/test_nap_hpo.py
# Copyright (C) 2023. 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,835
37.621469
149
py
HEBO
HEBO-master/NAP/scripts/nap/train_nap_antigen.py
# Copyright (C) 2023. 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,446
35.219101
120
py
HEBO
HEBO-master/NAP/scripts/nap/test_nap_antigen.py
# Copyright (C) 2023. 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,570
36.855
120
py
HEBO
HEBO-master/NAP/scripts/nap/validate_nap_antigen.py
# Copyright (C) 2023. 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,508
39.987069
124
py
HEBO
HEBO-master/NAP/scripts/nap/validate_nap_hpo.py
# Copyright (C) 2023. 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,826
39.677419
153
py
HEBO
HEBO-master/NAP/scripts/gp/test_gp_hpo.py
# Copyright (C) 2023. 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,952
48.303887
121
py
HEBO
HEBO-master/NAP/scripts/gp/test_gp_antigen.py
# Copyright (C) 2023. 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,328
48.926829
121
py
HEBO
HEBO-master/NAP/antigen_data/create_task_datasets.py
# Copyright (C) 2023. 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,497
35.4375
105
py
HEBO
HEBO-master/NAP/nap/policies/nap.py
# Copyright (C) 2023. 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,166
42.621094
154
py
HEBO
HEBO-master/NAP/nap/policies/fsbo.py
# Copyright (C) 2023. 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...
20,624
42.238994
181
py
HEBO
HEBO-master/NAP/nap/policies/iclr2020_mlp.py
# Copyright (c) 2019 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope ...
2,434
38.918033
113
py
HEBO
HEBO-master/NAP/nap/policies/mlp.py
# Copyright (c) 2021 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope ...
2,310
37.516667
113
py
HEBO
HEBO-master/NAP/nap/policies/transformer.py
# Copyright (C) 2023. 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,913
47.966154
131
py
HEBO
HEBO-master/NAP/nap/policies/policies.py
# Copyright (c) 2021 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope ...
14,651
33.80285
121
py
HEBO
HEBO-master/NAP/nap/policies/bar_distribution.py
# Copyright (C) 2023. 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,930
49.709804
179
py
HEBO
HEBO-master/NAP/nap/environment/function_gym_nap.py
# Copyright (C) 2023. 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...
41,870
43.877814
161
py
HEBO
HEBO-master/NAP/nap/environment/function_gym.py
# Copyright (c) 2021 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope ...
41,553
44.364629
164
py
HEBO
HEBO-master/NAP/nap/environment/hpo.py
# Copyright (C) 2023. 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,343
57.201835
131
py
HEBO
HEBO-master/NAP/nap/RL/utils_gp.py
# Copyright (C) 2023. 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,399
42.768997
120
py
HEBO
HEBO-master/NAP/nap/RL/ppo.py
# Copyright (c) 2019 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope ...
17,947
46.989305
124
py
HEBO
HEBO-master/NAP/nap/RL/ppo_batchrecorder_nap.py
# Copyright (C) 2023. 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...
17,781
37.740741
148
py
HEBO
HEBO-master/NAP/nap/RL/ppo_batchrecorder.py
# Copyright (c) 2019 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope ...
15,626
37.680693
148
py
HEBO
HEBO-master/NAP/nap/RL/botorch_helper.py
# Copyright (C) 2023. 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,566
43.511765
87
py
HEBO
HEBO-master/NAP/nap/RL/ppo_nap.py
# Copyright (C) 2023. 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...
32,652
51.41252
145
py
HEBO
HEBO-master/NAP/nap/RL/util.py
# Copyright (C) 2023. 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,699
38.830508
114
py
HEBO
HEBO-master/NAP/HPOB_data/create_task_datasets.py
# Copyright (C) 2023. 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,567
39.057554
105
py
HEBO
HEBO-master/NAP/HPOB_data/convertHPOB.py
# Copyright (C) 2023. 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,961
34.035714
111
py
HEBO
HEBO-master/MCBO/paper/gp_and_linear_regression_fit.py
import os import matplotlib.pyplot as plt import numpy as np import pandas as pd import torch from mcbo.models import ExactGPModel from mcbo.models.gp.kernel_factory import kernel_factory from mcbo.search_space import SearchSpace from mcbo.tasks import TaskBase class Sin(TaskBase): @property def name(self) ...
2,819
30.333333
95
py
HEBO
HEBO-master/MCBO/tests/search_space/test_eda_search_space.py
import os import sys from pathlib import Path import numpy as np import torch from tqdm import tqdm ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent.parent.parent) sys.path[0] = ROOT_PROJECT from mcbo.search_space.search_space_eda import SearchSpaceEDA from mcbo.tasks.eda_seq_opt.eda_seq_opt_task import ED...
2,533
42.689655
120
py
HEBO
HEBO-master/MCBO/tests/models/test_multitask_exact_gp.py
import numpy as np import torch from gpytorch.kernels import ScaleKernel, MaternKernel from mcbo.task_factory import task_factory from mcbo.models.gp.exact_gp import ExactGPModel if __name__ == '__main__': dtype = torch.float64 device = torch.device('cpu') task1 = task_factory('levy', num_dims=10, variabl...
1,547
36.756098
109
py
HEBO
HEBO-master/MCBO/tests/models/test_hed_kernel.py
import os import sys from pathlib import Path import torch from gpytorch.kernels import MaternKernel ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent.parent.parent) sys.path[0] = ROOT_PROJECT from mcbo.models.gp.kernels import HEDKernel def test_hed_kernel(): base_kernel = MaternKernel() hed_num_e...
661
22.642857
119
py
HEBO
HEBO-master/MCBO/tests/models/test_exact_gp.py
import torch from mcbo.task_factory import task_factory from mcbo.models.gp.exact_gp import ExactGPModel from mcbo.models.gp.kernels import DiffusionKernel from mcbo.utils.graph_utils import laplacian_eigen_decomposition from mcbo.utils.plotting_utils import plot_model_prediction if __name__ == '__main__': dtype ...
1,150
33.878788
114
py
HEBO
HEBO-master/MCBO/tests/acq/test_lcb_acq.py
import torch from gpytorch.kernels import ScaleKernel, MaternKernel from mcbo.task_factory import task_factory from mcbo.models.gp.exact_gp import ExactGPModel from mcbo.acq_funcs.factory import acq_factory if __name__ == '__main__': dtype = torch.float64 device = torch.device('cpu') task = task_factory('...
932
30.1
74
py
HEBO
HEBO-master/MCBO/tests/acq/test_pi_acq.py
import torch from gpytorch.kernels import ScaleKernel, MaternKernel from mcbo.acq_funcs.factory import acq_factory from mcbo.task_factory import task_factory from mcbo.models.gp.exact_gp import ExactGPModel def test_pi(): dtype = torch.float64 task = task_factory('ackley', num_dims=10, variable_type='num', t...
911
25.823529
90
py
HEBO
HEBO-master/MCBO/tests/acq/test_ei_acq.py
import torch from gpytorch.kernels import ScaleKernel, MaternKernel from mcbo.acq_funcs.factory import acq_factory from mcbo.task_factory import task_factory from mcbo.models.gp.exact_gp import ExactGPModel if __name__ == '__main__': dtype = torch.float64 device = torch.device('cpu') task = task_factory('...
955
29.83871
90
py
HEBO
HEBO-master/MCBO/tests/trust_region/test_single_nominal_dim_tr.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,834
50.545455
120
py
HEBO
HEBO-master/MCBO/tests/experiments/test_run_experiments.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,927
43.363636
117
py
HEBO
HEBO-master/MCBO/tests/optimizers/test_bo_builder.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 ...
5,748
37.844595
117
py
HEBO
HEBO-master/MCBO/tests/optimizers/manual/test_boils.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,127
41.849315
117
py
HEBO
HEBO-master/MCBO/tests/optimizers/manual/test_bocs_warning.py
import torch from mcbo.search_space import SearchSpace from mcbo.optimizers.manual.bocs import BOCS if __name__ == '__main__': # Create a search space with only binary variables non_binary_search_space = SearchSpace([{'name': 'var 1', 'type': 'nominal', 'categories': ['A', 'B', 'C']}, ...
1,140
48.608696
111
py
HEBO
HEBO-master/MCBO/tests/optimizers/manual/test_bocs.py
import os import sys from pathlib import Path from typing import Callable, Dict ROOT_PROJECT = str(Path(os.path.realpath(__file__)).parent.parent.parent) sys.path[0] = ROOT_PROJECT import torch from mcbo.optimizers.manual.bocs import BOCS from mcbo.utils.plotting_utils import plot_convergence_curve def input_const...
1,325
28.466667
114
py
HEBO
HEBO-master/MCBO/tests/optimizers/manual/test_tr_based_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...
3,342
52.063492
243
py