python_code
stringlengths
0
4.04M
repo_name
stringlengths
8
58
file_path
stringlengths
5
147
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import io import logging import os import sys import threading import traceback impor...
aepsych-main
aepsych/server/server.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from .server import AEPsychServer __all__ = ["AEPsychServer"]
aepsych-main
aepsych/server/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import warnings import aepsych.utils_logging as utils_logging import pandas as pd fr...
aepsych-main
aepsych/server/replay.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import logging import os import sys import aepsych.database.db as db import aepsych....
aepsych-main
aepsych/server/utils.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import json import logging import select import socket import sys import aepsych.utils_logging as ut...
aepsych-main
aepsych/server/sockets.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging from collections.abc import Mapping import aepsych.utils_logging as utils_logging lo...
aepsych-main
aepsych/server/message_handlers/handle_ask.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from .handle_ask import handle_ask from .handle_can_model import handle_can_model from .handle_exit i...
aepsych-main
aepsych/server/message_handlers/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. def handle_finish_strategy(self, request): self.strat.finish() return f"finished strategy {s...
aepsych-main
aepsych/server/message_handlers/handle_finish_strategy.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging import numpy as np logger = utils_logg...
aepsych-main
aepsych/server/message_handlers/handle_query.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging logger = utils_logging.getLogger(loggin...
aepsych-main
aepsych/server/message_handlers/handle_get_config.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging logger = utils_logging.getLogger(loggi...
aepsych-main
aepsych/server/message_handlers/handle_can_model.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import io import logging from collections.abc import Iterable import aepsych.utils_logging as utils_...
aepsych-main
aepsych/server/message_handlers/handle_tell.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging logger = utils_logging.getLogger(loggi...
aepsych-main
aepsych/server/message_handlers/handle_exit.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging from typing import Any, Dict import aepsych.utils_logging as utils_logging logger =...
aepsych-main
aepsych/server/message_handlers/handle_info.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging logger = utils_logging.getLogger(loggi...
aepsych-main
aepsych/server/message_handlers/handle_resume.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging from aepsych.config import Config from...
aepsych-main
aepsych/server/message_handlers/handle_setup.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import aepsych.utils_logging as utils_logging logger = utils_logging.getLogger(loggi...
aepsych-main
aepsych/server/message_handlers/handle_params.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from copy import deepcopy from typing import Any, Optional, Tuple...
aepsych-main
aepsych/models/semi_p.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import time from typing import Any, Dict, Optional, Union import gpytorch import numpy as np import t...
aepsych-main
aepsych/models/pairwise_probit.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import gpytorch import torch from aepsych.likelihoods import OrdinalLikelihood from aepsych.models im...
aepsych-main
aepsych/models/ordinal_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations import warnings from typing import Dict, List, Optional, Sequence...
aepsych-main
aepsych/models/monotonic_rejection_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import Any, List, Optional, Union import gpytorch im...
aepsych-main
aepsych/models/monotonic_projection_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import sys from ..config import Config from .exact_gp import ContinuousRegressionGP, ExactGP from .g...
aepsych-main
aepsych/models/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, Optional, Tuple, Union import gpytorch import numpy as np import torch fr...
aepsych-main
aepsych/models/variational_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from copy import deepcopy from typing import Optional, Tuple, Unio...
aepsych-main
aepsych/models/gp_classification.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from copy import deepcopy from typing import Dict, Optional, Tuple...
aepsych-main
aepsych/models/gp_regression.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import Optional, Union import gpytorch import torch ...
aepsych-main
aepsych/models/derivative_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import Optional import gpytorch import torch from ...
aepsych-main
aepsych/models/multitask_regression.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import List, Mapping, Optional, Tuple, Union import n...
aepsych-main
aepsych/models/utils.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations import dataclasses import time from typing import Dict, List, Opt...
aepsych-main
aepsych/models/surrogate.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from aepsych.models.base import AEPsychModel from botorch.models import SingleTaskGP from gpytorch.m...
aepsych-main
aepsych/models/exact_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations import abc import time from typing import Any, Dict, List, Mappin...
aepsych-main
aepsych/models/base.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Optional import torch from aepsych.acquisition.objective import AEPsychObjective,...
aepsych-main
aepsych/likelihoods/semi_p.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Callable, Optional import gpytorch import torch from gpytorch.likelihoods import ...
aepsych-main
aepsych/likelihoods/ordinal.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import sys from ..config import Config from .bernoulli import BernoulliObjectiveLikelihood from .ord...
aepsych-main
aepsych/likelihoods/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Callable import torch from aepsych.config import Config from gpytorch.likelihoods ...
aepsych-main
aepsych/likelihoods/bernoulli.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import warnings from typing import Optional, Union import numpy as np import torch from aepsych.conf...
aepsych-main
aepsych/generators/manual_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import warnings from aepsych.config import Config from aepsych.generators import OptimizeAcqfGenerat...
aepsych-main
aepsych/generators/pairwise_optimize_acqf_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import Dict, Optional, Union import numpy as np impor...
aepsych-main
aepsych/generators/sobol_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import warnings from aepsych.config import Config from .sobol_generator import SobolGenerator cla...
aepsych-main
aepsych/generators/pairwise_sobol_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Type import torch from aepsych.acquisition.objective.semi_p import SemiPThreshold...
aepsych-main
aepsych/generators/semi_p.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Dict, Optional, Sequence import torch from aepsych.acquisition.monotonic_rej...
aepsych-main
aepsych/generators/monotonic_rejection_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import sys from ..config import Config from .epsilon_greedy_generator import EpsilonGreedyGenerator ...
aepsych-main
aepsych/generators/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations import time from inspect import signature from typing import Any, c...
aepsych-main
aepsych/generators/optimize_acqf_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import List, Optional, Type import numpy as np import torch from aepsych.acquisition.obj...
aepsych-main
aepsych/generators/monotonic_thompson_sampler_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import numpy as np import torch from aepsych.config import Config from ..models.base import ModelPro...
aepsych-main
aepsych/generators/epsilon_greedy_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from __future__ import annotations from typing import Dict from ax.modelbridge import Models from a...
aepsych-main
aepsych/generators/multi_outcome_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, Optional, Union import numpy as np import torch from aepsych.config import ...
aepsych-main
aepsych/generators/random_generator.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import abc from inspect import signature from typing import Any, Dict, Generic, Protocol, runtime_check...
aepsych-main
aepsych/generators/base.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Dict from ax.core.experiment import Experiment from ax.modelbridge.completio...
aepsych-main
aepsych/generators/completion_criterion/min_asks.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Dict from aepsych.config import Config, ConfigurableMixin from ax.core impor...
aepsych-main
aepsych/generators/completion_criterion/run_indefinitely.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import sys from aepsych.config import Config from .min_asks import MinAsks from .min_total_outcome_...
aepsych-main
aepsych/generators/completion_criterion/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Dict from aepsych.config import Config, ConfigurableMixin from ax.modelbrid...
aepsych-main
aepsych/generators/completion_criterion/min_total_outcome_occurrences.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Dict from aepsych.config import Config, ConfigurableMixin from ax.core.base_...
aepsych-main
aepsych/generators/completion_criterion/min_total_tells.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import sys from ..config import Config from .factory import ( default_mean_covar_factory, mo...
aepsych-main
aepsych/factory/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from configparser import NoOptionError from typing import Optional, Tuple import gpytorch import tor...
aepsych-main
aepsych/factory/factory.py
#!/usr/bin/env python3 # coding: utf-8 # ### Semi-parametric psychophysical model tutorial # # This tutorial will demonstrate how to fit the semiparametric psychophysical models described in [Keeley et al., 2023](https://arxiv.org/abs/2302.01187). # # The semi-parametric model uses a conventional parametric form fo...
aepsych-main
website/static/files/Semi_P_tutorial.py
#!/usr/bin/env python3 # coding: utf-8 # # Data Collection and Analysis Using AEPsych # # This tutorial serves as a complete example on how to collect and analyze data from perceptual experiments using AEPsych. For more information on AEPsych, refer to the documentation in the [GitHub repository](https://github.com/f...
aepsych-main
website/static/files/data_collection_analysis_tutorial.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from copy import deepcopy import numpy as np import torch from aepsych.config import...
aepsych-main
tests/test_utils.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from unittest.mock import MagicMock import numpy as np import torch from aepsych.acq...
aepsych-main
tests/test_strategy.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import torch from aepsych.benchmark.test_functions import make_songetal_testfun from...
aepsych-main
tests/test_bench_testfuns.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import json import os import shutil import unittest import uuid from configparser import DuplicateOpt...
aepsych-main
tests/test_db.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from itertools import product import numpy as np import torch from aepsych.acquisiti...
aepsych-main
tests/test_lookahead.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree.
aepsych-main
tests/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import gpytorch import numpy as np from aepsych.config import Config from aepsych.fa...
aepsych-main
tests/test_mean_covar_factories.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import numpy as np from scipy.stats import norm def f_1d(x, mu=0): """ latent is just a gau...
aepsych-main
tests/common.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import random import time import unittest import numpy as np import torch from aepsych.ben...
aepsych-main
tests/test_benchmark.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import json import os import unittest import uuid import torch from aepsych.acquisition import EAVC,...
aepsych-main
tests/test_config.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import torch from aepsych.likelihoods import OrdinalLikelihood from gpytorch.test.ba...
aepsych-main
tests/test_likelihoods.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import unittest import uuid import torch from aepsych.server import AEPsychServer from ae...
aepsych-main
tests/test_multioutcome.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import math import os import unittest import uuid import numpy as np import torch from aepsych.conf...
aepsych-main
tests/test_ax_integration.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ These tests check that the server can handle different experiments (multi/single stimuli, multi/s...
aepsych-main
tests/test_integration.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree.
aepsych-main
tests/acquisition/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import numpy as np import torch from aepsych.acquisition.lse import MCLevelSetEstima...
aepsych-main
tests/acquisition/test_lse.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import numpy as np import torch from aepsych.acquisition.mutual_information import (...
aepsych-main
tests/acquisition/test_mi.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from itertools import product import numpy as np import torch from aepsych.acquisiti...
aepsych-main
tests/acquisition/test_objective.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch from aepsych.acquisition.monotonic_rejection import MonotonicMCLSE from aepsych.acquisit...
aepsych-main
tests/acquisition/test_monotonic.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch from aepsych.acquisition.rejection_sampler import RejectionSampler from aepsych.models.d...
aepsych-main
tests/acquisition/test_rejection_sampler.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree.
aepsych-main
tests/server/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import json import logging import select import unittest import uuid from unittest.mock import MagicM...
aepsych-main
tests/server/test_server.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from aepsych.config import Config from ..test_server import BaseServerTestCase, dum...
aepsych-main
tests/server/message_handlers/test_handle_get_config.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree.
aepsych-main
tests/server/message_handlers/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from unittest.mock import MagicMock from ..test_server import BaseServerTestCase c...
aepsych-main
tests/server/message_handlers/test_handle_exit.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from ..test_server import BaseServerTestCase, dummy_config class QueryHandlerTestC...
aepsych-main
tests/server/message_handlers/test_query_handlers.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from ..test_server import BaseServerTestCase, dummy_config class StratCanModelTest...
aepsych-main
tests/server/message_handlers/test_can_model.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from ..test_server import BaseServerTestCase, dummy_config class ResumeTestCase(Ba...
aepsych-main
tests/server/message_handlers/test_handle_finish_strategy.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest from unittest.mock import MagicMock from ..test_server import BaseServerTestCase, du...
aepsych-main
tests/server/message_handlers/test_tell_handlers.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import numpy as np import torch from sklearn.datasets import make_classification fr...
aepsych-main
tests/models/test_utils.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import unittest import torch # run on single threads to keep us from deadlocking weirdly ...
aepsych-main
tests/models/test_monotonic_projection_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import unittest import numpy as np import torch from aepsych.generators import SobolGenera...
aepsych-main
tests/models/test_multitask_regression.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import unittest import uuid import numpy as np import numpy.testing as npt import torch fr...
aepsych-main
tests/models/test_gp_regression.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree.
aepsych-main
tests/models/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import numpy as np import numpy.testing as npt import torch from aepsych.acquisitio...
aepsych-main
tests/models/test_semi_p.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch from aepsych.kernels.rbf_partial_grad import RBFKernelPartialObsGrad from aepsych.means....
aepsych-main
tests/models/test_derivative_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import numpy as np import numpy.testing as npt import torch from aepsych.likelihoods...
aepsych-main
tests/models/test_variational_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import logging import unittest import uuid import numpy as np import numpy.testing as npt import tor...
aepsych-main
tests/models/test_pairwise_probit.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import torch # run on single threads to keep us from deadlocking weirdly in CI if "CI" in...
aepsych-main
tests/models/test_monotonic_rejection_gp.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import unittest import numpy as np import torch from botorch.fit import fit_gpytorch_mll from gpytor...
aepsych-main
tests/models/test_model_query.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import unittest import torch # run on single threads to keep us from deadlocking weirdly ...
aepsych-main
tests/models/test_gp_classification.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import time import unittest import numpy as np import torch from aepsych.acquisition import MCLevelS...
aepsych-main
tests/generators/test_optimize_acqf_generator.py