ax.storage¶
JSON¶
ax.storage.json_store.decoder module¶
- ax.storage.json_store.decoder.ax_class_from_json_dict(_class: ~typing.Type, object_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Any [source]¶
Reinstantiates an Ax class registered in DECODER_REGISTRY from a JSON dict.
- ax.storage.json_store.decoder.data_from_json(data_by_trial_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Dict[int, OrderedDict[int, Data]] [source]¶
Load Ax Data from JSON.
- ax.storage.json_store.decoder.experiment_from_json(object_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Experiment [source]¶
Load Ax Experiment from JSON.
- ax.storage.json_store.decoder.generation_node_from_json(generation_node_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) GenerationNode [source]¶
Load GenerationNode object from JSON.
- ax.storage.json_store.decoder.generation_step_from_json(generation_step_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) GenerationStep [source]¶
Load generation step from JSON.
- ax.storage.json_store.decoder.generation_strategy_from_json(generation_strategy_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}, experiment: ~typing.Optional[~ax.core.experiment.Experiment] = None) GenerationStrategy [source]¶
Load generation strategy from JSON.
- ax.storage.json_store.decoder.generator_run_from_json(object_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) GeneratorRun [source]¶
Load Ax GeneratorRun from JSON.
- ax.storage.json_store.decoder.get_input_transform_json_components(input_transforms_json: ~typing.Optional[~typing.Union[~typing.List[~typing.Dict[str, ~typing.Any]], ~typing.Dict[str, ~typing.Any]]], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Tuple[Optional[List[Dict[str, Any]]], Optional[Dict[str, Any]]] [source]¶
- ax.storage.json_store.decoder.get_outcome_transform_json_components(outcome_transforms_json: ~typing.Optional[~typing.List[~typing.Dict[str, ~typing.Any]]], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Tuple[Optional[List[Dict[str, Any]]], Optional[Dict[str, Any]]] [source]¶
- ax.storage.json_store.decoder.model_spec_from_json(model_spec_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) ModelSpec [source]¶
Load ModelSpec from JSON.
- ax.storage.json_store.decoder.multi_type_experiment_from_json(object_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) MultiTypeExperiment [source]¶
Load AE MultiTypeExperiment from JSON.
- ax.storage.json_store.decoder.object_from_json(object_json: ~typing.Any, decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Any [source]¶
Recursively load objects from a JSON-serializable dictionary.
- ax.storage.json_store.decoder.parameter_constraints_from_json(parameter_constraint_json: ~typing.List[~typing.Dict[str, ~typing.Any]], parameters: ~typing.List[~ax.core.parameter.Parameter], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) List[ParameterConstraint] [source]¶
Load ParameterConstraints from JSON.
Order and SumConstraint are tied to a search space, and require that SearchSpace’s parameters to be passed in for decoding.
- Parameters:
parameter_constraint_json – JSON representation of parameter constraints.
parameters – Parameter definitions for decoding via parameter names.
- Returns:
Python classes for parameter constraints.
- Return type:
parameter_constraints
- ax.storage.json_store.decoder.search_space_from_json(search_space_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) SearchSpace [source]¶
Load a SearchSpace from JSON.
This function is necessary due to the coupled loading of SearchSpace and parameter constraints.
- ax.storage.json_store.decoder.surrogate_from_list_surrogate_json(list_surrogate_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Surrogate [source]¶
- ax.storage.json_store.decoder.transition_criteria_from_json(transition_criteria_json: ~typing.List[~typing.Dict[str, ~typing.Any]], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Optional[List[TransitionCriterion]] [source]¶
Load Ax TransitionCriteria from JSON.
This function is necessary due to the loading of TrialStatus in some, but not all, TransitionCriterion.
- ax.storage.json_store.decoder.trials_from_json(experiment: ~ax.core.experiment.Experiment, trials_json: ~typing.Dict[str, ~typing.Any], decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Dict[int, BaseTrial] [source]¶
Load Ax Trials from JSON.
ax.storage.json_store.decoders module¶
- ax.storage.json_store.decoders.batch_trial_from_json(experiment: core.experiment.Experiment, index: int, trial_type: Optional[str], status: TrialStatus, time_created: datetime, time_completed: Optional[datetime], time_staged: Optional[datetime], time_run_started: Optional[datetime], abandoned_reason: Optional[str], run_metadata: Optional[Dict[str, Any]], generator_run_structs: List[GeneratorRunStruct], runner: Optional[Runner], abandoned_arms_metadata: Dict[str, AbandonedArm], num_arms_created: int, status_quo: Optional[Arm], status_quo_weight_override: float, optimize_for_power: Optional[bool], failed_reason: Optional[str] = None, ttl_seconds: Optional[int] = None, generation_step_index: Optional[int] = None, properties: Optional[Dict[str, Any]] = None, stop_metadata: Optional[Dict[str, Any]] = None, lifecycle_stage: Optional[LifecycleStage] = None, **kwargs: Any) BatchTrial [source]¶
Load Ax BatchTrial from JSON.
Other classes don’t need explicit deserializers, because we can just use their constructors (see decoder.py). However, the constructor for Batch does not allow us to exactly recreate an existing object.
- ax.storage.json_store.decoders.botorch_component_from_json(botorch_class: Any, json: Dict[str, Any]) Type[Any] [source]¶
Load any instance of torch.nn.Module or descendants registered in CLASS_DECODER_REGISTRY from state dict.
- ax.storage.json_store.decoders.class_from_json(json: Dict[str, Any]) Type[Any] [source]¶
Load any class registered in CLASS_DECODER_REGISTRY from JSON.
- ax.storage.json_store.decoders.input_transform_type_from_json(object_json: Dict[str, Any]) Type[InputTransform] [source]¶
- ax.storage.json_store.decoders.outcome_transform_type_from_json(object_json: Dict[str, Any]) Type[OutcomeTransform] [source]¶
- ax.storage.json_store.decoders.pathlib_from_json(pathsegments: Union[str, Iterable[str]]) Path [source]¶
- ax.storage.json_store.decoders.tensor_or_size_from_json(json: Dict[str, Any]) Union[Tensor, Size] [source]¶
- ax.storage.json_store.decoders.transform_type_from_json(object_json: Dict[str, Any]) Type[Transform] [source]¶
Load the transform type from JSON.
- ax.storage.json_store.decoders.trial_from_json(experiment: core.experiment.Experiment, index: int, trial_type: Optional[str], status: TrialStatus, time_created: datetime, time_completed: Optional[datetime], time_staged: Optional[datetime], time_run_started: Optional[datetime], abandoned_reason: Optional[str], run_metadata: Optional[Dict[str, Any]], generator_run: GeneratorRun, runner: Optional[Runner], num_arms_created: int, failed_reason: Optional[str] = None, ttl_seconds: Optional[int] = None, generation_step_index: Optional[int] = None, properties: Optional[Dict[str, Any]] = None, stop_metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) Trial [source]¶
Load Ax trial from JSON.
Other classes don’t need explicit deserializers, because we can just use their constructors (see decoder.py). However, the constructor for Trial does not allow us to exactly recreate an existing object.
ax.storage.json_store.encoder module¶
- ax.storage.json_store.encoder.object_to_json(obj: ~typing.Any, encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, class_encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.models.torch.botorch_modular.acquisition.Acquisition'>: <function botorch_modular_to_dict>, <class 'botorch.acquisition.acquisition.AcquisitionFunction'>: <function botorch_modular_to_dict>, <class 'gpytorch.likelihoods.likelihood.Likelihood'>: <function botorch_modular_to_dict>, <class 'torch.nn.modules.module.Module'>: <function botorch_modular_to_dict>, <class 'gpytorch.mlls.marginal_log_likelihood.MarginalLogLikelihood'>: <function botorch_modular_to_dict>, <class 'botorch.models.model.Model'>: <function botorch_modular_to_dict>, <class 'ax.modelbridge.transforms.base.Transform'>: <function transform_type_to_dict>}) Any [source]¶
Convert an Ax object to a JSON-serializable dictionary.
The root node passed to this function should always be an instance of a core Ax class or a JSON-compatible python builtin. The sub-fields of the input will then be recursively passed to this function.
e.g. if we pass an instance of Experiment, we will first fall through to the line object_dict = ENCODER_REGISTRY[_type](object), which will convert the Experiment to a (shallow) dictionary, where search subfield remains “unconverted”, i.e.: {“name”: <name: string>, “search_space”: <search space: SearchSpace>}. We then pass each item of the dictionary back into this function to recursively convert the entire object.
ax.storage.json_store.encoders module¶
- ax.storage.json_store.encoders.arm_to_dict(arm: Arm) Dict[str, Any] [source]¶
Convert Ax arm to a dictionary.
- ax.storage.json_store.encoders.batch_to_dict(batch: BatchTrial) Dict[str, Any] [source]¶
Convert Ax batch to a dictionary.
- ax.storage.json_store.encoders.benchmark_problem_to_dict(benchmark_problem: BenchmarkProblem) Dict[str, Any] [source]¶
Convert Ax benchmark problem to a dictionary.
- ax.storage.json_store.encoders.botorch_input_transform_to_init_args(input_transform: InputTransform) Dict[str, Any] [source]¶
Extract the init kwargs from an input transform.
- ax.storage.json_store.encoders.botorch_model_to_dict(model: BoTorchModel) Dict[str, Any] [source]¶
Convert Ax model to a dictionary.
- ax.storage.json_store.encoders.botorch_modular_to_dict(class_type: Type[Any]) Dict[str, Any] [source]¶
Convert any class to a dictionary.
- ax.storage.json_store.encoders.choice_parameter_to_dict(parameter: ChoiceParameter) Dict[str, Any] [source]¶
Convert Ax choice parameter to a dictionary.
- ax.storage.json_store.encoders.data_to_dict(data: Data) Dict[str, Any] [source]¶
Convert Ax data to a dictionary.
- ax.storage.json_store.encoders.experiment_to_dict(experiment: Experiment) Dict[str, Any] [source]¶
Convert Ax experiment to a dictionary.
- ax.storage.json_store.encoders.fixed_parameter_to_dict(parameter: FixedParameter) Dict[str, Any] [source]¶
Convert Ax fixed parameter to a dictionary.
- ax.storage.json_store.encoders.generation_node_to_dict(generation_node: GenerationNode) Dict[str, Any] [source]¶
Convert Ax generation node to a dictionary.
- ax.storage.json_store.encoders.generation_step_to_dict(generation_step: GenerationStep) Dict[str, Any] [source]¶
Converts Ax generation step to a dictionary.
- ax.storage.json_store.encoders.generation_strategy_to_dict(generation_strategy: GenerationStrategy) Dict[str, Any] [source]¶
Converts Ax generation strategy to a dictionary.
- ax.storage.json_store.encoders.generator_run_to_dict(generator_run: GeneratorRun) Dict[str, Any] [source]¶
Convert Ax generator run to a dictionary.
- ax.storage.json_store.encoders.improvement_global_stopping_strategy_to_dict(gss: ImprovementGlobalStoppingStrategy) Dict[str, Any] [source]¶
Convert ImprovementGlobalStoppingStrategy to a dictionary.
- ax.storage.json_store.encoders.logical_early_stopping_strategy_to_dict(strategy: LogicalEarlyStoppingStrategy) Dict[str, Any] [source]¶
- ax.storage.json_store.encoders.map_data_to_dict(map_data: MapData) Dict[str, Any] [source]¶
Convert Ax map data to a dictionary.
- ax.storage.json_store.encoders.map_key_info_to_dict(mki: MapKeyInfo) Dict[str, Any] [source]¶
Convert Ax map data metadata to a dictionary.
- ax.storage.json_store.encoders.metric_to_dict(metric: Metric) Dict[str, Any] [source]¶
Convert Ax metric to a dictionary.
- ax.storage.json_store.encoders.model_spec_to_dict(model_spec: ModelSpec) Dict[str, Any] [source]¶
Convert Ax model spec to a dictionary.
- ax.storage.json_store.encoders.multi_objective_benchmark_problem_to_dict(moo_benchmark_problem: MultiObjectiveBenchmarkProblem) Dict[str, Any] [source]¶
Convert Ax multi-objective benchmark problem to a dictionary.
- ax.storage.json_store.encoders.multi_objective_optimization_config_to_dict(multi_objective_optimization_config: MultiObjectiveOptimizationConfig) Dict[str, Any] [source]¶
Convert Ax optimization config to a dictionary.
- ax.storage.json_store.encoders.multi_objective_to_dict(objective: MultiObjective) Dict[str, Any] [source]¶
Convert Ax objective to a dictionary.
- ax.storage.json_store.encoders.multi_type_experiment_to_dict(experiment: MultiTypeExperiment) Dict[str, Any] [source]¶
Convert AE multitype experiment to a dictionary.
- ax.storage.json_store.encoders.objective_to_dict(objective: Objective) Dict[str, Any] [source]¶
Convert Ax objective to a dictionary.
- ax.storage.json_store.encoders.observation_features_to_dict(obs_features: ObservationFeatures) Dict[str, Any] [source]¶
Converts Ax observation features to a dictionary
- ax.storage.json_store.encoders.optimization_config_to_dict(optimization_config: OptimizationConfig) Dict[str, Any] [source]¶
Convert Ax optimization config to a dictionary.
- ax.storage.json_store.encoders.order_parameter_constraint_to_dict(parameter_constraint: OrderConstraint) Dict[str, Any] [source]¶
Convert Ax order parameter constraint to a dictionary.
- ax.storage.json_store.encoders.outcome_constraint_to_dict(outcome_constraint: OutcomeConstraint) Dict[str, Any] [source]¶
Convert Ax outcome constraint to a dictionary.
- ax.storage.json_store.encoders.parameter_constraint_to_dict(parameter_constraint: ParameterConstraint) Dict[str, Any] [source]¶
Convert Ax sum parameter constraint to a dictionary.
- ax.storage.json_store.encoders.parameter_distribution_to_dict(dist: ParameterDistribution) Dict[str, Any] [source]¶
Convert a parameter distribution to a dictionary.
- ax.storage.json_store.encoders.percentile_early_stopping_strategy_to_dict(strategy: PercentileEarlyStoppingStrategy) Dict[str, Any] [source]¶
Convert Ax percentile early stopping strategy to a dictionary.
- ax.storage.json_store.encoders.pytorch_cnn_torchvision_benchmark_problem_to_dict(problem: PyTorchCNNTorchvisionBenchmarkProblem) Dict[str, Any] [source]¶
- ax.storage.json_store.encoders.range_parameter_to_dict(parameter: RangeParameter) Dict[str, Any] [source]¶
Convert Ax range parameter to a dictionary.
- ax.storage.json_store.encoders.risk_measure_to_dict(risk_measure: RiskMeasure) Dict[str, Any] [source]¶
Convert a RiskMeasure to a dictionary.
- ax.storage.json_store.encoders.robust_search_space_to_dict(rss: RobustSearchSpace) Dict[str, Any] [source]¶
Convert robust search space to a dictionary.
- ax.storage.json_store.encoders.runner_to_dict(runner: Runner) Dict[str, Any] [source]¶
Convert Ax runner to a dictionary.
- ax.storage.json_store.encoders.scalarized_objective_to_dict(objective: ScalarizedObjective) Dict[str, Any] [source]¶
Convert Ax objective to a dictionary.
- ax.storage.json_store.encoders.search_space_to_dict(search_space: SearchSpace) Dict[str, Any] [source]¶
Convert Ax search space to a dictionary.
- ax.storage.json_store.encoders.single_objective_benchmark_problem_to_dict(soo_benchmark_problem: SingleObjectiveBenchmarkProblem) Dict[str, Any] [source]¶
- ax.storage.json_store.encoders.sum_parameter_constraint_to_dict(parameter_constraint: SumConstraint) Dict[str, Any] [source]¶
Convert Ax sum parameter constraint to a dictionary.
- ax.storage.json_store.encoders.surrogate_to_dict(surrogate: Surrogate) Dict[str, Any] [source]¶
Convert Ax surrogate to a dictionary.
- ax.storage.json_store.encoders.threshold_early_stopping_strategy_to_dict(strategy: ThresholdEarlyStoppingStrategy) Dict[str, Any] [source]¶
Convert Ax metric-threshold early stopping strategy to a dictionary.
- ax.storage.json_store.encoders.transform_type_to_dict(transform_type: Type[Transform]) Dict[str, Any] [source]¶
Convert a transform class to a dictionary.
- ax.storage.json_store.encoders.transition_criterion_to_dict(criterion: TransitionCriterion) Dict[str, Any] [source]¶
Convert Ax TransitionCriterion to a dictionary.
ax.storage.json_store.load module¶
- ax.storage.json_store.load.load_experiment(filepath: str, decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>}) Experiment [source]¶
Load experiment from file.
Read file.
Convert dictionary to Ax experiment instance.
ax.storage.json_store.registry module¶
ax.storage.json_store.save module¶
- ax.storage.json_store.save.save_experiment(experiment: ~ax.core.experiment.Experiment, filepath: str, encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, class_encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.models.torch.botorch_modular.acquisition.Acquisition'>: <function botorch_modular_to_dict>, <class 'botorch.acquisition.acquisition.AcquisitionFunction'>: <function botorch_modular_to_dict>, <class 'gpytorch.likelihoods.likelihood.Likelihood'>: <function botorch_modular_to_dict>, <class 'torch.nn.modules.module.Module'>: <function botorch_modular_to_dict>, <class 'gpytorch.mlls.marginal_log_likelihood.MarginalLogLikelihood'>: <function botorch_modular_to_dict>, <class 'botorch.models.model.Model'>: <function botorch_modular_to_dict>, <class 'ax.modelbridge.transforms.base.Transform'>: <function transform_type_to_dict>}) None [source]¶
Save experiment to file.
Convert Ax experiment to JSON-serializable dictionary.
Write to file.
SQLAlchemy (MySQL / SQLite)¶
ax.storage.sqa_store.base_decoder module¶
- class ax.storage.sqa_store.decoder.Decoder(config: SQAConfig)[source]¶
Bases:
object
Class that contains methods for loading an Ax experiment from SQLAlchemy.
Instantiate with an instance of Config to customize the functionality. For even more flexibility, create a subclass.
- config¶
Metadata needed to save and load an experiment to SQLAlchemy.
- abandoned_arm_from_sqa(abandoned_arm_sqa: SQAAbandonedArm) AbandonedArm [source]¶
Convert SQLAlchemy AbandonedArm to Ax AbandonedArm.
- data_from_sqa(data_sqa: ~ax.storage.sqa_store.sqa_classes.SQAData, data_constructor: ~typing.Type[~ax.core.data.Data] = <class 'ax.core.data.Data'>) Data [source]¶
Convert SQLAlchemy Data to AE Data.
- environmental_variable_from_sqa(parameter_sqa: SQAParameter) Parameter [source]¶
Convert SQLAlchemy Parameter to Ax environmental variable.
- experiment_from_sqa(experiment_sqa: SQAExperiment, reduced_state: bool = False, ax_object_field_overrides: Optional[Dict[str, Any]] = None) Experiment [source]¶
Convert SQLAlchemy Experiment to Ax Experiment.
- Parameters:
experiment_sqa – SQAExperiment to decode.
reduced_state – Whether to load experiment with a slightly reduced state (without abandoned arms on experiment and without model state, search space, and optimization config on generator runs).
ax_object_field_overrides – Mapping of object types to mapping of fields to override values loaded objects will all be instantiated with fields set to override value current valid object types are: “runner”
- generation_strategy_from_sqa(gs_sqa: SQAGenerationStrategy, experiment: Optional[Experiment] = None, reduced_state: bool = False) GenerationStrategy [source]¶
Convert SQALchemy generation strategy to Ax GenerationStrategy.
- generator_run_from_sqa(generator_run_sqa: SQAGeneratorRun, reduced_state: bool, immutable_search_space_and_opt_config: bool) GeneratorRun [source]¶
Convert SQLAlchemy GeneratorRun to Ax GeneratorRun.
- Parameters:
generator_run_sqa – SQAGeneratorRun to decode.
reduced_state – Whether to load generator runs with a slightly reduced state (without model state, search space, and optimization config).
immutable_search_space_and_opt_config – Whether to load generator runs without search space and optimization config. Unlike reduced_state, we do still load model state.
- get_enum_name(value: Optional[int], enum: Optional[Enum]) Optional[str] [source]¶
Given an enum value (int) and an enum (of ints), return the corresponding enum name. If the value is not present in the enum, throw an error.
- metric_from_sqa(metric_sqa: SQAMetric) Union[Metric, Objective, OutcomeConstraint, RiskMeasure] [source]¶
Convert SQLAlchemy Metric to Ax Metric, Objective, or OutcomeConstraint.
- opt_config_and_tracking_metrics_from_sqa(metrics_sqa: List[SQAMetric]) Tuple[Optional[OptimizationConfig], List[Metric]] [source]¶
Convert a list of SQLAlchemy Metrics to a a tuple of Ax OptimizationConfig and tracking metrics.
- parameter_constraint_from_sqa(parameter_constraint_sqa: SQAParameterConstraint, parameters: List[Parameter]) ParameterConstraint [source]¶
Convert SQLAlchemy ParameterConstraint to Ax ParameterConstraint.
- parameter_distributions_from_sqa(parameter_constraint_sqa_list: List[SQAParameterConstraint]) Tuple[List[ParameterDistribution], Optional[int]] [source]¶
Convert SQLAlchemy ParameterConstraints to Ax ParameterDistributions.
- parameter_from_sqa(parameter_sqa: SQAParameter) Parameter [source]¶
Convert SQLAlchemy Parameter to Ax Parameter.
- runner_from_sqa(runner_sqa: SQARunner, runner_kwargs: Optional[Dict[str, Any]] = None) Runner [source]¶
Convert SQLAlchemy Runner to Ax Runner.
- search_space_from_sqa(parameters_sqa: List[SQAParameter], parameter_constraints_sqa: List[SQAParameterConstraint]) Optional[SearchSpace] [source]¶
Convert a list of SQLAlchemy Parameters and ParameterConstraints to an Ax SearchSpace.
- trial_from_sqa(trial_sqa: SQATrial, experiment: Experiment, reduced_state: bool = False, ax_object_field_overrides: Optional[Dict[str, Any]] = None) BaseTrial [source]¶
Convert SQLAlchemy Trial to Ax Trial.
- Parameters:
trial_sqa – SQATrial to decode.
reduced_state – Whether to load trial’s generator run(s) with a slightly
state (reduced) –
ax.storage.sqa_store.base_encoder module¶
- class ax.storage.sqa_store.encoder.Encoder(config: SQAConfig)[source]¶
Bases:
object
Class that contains methods for storing an Ax experiment to SQLAlchemy.
Instantiate with an instance of Config to customize the functionality. For even more flexibility, create a subclass.
- config¶
Metadata needed to save and load an experiment to SQLAlchemy.
- abandoned_arm_to_sqa(abandoned_arm: AbandonedArm) SQAAbandonedArm [source]¶
Convert Ax AbandonedArm to SQLAlchemy.
- data_to_sqa(data: Data, trial_index: Optional[int], timestamp: int) SQAData [source]¶
Convert Ax data to SQLAlchemy.
- environmental_variable_to_sqa(parameter: Parameter) SQAParameter [source]¶
Convert Ax environmental variables to SQLAlchemy.
Since these are effectively just range parameters with an associated distribution, which is stored separately, we will store these as new parameter types.
- experiment_data_to_sqa(experiment: Experiment) List[SQAData] [source]¶
Convert Ax experiment data to SQLAlchemy.
- experiment_to_sqa(experiment: Experiment) SQAExperiment [source]¶
Convert Ax Experiment to SQLAlchemy.
In addition to creating and storing a new Experiment object, we need to create and store copies of the Trials, Metrics, Parameters, ParameterConstraints, and Runner owned by this Experiment.
- generation_strategy_to_sqa(generation_strategy: GenerationStrategy, experiment_id: Optional[int], generator_run_reduced_state: bool = False) SQAGenerationStrategy [source]¶
Convert an Ax GenerationStrategy to SQLAlchemy, preserving its state, so that the restored generation strategy can be resumed from the point at which it was interrupted and stored.
- generator_run_to_sqa(generator_run: GeneratorRun, weight: Optional[float] = None, reduced_state: bool = False) SQAGeneratorRun [source]¶
Convert Ax GeneratorRun to SQLAlchemy.
In addition to creating and storing a new GeneratorRun object, we need to create and store copies of the Arms, Metrics, Parameters, and ParameterConstraints owned by this GeneratorRun.
- get_children_metrics_by_name(metrics: List[Metric], weights: List[float]) Dict[str, Tuple[Metric, float, SQAMetric, Tuple[int, Dict[str, Any]]]] [source]¶
- get_enum_value(value: Optional[str], enum: Optional[Enum]) Optional[int] [source]¶
Given an enum name (string) and an enum (of ints), return the corresponding enum value. If the name is not present in the enum, throw an error.
- get_metric_type_and_properties(metric: Metric) Tuple[int, Dict[str, Any]] [source]¶
Given an Ax Metric, convert its type into a member of MetricType enum, and construct a dictionary to be stored in the database properties json blob.
- multi_objective_to_sqa(multi_objective: MultiObjective) SQAMetric [source]¶
Convert Ax Multi Objective to SQLAlchemy.
- Returns: A parent SQAMetric, whose children are the SQAMetric-s
corresponding to metrics attribute of MultiObjective. NOTE: The parent is used as a placeholder for storage purposes.
- objective_threshold_to_sqa(objective_threshold: ObjectiveThreshold) SQAMetric [source]¶
Convert Ax OutcomeConstraint to SQLAlchemy.
- optimization_config_to_sqa(optimization_config: Optional[OptimizationConfig]) List[SQAMetric] [source]¶
Convert Ax OptimizationConfig to a list of SQLAlchemy Metrics.
- outcome_constraint_to_sqa(outcome_constraint: OutcomeConstraint) SQAMetric [source]¶
Convert Ax OutcomeConstraint to SQLAlchemy.
- parameter_constraint_to_sqa(parameter_constraint: ParameterConstraint) SQAParameterConstraint [source]¶
Convert Ax ParameterConstraint to SQLAlchemy.
- parameter_distribution_to_sqa(distribution: ParameterDistribution, num_samples: int) SQAParameterConstraint [source]¶
Convert Ax ParameterDistribution to SQLAlchemy.
NOTE: This saves the distributions as json blobs in constraint_dict to avoid creating a new table in the short term. If robust optimization sees more usage in the long term, the proper solution would be to make a new table for these.
- parameter_to_sqa(parameter: Parameter) SQAParameter [source]¶
Convert Ax Parameter to SQLAlchemy.
- risk_measure_to_sqa(risk_measure: RiskMeasure) SQAMetric [source]¶
Convert Ax RiskMeasure to SQLAlchemy.
- robust_search_space_to_sqa(rss: RobustSearchSpace) Tuple[List[SQAParameter], List[SQAParameterConstraint]] [source]¶
- runner_to_sqa(runner: Runner, trial_type: Optional[str] = None) SQARunner [source]¶
Convert Ax Runner to SQLAlchemy.
- scalarized_objective_to_sqa(objective: ScalarizedObjective) SQAMetric [source]¶
Convert Ax Scalarized Objective to SQLAlchemy.
- Returns: A parent SQAMetric, whose children are the SQAMetric-s
corresponding to metrics attribute of ScalarizedObjective. NOTE: The parent is used as a placeholder for storage purposes.
- scalarized_outcome_constraint_to_sqa(outcome_constraint: ScalarizedOutcomeConstraint) SQAMetric [source]¶
Convert Ax SCalarized OutcomeConstraint to SQLAlchemy.
- search_space_to_sqa(search_space: Optional[SearchSpace]) Tuple[List[SQAParameter], List[SQAParameterConstraint]] [source]¶
Convert Ax SearchSpace to a list of SQLAlchemy Parameters and ParameterConstraints.
ax.storage.sqa_store.db module¶
- class ax.storage.sqa_store.db.SQABase[source]¶
Bases:
object
Metaclass for SQLAlchemy classes corresponding to core Ax classes.
- ax.storage.sqa_store.db.create_all_tables(engine: sqlalchemy.engine.base.Engine) None [source]¶
Create all tables that inherit from Base.
- Parameters:
engine – a SQLAlchemy engine with a connection to a MySQL or SQLite DB.
Note
In order for all tables to be correctly created, all modules that define a mapped class that inherits from Base must be imported.
- ax.storage.sqa_store.db.create_mysql_engine_from_creator(creator: Callable, echo: bool = False, pool_recycle: int = 10, **kwargs: Any) sqlalchemy.engine.base.Engine [source]¶
Create a SQLAlchemy engine with the MySQL dialect given a creator function.
- Parameters:
creator – a callable which returns a DBAPI connection.
echo – if True, set engine to be verbose.
pool_recycle – number of seconds after which to recycle connections. -1 means no timeout. Default is 10 seconds.
**kwargs – keyword args passed to create_engine
- Returns:
SQLAlchemy engine with connection to MySQL DB.
- Return type:
Engine
- ax.storage.sqa_store.db.create_mysql_engine_from_url(url: str, echo: bool = False, pool_recycle: int = 10, **kwargs: Any) sqlalchemy.engine.base.Engine [source]¶
Create a SQLAlchemy engine with the MySQL dialect given a database url.
- Parameters:
url – a database url that can include username, password, hostname, database name as well as optional keyword arguments for additional configuration. e.g. dialect+driver://username:password@host:port/database.
echo – if True, set engine to be verbose.
pool_recycle – number of seconds after which to recycle connections. -1 means no timeout. Default is 10 seconds.
**kwargs – keyword args passed to create_engine
- Returns:
SQLAlchemy engine with connection to MySQL DB.
- Return type:
Engine
- ax.storage.sqa_store.db.create_test_engine(path: Optional[str] = None, echo: bool = True) sqlalchemy.engine.base.Engine [source]¶
Creates a SQLAlchemy engine object for use in unit tests.
- Parameters:
path – if None, use in-memory SQLite; else attempt to create a SQLite DB in the path provided.
echo – if True, set engine to be verbose.
- Returns:
an instance of SQLAlchemy engine.
- Return type:
Engine
- ax.storage.sqa_store.db.get_engine() sqlalchemy.engine.base.Engine [source]¶
Fetch a SQLAlchemy engine, if already initialized.
If not initialized, need to either call init_engine_and_session_factory or get_session explicitly.
- Returns:
an instance of a SQLAlchemy engine with a connection to a DB.
- Return type:
Engine
- ax.storage.sqa_store.db.get_session() sqlalchemy.orm.Session [source]¶
Fetch a SQLAlchemy session with a connection to a DB.
- Returns:
an instance of a SQLAlchemy session.
- Return type:
Session
- ax.storage.sqa_store.db.init_engine_and_session_factory(url: Optional[str] = None, creator: Optional[Callable] = None, echo: bool = False, force_init: bool = False, **kwargs: Any) None [source]¶
Initialize the global engine and SESSION_FACTORY for SQLAlchemy.
The initialization needs to only happen once. Note that it is possible to re-initialize the engine by setting the force_init flag to True, but this should only be used if you are absolutely certain that you know what you are doing.
- Parameters:
url – a database url that can include username, password, hostname, database name as well as optional keyword arguments for additional configuration. e.g. dialect+driver://username:password@host:port/database. Either this argument or creator argument must be specified.
creator – a callable which returns a DBAPI connection. Either this argument or url argument must be specified.
echo – if True, logging for engine is enabled.
force_init – if True, allows re-initializing engine and session factory.
**kwargs – keyword arguments passed to create_mysql_engine_from_creator
- ax.storage.sqa_store.db.init_test_engine_and_session_factory(tier_or_path: Optional[str] = None, echo: bool = False, force_init: bool = False, **kwargs: Any) None [source]¶
Initialize the global engine and SESSION_FACTORY for SQLAlchemy, using an in-memory SQLite database.
The initialization needs to only happen once. Note that it is possible to re-initialize the engine by setting the force_init flag to True, but this should only be used if you are absolutely certain that you know what you are doing.
- Parameters:
tier_or_path – the name of the DB tier.
echo – if True, logging for engine is enabled.
force_init – if True, allows re-initializing engine and session factory.
**kwargs – keyword arguments passed to create_mysql_engine_from_creator
ax.storage.sqa_store.delete module¶
- ax.storage.sqa_store.delete.delete_experiment(exp_name: str) None [source]¶
Delete experiment by name.
- Parameters:
experiment_name – Name of the experiment to delete.
- ax.storage.sqa_store.delete.delete_generation_strategy(exp_name: str, config: Optional[SQAConfig] = None) None [source]¶
Delete the generation strategy associated with an experiment
- Parameters:
exp_name – Name of the experiment for which the generation strategy should be deleted.
config – The SQAConfig.
ax.storage.sqa_store.json module¶
- ax.storage.sqa_store.json.JSONEncodedDict¶
alias of
JSONEncodedObject
- ax.storage.sqa_store.json.JSONEncodedList¶
alias of
JSONEncodedObject
- class ax.storage.sqa_store.json.JSONEncodedLongText(*args: Any, **kwargs: Any)[source]¶
Bases:
JSONEncodedObject
Class for JSON-encoding objects in SQLAlchemy, backed by MEDIUMTEXT (MySQL).
See description in JSONEncodedObject.
- impl: sqlalchemy.types.VARCHAR = 4294967295¶
- ax.storage.sqa_store.json.JSONEncodedLongTextDict¶
alias of
JSONEncodedLongText
- class ax.storage.sqa_store.json.JSONEncodedMediumText(*args: Any, **kwargs: Any)[source]¶
Bases:
JSONEncodedObject
Class for JSON-encoding objects in SQLAlchemy, backed by MEDIUMTEXT (MySQL).
See description in JSONEncodedObject.
- impl: sqlalchemy.types.VARCHAR = 16777215¶
- class ax.storage.sqa_store.json.JSONEncodedObject(*args: Any, **kwargs: Any)[source]¶
Bases:
TypeDecorator
Class for JSON-encoding objects in SQLAlchemy.
Represents an object that is automatically marshalled and unmarshalled to/from the corresponding JSON string. By itself, this data structure does not track any changes.
- cache_ok = True¶
- impl: sqlalchemy.types.VARCHAR = 4096¶
- class ax.storage.sqa_store.json.JSONEncodedText(*args: Any, **kwargs: Any)[source]¶
Bases:
JSONEncodedObject
Class for JSON-encoding objects in SQLAlchemy, backed by TEXT (MySQL).
See description in JSONEncodedObject.
- object_pairs_hook: Any¶
- ax.storage.sqa_store.json.JSONEncodedTextDict¶
alias of
JSONEncodedText
ax.storage.sqa_store.load module¶
- ax.storage.sqa_store.load.get_generation_strategy_id(experiment_name: str, decoder: Decoder) Optional[int] [source]¶
Get DB ID of the generation strategy, associated with the experiment with the given name if its in DB, return None otherwise.
- ax.storage.sqa_store.load.get_generation_strategy_sqa(gs_id: int, decoder: Decoder, query_options: Optional[List[Any]] = None) SQAGenerationStrategy [source]¶
Obtains the SQLAlchemy generation strategy object from DB.
- ax.storage.sqa_store.load.get_generation_strategy_sqa_reduced_state(gs_id: int, decoder: Decoder) SQAGenerationStrategy [source]¶
Obtains most of the SQLAlchemy generation strategy object from DB.
- ax.storage.sqa_store.load.get_generator_runs_by_id(generator_run_ids: List[int], decoder: Decoder, reduced_state: bool = False, immutable_search_space_and_opt_config: bool = False) List[GeneratorRun] [source]¶
Bulk fetches generator runs by id.
- ax.storage.sqa_store.load.load_experiment(experiment_name: str, config: Optional[SQAConfig] = None, reduced_state: bool = False, load_trials_in_batches_of_size: Optional[int] = None, skip_runners_and_metrics: bool = False) Experiment [source]¶
Load experiment by name.
- Parameters:
experiment_name – Name of the expeirment to load.
config – SQAConfig, from which to retrieve the decoder. Optional, defaults to base SQAConfig.
reduced_state – Whether to load experiment with a slightly reduced state (without abandoned arms on experiment and withoug model state, search space, and optimization config on generator runs).
skip_runners_and_metrics – If True skip loading runners, and do only a minimal load of metrics. This option is intended to enable loading of experiments that require custom runners or metrics, without depending on a registry. Note that even though the intention is to skip loading of metrics, this option converts the loaded metrics into a base metric avoiding conversion related to custom properties of the metric.
- ax.storage.sqa_store.load.load_generation_strategy_by_experiment_name(experiment_name: str, config: Optional[SQAConfig] = None, experiment: Optional[Experiment] = None, reduced_state: bool = False, skip_runners_and_metrics: bool = False) GenerationStrategy [source]¶
Finds a generation strategy attached to an experiment specified by a name and restores it from its corresponding SQA object.
- ax.storage.sqa_store.load.load_generation_strategy_by_id(gs_id: int, config: Optional[SQAConfig] = None, experiment: Optional[Experiment] = None, reduced_state: bool = False) GenerationStrategy [source]¶
Finds a generation strategy stored by a given ID and restores it.
ax.storage.sqa_store.save module¶
- ax.storage.sqa_store.save.save_experiment(experiment: Experiment, config: Optional[SQAConfig] = None) None [source]¶
Save experiment (using default SQAConfig).
- ax.storage.sqa_store.save.save_generation_strategy(generation_strategy: GenerationStrategy, config: Optional[SQAConfig] = None) int [source]¶
Save generation strategy (using default SQAConfig if no config is specified). If the generation strategy has an experiment set, the experiment will be saved first.
- Returns:
The ID of the saved generation strategy.
- ax.storage.sqa_store.save.save_or_update_trial(experiment: Experiment, trial: BaseTrial, config: Optional[SQAConfig] = None) None [source]¶
Add new trial to the experiment, or update if already exists (using default SQAConfig).
- ax.storage.sqa_store.save.save_or_update_trials(experiment: Experiment, trials: List[BaseTrial], config: Optional[SQAConfig] = None, batch_size: Optional[int] = None, reduce_state_generator_runs: bool = False) None [source]¶
Add new trials to the experiment, or update if already exists (using default SQAConfig).
Note that new data objects (whether attached to existing or new trials) will also be added to the experiment, but existing data objects in the database will not be updated or removed.
- ax.storage.sqa_store.save.update_generation_strategy(generation_strategy: GenerationStrategy, generator_runs: List[GeneratorRun], config: Optional[SQAConfig] = None, batch_size: Optional[int] = None, reduce_state_generator_runs: bool = False) None [source]¶
Update generation strategy’s current step and attach generator runs (using default SQAConfig).
- ax.storage.sqa_store.save.update_outcome_constraint_on_experiment(experiment: Experiment, outcome_constraint: OutcomeConstraint, encoder: Encoder, decoder: Decoder) None [source]¶
- ax.storage.sqa_store.save.update_properties_on_experiment(experiment_with_updated_properties: Experiment, config: Optional[SQAConfig] = None) None [source]¶
ax.storage.sqa_store.structs module¶
- class ax.storage.sqa_store.structs.DBSettings(creator: ~typing.Optional[~typing.Callable] = None, decoder: ~ax.storage.sqa_store.decoder.Decoder = <ax.storage.sqa_store.decoder.Decoder object>, encoder: ~ax.storage.sqa_store.encoder.Encoder = <ax.storage.sqa_store.encoder.Encoder object>, url: ~typing.Optional[str] = None)[source]¶
Bases:
NamedTuple
Defines behavior for loading/saving experiment to/from db. Either creator or url must be specified as a way to connect to the SQL db.
ax.storage.sqa_store.sqa_classes module¶
- class ax.storage.sqa_store.sqa_classes.SQAAbandonedArm(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- time_abandoned¶
alias of
IntTimestamp
- class ax.storage.sqa_store.sqa_classes.SQAArm(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- class ax.storage.sqa_store.sqa_classes.SQAData(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- class ax.storage.sqa_store.sqa_classes.SQAExperiment(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- generation_strategy: Optional[SQAGenerationStrategy] = 'SQAGenerationStrategy'¶
- parameter_constraints: List[SQAParameterConstraint] = 'SQAParameterConstraint'¶
- parameters: List[SQAParameter] = 'SQAParameter'¶
- time_created¶
alias of
IntTimestamp
- class ax.storage.sqa_store.sqa_classes.SQAGenerationStrategy(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- generator_runs: List[SQAGeneratorRun] = 'SQAGeneratorRun'¶
- class ax.storage.sqa_store.sqa_classes.SQAGeneratorRun(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- parameter_constraints: List[SQAParameterConstraint] = 'SQAParameterConstraint'¶
- parameters: List[SQAParameter] = 'SQAParameter'¶
- time_created¶
alias of
IntTimestamp
- class ax.storage.sqa_store.sqa_classes.SQAMetric(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- scalarized_objective_children_metrics = 'SQAMetric'¶
- scalarized_outcome_constraint_children_metrics = 'SQAMetric'¶
- class ax.storage.sqa_store.sqa_classes.SQAParameter(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- dependents¶
alias of
JSONEncodedObject
- fixed_value¶
alias of
JSONEncodedObject
- target_value¶
alias of
JSONEncodedObject
- class ax.storage.sqa_store.sqa_classes.SQAParameterConstraint(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- class ax.storage.sqa_store.sqa_classes.SQARunner(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- class ax.storage.sqa_store.sqa_classes.SQATrial(*args: Any, **kwargs: Any)[source]¶
Bases:
declarative_base
- abandoned_arms: List[SQAAbandonedArm] = 'SQAAbandonedArm'¶
- generator_runs: List[SQAGeneratorRun] = 'SQAGeneratorRun'¶
- time_completed¶
alias of
IntTimestamp
- time_created¶
alias of
IntTimestamp
- time_run_started¶
alias of
IntTimestamp
- time_staged¶
alias of
IntTimestamp
ax.storage.sqa_store.sqa_config module¶
- class ax.storage.sqa_store.sqa_config.SQAConfig(class_to_sqa_class: ~typing.Dict[~typing.Type[~ax.utils.common.base.Base], ~typing.Type[~ax.storage.sqa_store.db.SQABase]] = <factory>, experiment_type_enum: ~typing.Optional[~enum.Enum] = None, generator_run_type_enum: ~typing.Optional[~enum.Enum] = <enum 'GeneratorRunType'>, json_encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = <factory>, json_class_encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = <factory>, json_decoder_registry: ~typing.Dict[str, ~typing.Type] = <factory>, json_class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = <factory>, metric_registry: ~typing.Dict[~typing.Type[~ax.core.metric.Metric], int] = <factory>, runner_registry: ~typing.Dict[~typing.Type[~ax.core.runner.Runner], int] = <factory>)[source]
Bases:
object
Metadata needed to save and load an experiment to SQLAlchemy.
- class_to_sqa_class
Mapping of user-facing class to SQLAlchemy class that it will be encoded to. This allows overwriting of the default classes to provide custom save functionality.
- Type:
Dict[Type[ax.utils.common.base.Base], Type[ax.storage.sqa_store.db.SQABase]]
- experiment_type_enum
Enum containing valid Experiment types.
- Type:
Optional[enum.Enum]
- generator_run_type_enum
Enum containing valid Generator Run types.
- Type:
Optional[enum.Enum]
- json_encoder_registry
Mapping from user-facing types to their json serialization function.
- Type:
Dict[Type, Callable[[Any], Dict[str, Any]]]
- generator_run_type_enum
alias of
GeneratorRunType
ax.storage.sqa_store.sqa_enum module¶
- class ax.storage.sqa_store.sqa_enum.BaseNullableEnum(*args: Any, **kwargs: Any)[source]¶
Bases:
TypeDecorator
- cache_ok = True¶
- class ax.storage.sqa_store.sqa_enum.IntEnum(*args: Any, **kwargs: Any)[source]¶
Bases:
BaseNullableEnum
ax.storage.sqa_store.timestamp module¶
ax.storage.sqa_store.utils module¶
- ax.storage.sqa_store.utils.copy_db_ids(source: Any, target: Any, path: Optional[List[str]] = None) None [source]¶
Takes as input two objects, source and target, that should be identical, except that source has _db_ids set and target doesn’t. Recursively copies the _db_ids from source to target.
Raise a SQADecodeError when the assumption of equality on source and target is violated, since this method is meant to be used when returning a new user-facing object after saving.
ax.storage.sqa_store.validation module¶
- ax.storage.sqa_store.validation.consistency_exactly_one(instance: SQABase, exactly_one_fields: List[str]) Any [source]¶
Ensure that exactly one of exactly_one_fields has a value set.
ax.storage.sqa_store.reduced_state module¶
- ax.storage.sqa_store.reduced_state.get_query_options_to_defer_immutable_duplicates() List[sqlalchemy.orm.strategy_options.Load] [source]¶
Returns the query options that defer loading of attributes that are duplicated on each trial (like search space attributes and metrics). These attributes do not need to be loaded for experiments with immutable search space and optimization configuration.
- ax.storage.sqa_store.reduced_state.get_query_options_to_defer_large_model_cols() List[sqlalchemy.orm.strategy_options.Load] [source]¶
Returns the query options that defer loading of model-state-related columns of generator runs, which can be large and are not needed on every generator run when loading experiment and generation strategy in reduced state.
Registries¶
- ax.storage.botorch_modular_registry.ACQUISITION_FUNCTION_REGISTRY: Dict[Type[AcquisitionFunction], str] = {<class 'botorch.acquisition.analytic.ExpectedImprovement'>: 'ExpectedImprovement', <class 'botorch.acquisition.analytic.NoisyExpectedImprovement'>: 'NoisyExpectedImprovement', <class 'botorch.acquisition.multi_objective.monte_carlo.qExpectedHypervolumeImprovement'>: 'qExpectedHypervolumeImprovement', <class 'botorch.acquisition.multi_objective.monte_carlo.qNoisyExpectedHypervolumeImprovement'>: 'qNoisyExpectedHypervolumeImprovement', <class 'botorch.acquisition.monte_carlo.qExpectedImprovement'>: 'qExpectedImprovement', <class 'botorch.acquisition.knowledge_gradient.qKnowledgeGradient'>: 'qKnowledgeGradient', <class 'botorch.acquisition.max_value_entropy_search.qMaxValueEntropy'>: 'qMaxValueEntropy', <class 'botorch.acquisition.knowledge_gradient.qMultiFidelityKnowledgeGradient'>: 'qMultiFidelityKnowledgeGradient', <class 'botorch.acquisition.max_value_entropy_search.qMultiFidelityMaxValueEntropy'>: 'qMultiFidelityMaxValueEntropy', <class 'botorch.acquisition.monte_carlo.qNoisyExpectedImprovement'>: 'qNoisyExpectedImprovement', <class 'botorch.acquisition.analytic.LogExpectedImprovement'>: 'LogExpectedImprovement', <class 'botorch.acquisition.analytic.LogNoisyExpectedImprovement'>: 'LogNoisyExpectedImprovement', <class 'botorch.acquisition.logei.qLogExpectedImprovement'>: 'qLogExpectedImprovement', <class 'botorch.acquisition.logei.qLogNoisyExpectedImprovement'>: 'qLogNoisyExpectedImprovement', <class 'botorch.acquisition.multi_objective.logei.qLogExpectedHypervolumeImprovement'>: 'qLogExpectedHypervolumeImprovement', <class 'botorch.acquisition.multi_objective.logei.qLogNoisyExpectedHypervolumeImprovement'>: 'qLogNoisyExpectedHypervolumeImprovement'}¶
Mapping of BoTorch MarginalLogLikelihood classes to class name strings.
- ax.storage.botorch_modular_registry.ACQUISITION_REGISTRY: Dict[Type[Acquisition], str] = {<class 'ax.models.torch.botorch_modular.acquisition.Acquisition'>: 'Acquisition', <class 'ax.models.torch.botorch_modular.sebo.SEBOAcquisition'>: 'SEBOAcquisition'}¶
Mapping of BoTorch Model classes to class name strings.
- ax.storage.botorch_modular_registry.CLASS_TO_REGISTRY: Dict[Any, Dict[Type[Any], str]] = {<class 'ax.models.torch.botorch_modular.acquisition.Acquisition'>: {<class 'ax.models.torch.botorch_modular.acquisition.Acquisition'>: 'Acquisition', <class 'ax.models.torch.botorch_modular.sebo.SEBOAcquisition'>: 'SEBOAcquisition'}, <class 'botorch.acquisition.acquisition.AcquisitionFunction'>: {<class 'botorch.acquisition.analytic.ExpectedImprovement'>: 'ExpectedImprovement', <class 'botorch.acquisition.analytic.NoisyExpectedImprovement'>: 'NoisyExpectedImprovement', <class 'botorch.acquisition.multi_objective.monte_carlo.qExpectedHypervolumeImprovement'>: 'qExpectedHypervolumeImprovement', <class 'botorch.acquisition.multi_objective.monte_carlo.qNoisyExpectedHypervolumeImprovement'>: 'qNoisyExpectedHypervolumeImprovement', <class 'botorch.acquisition.monte_carlo.qExpectedImprovement'>: 'qExpectedImprovement', <class 'botorch.acquisition.knowledge_gradient.qKnowledgeGradient'>: 'qKnowledgeGradient', <class 'botorch.acquisition.max_value_entropy_search.qMaxValueEntropy'>: 'qMaxValueEntropy', <class 'botorch.acquisition.knowledge_gradient.qMultiFidelityKnowledgeGradient'>: 'qMultiFidelityKnowledgeGradient', <class 'botorch.acquisition.max_value_entropy_search.qMultiFidelityMaxValueEntropy'>: 'qMultiFidelityMaxValueEntropy', <class 'botorch.acquisition.monte_carlo.qNoisyExpectedImprovement'>: 'qNoisyExpectedImprovement', <class 'botorch.acquisition.analytic.LogExpectedImprovement'>: 'LogExpectedImprovement', <class 'botorch.acquisition.analytic.LogNoisyExpectedImprovement'>: 'LogNoisyExpectedImprovement', <class 'botorch.acquisition.logei.qLogExpectedImprovement'>: 'qLogExpectedImprovement', <class 'botorch.acquisition.logei.qLogNoisyExpectedImprovement'>: 'qLogNoisyExpectedImprovement', <class 'botorch.acquisition.multi_objective.logei.qLogExpectedHypervolumeImprovement'>: 'qLogExpectedHypervolumeImprovement', <class 'botorch.acquisition.multi_objective.logei.qLogNoisyExpectedHypervolumeImprovement'>: 'qLogNoisyExpectedHypervolumeImprovement'}, <class 'gpytorch.likelihoods.likelihood.Likelihood'>: {<class 'gpytorch.likelihoods.gaussian_likelihood.GaussianLikelihood'>: 'GaussianLikelihood'}, <class 'gpytorch.mlls.marginal_log_likelihood.MarginalLogLikelihood'>: {<class 'gpytorch.mlls.exact_marginal_log_likelihood.ExactMarginalLogLikelihood'>: 'ExactMarginalLogLikelihood', <class 'gpytorch.mlls.leave_one_out_pseudo_likelihood.LeaveOneOutPseudoLikelihood'>: 'LeaveOneOutPseudoLikelihood', <class 'gpytorch.mlls.sum_marginal_log_likelihood.SumMarginalLogLikelihood'>: 'SumMarginalLogLikelihood'}, <class 'botorch.models.model.Model'>: {<class 'botorch.models.gp_regression.FixedNoiseGP'>: 'SingleTaskGP', <class 'botorch.models.gp_regression_fidelity.FixedNoiseMultiFidelityGP'>: 'SingleTaskMultiFidelityGP', <class 'botorch.models.multitask.FixedNoiseMultiTaskGP'>: 'MultiTaskGP', <class 'botorch.models.gp_regression_mixed.MixedSingleTaskGP'>: 'MixedSingleTaskGP', <class 'botorch.models.model_list_gp_regression.ModelListGP'>: 'ModelListGP', <class 'botorch.models.multitask.MultiTaskGP'>: 'MultiTaskGP', <class 'botorch.models.gp_regression.SingleTaskGP'>: 'SingleTaskGP', <class 'botorch.models.gp_regression_fidelity.SingleTaskMultiFidelityGP'>: 'SingleTaskMultiFidelityGP', <class 'botorch.models.fully_bayesian.SaasFullyBayesianSingleTaskGP'>: 'SaasFullyBayesianSingleTaskGP', <class 'botorch.models.fully_bayesian_multitask.SaasFullyBayesianMultiTaskGP'>: 'SaasFullyBayesianMultiTaskGP', <class 'botorch.models.contextual.LCEAGP'>: 'LCEAGP'}, <class 'gpytorch.constraints.constraints.Interval'>: {<class 'gpytorch.constraints.constraints.Interval'>: 'Interval', <class 'gpytorch.priors.torch_priors.GammaPrior'>: 'GammaPrior'}, <class 'gpytorch.priors.torch_priors.GammaPrior'>: {<class 'gpytorch.constraints.constraints.Interval'>: 'Interval', <class 'gpytorch.priors.torch_priors.GammaPrior'>: 'GammaPrior'}, <class 'botorch.models.transforms.input.InputTransform'>: {<class 'botorch.models.transforms.input.ChainedInputTransform'>: 'ChainedInputTransform', <class 'botorch.models.transforms.input.Normalize'>: 'Normalize', <class 'botorch.models.transforms.input.Round'>: 'Round', <class 'botorch.models.transforms.input.Warp'>: 'Warp', <class 'botorch.models.transforms.input.InputPerturbation'>: 'InputPerturbation'}, <class 'botorch.models.transforms.outcome.OutcomeTransform'>: {<class 'botorch.models.transforms.outcome.ChainedOutcomeTransform'>: 'ChainedOutcomeTransform', <class 'botorch.models.transforms.outcome.Standardize'>: 'Standardize'}}¶
Reverse registries for decoding.
- ax.storage.botorch_modular_registry.GPYTORCH_COMPONENT_REGISTRY: Dict[Type[Module], str] = {<class 'gpytorch.constraints.constraints.Interval'>: 'Interval', <class 'gpytorch.priors.torch_priors.GammaPrior'>: 'GammaPrior'}¶
Mapping of BoTorch InputTransform classes to class name strings.
- ax.storage.botorch_modular_registry.INPUT_TRANSFORM_REGISTRY: Dict[Type[InputTransform], str] = {<class 'botorch.models.transforms.input.ChainedInputTransform'>: 'ChainedInputTransform', <class 'botorch.models.transforms.input.Normalize'>: 'Normalize', <class 'botorch.models.transforms.input.Round'>: 'Round', <class 'botorch.models.transforms.input.Warp'>: 'Warp', <class 'botorch.models.transforms.input.InputPerturbation'>: 'InputPerturbation'}¶
Mapping of BoTorch OutcomeTransform classes to class name strings.
- ax.storage.botorch_modular_registry.MODEL_REGISTRY: Dict[Type[Model], str] = {<class 'botorch.models.gp_regression.FixedNoiseGP'>: 'SingleTaskGP', <class 'botorch.models.gp_regression_fidelity.FixedNoiseMultiFidelityGP'>: 'SingleTaskMultiFidelityGP', <class 'botorch.models.multitask.FixedNoiseMultiTaskGP'>: 'MultiTaskGP', <class 'botorch.models.gp_regression_mixed.MixedSingleTaskGP'>: 'MixedSingleTaskGP', <class 'botorch.models.model_list_gp_regression.ModelListGP'>: 'ModelListGP', <class 'botorch.models.multitask.MultiTaskGP'>: 'MultiTaskGP', <class 'botorch.models.gp_regression.SingleTaskGP'>: 'SingleTaskGP', <class 'botorch.models.gp_regression_fidelity.SingleTaskMultiFidelityGP'>: 'SingleTaskMultiFidelityGP', <class 'botorch.models.fully_bayesian.SaasFullyBayesianSingleTaskGP'>: 'SaasFullyBayesianSingleTaskGP', <class 'botorch.models.fully_bayesian_multitask.SaasFullyBayesianMultiTaskGP'>: 'SaasFullyBayesianMultiTaskGP', <class 'botorch.models.contextual.LCEAGP'>: 'LCEAGP'}¶
Mapping of Botorch AcquisitionFunction classes to class name strings.
- ax.storage.botorch_modular_registry.OUTCOME_TRANSFORM_REGISTRY: Dict[Type[OutcomeTransform], str] = {<class 'botorch.models.transforms.outcome.ChainedOutcomeTransform'>: 'ChainedOutcomeTransform', <class 'botorch.models.transforms.outcome.Standardize'>: 'Standardize'}¶
Overarching mapping from encoded classes to registry map.
- ax.storage.botorch_modular_registry.REVERSE_OUTCOME_TRANSFORM_REGISTRY: Dict[str, Type[OutcomeTransform]] = {'ChainedOutcomeTransform': <class 'botorch.models.transforms.outcome.ChainedOutcomeTransform'>, 'Standardize': <class 'botorch.models.transforms.outcome.Standardize'>}¶
Overarching mapping from encoded classes to reverse registry map.
- ax.storage.botorch_modular_registry.register_acquisition(acq_class: Type[Acquisition]) None [source]¶
Add a custom acquisition class to the SQA and JSON registries.
- ax.storage.botorch_modular_registry.register_acquisition_function(acqf_class: Type[AcquisitionFunction]) None [source]¶
Add a custom acquisition class to the SQA and JSON registries.
- ax.storage.botorch_modular_registry.register_model(model_class: Type[Model]) None [source]¶
Add a custom model class to the SQA and JSON registries.
- ax.storage.metric_registry.logger: Logger = <Logger ax.storage.metric_registry (INFO)>¶
Mapping of Metric classes to ints.
All metrics will be stored in the same table in the database. When saving, we look up the metric subclass in METRIC_REGISTRY, and store the corresponding type field in the database.
- ax.storage.metric_registry.register_metric(metric_cls: ~typing.Type[~ax.core.metric.Metric], metric_registry: ~typing.Optional[~typing.Dict[~typing.Type[~ax.core.metric.Metric], int]] = None, encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, val: ~typing.Optional[int] = None) Tuple[Dict[Type[Metric], int], Dict[Type, Callable[[Any], Dict[str, Any]]], Dict[str, Type]] [source]¶
Add a custom metric class to the SQA and JSON registries. For the SQA registry, if no int is specified, use a hash of the class name.
- ax.storage.metric_registry.register_metrics(metric_clss: ~typing.Dict[~typing.Type[~ax.core.metric.Metric], ~typing.Optional[int]], metric_registry: ~typing.Optional[~typing.Dict[~typing.Type[~ax.core.metric.Metric], int]] = None, encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}) Tuple[Dict[Type[Metric], int], Dict[Type, Callable[[Any], Dict[str, Any]]], Dict[str, Type]] [source]¶
Add custom metric classes to the SQA and JSON registries. For the SQA registry, if no int is specified, use a hash of the class name.
- ax.storage.runner_registry.register_runner(runner_cls: ~typing.Type[~ax.core.runner.Runner], runner_registry: ~typing.Dict[~typing.Type[~ax.core.runner.Runner], int] = {<class 'ax.runners.synthetic.SyntheticRunner'>: 0}, encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, val: ~typing.Optional[int] = None) Tuple[Dict[Type[Runner], int], Dict[Type, Callable[[Any], Dict[str, Any]]], Dict[str, Type]] [source]¶
Add a custom runner class to the SQA and JSON registries. For the SQA registry, if no int is specified, use a hash of the class name.
- ax.storage.runner_registry.register_runners(runner_clss: ~typing.Dict[~typing.Type[~ax.core.runner.Runner], ~typing.Optional[int]], runner_registry: ~typing.Dict[~typing.Type[~ax.core.runner.Runner], int] = {<class 'ax.runners.synthetic.SyntheticRunner'>: 0}, encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}) Tuple[Dict[Type[Runner], int], Dict[Type, Callable[[Any], Dict[str, Any]]], Dict[str, Type]] [source]¶
Add custom runner classes to the SQA and JSON registries. For the SQA registry, if no int is specified, use a hash of the class name.
- class ax.storage.registry_bundle.RegistryBundle(metric_clss: ~typing.Dict[~typing.Type[~ax.core.metric.Metric], ~typing.Optional[int]], runner_clss: ~typing.Dict[~typing.Type[~ax.core.runner.Runner], ~typing.Optional[int]], json_encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.core.arm.Arm'>: <function arm_to_dict>, <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.metrics.branin.AugmentedBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>: <function metric_to_dict>, <class 'ax.core.batch_trial.BatchTrial'>: <function batch_to_dict>, <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>: <function benchmark_problem_to_dict>, <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>: <function botorch_model_to_dict>, <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>: <function metric_to_dict>, <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>: <function runner_to_dict>, <class 'ax.metrics.branin.BraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>: <function metric_to_dict>, <class 'botorch.models.transforms.input.ChainedInputTransform'>: <function botorch_component_to_dict>, <class 'ax.core.parameter.ChoiceParameter'>: <function choice_parameter_to_dict>, <class 'ax.core.data.Data'>: <function data_to_dict>, <class 'ax.metrics.dict_lookup.DictLookupMetric'>: <function metric_to_dict>, <class 'ax.core.experiment.Experiment'>: <function experiment_to_dict>, <class 'ax.metrics.factorial.FactorialMetric'>: <function metric_to_dict>, <class 'ax.core.parameter.FixedParameter'>: <function fixed_parameter_to_dict>, <class 'gpytorch.priors.torch_priors.GammaPrior'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.generation_node.GenerationStep'>: <function generation_step_to_dict>, <class 'ax.modelbridge.generation_node.GenerationNode'>: <function generation_node_to_dict>, <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>: <function generation_strategy_to_dict>, <class 'ax.core.generator_run.GeneratorRun'>: <function generator_run_to_dict>, <class 'ax.metrics.hartmann6.Hartmann6Metric'>: <function metric_to_dict>, <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>: <function improvement_global_stopping_strategy_to_dict>, <class 'gpytorch.constraints.constraints.Interval'>: <function botorch_component_to_dict>, <class 'ax.metrics.jenatton.JenattonMetric'>: <function metric_to_dict>, <class 'ax.metrics.l2norm.L2NormMetric'>: <function metric_to_dict>, <class 'ax.core.map_data.MapData'>: <function map_data_to_dict>, <class 'ax.core.map_data.MapKeyInfo'>: <function map_key_info_to_dict>, <class 'ax.core.map_metric.MapMetric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxGenerationParallelism'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MaxTrials'>: <function transition_criterion_to_dict>, <class 'ax.core.metric.Metric'>: <function metric_to_dict>, <class 'ax.modelbridge.transition_criterion.MinTrials'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>: <function transition_criterion_to_dict>, <class 'ax.modelbridge.model_spec.ModelSpec'>: <function model_spec_to_dict>, <class 'ax.core.objective.MultiObjective'>: <function multi_objective_to_dict>, <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>: <function multi_objective_benchmark_problem_to_dict>, <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>: <function multi_objective_optimization_config_to_dict>, <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>: <function multi_type_experiment_to_dict>, <class 'botorch.models.transforms.input.Normalize'>: <function botorch_component_to_dict>, <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>: <function percentile_early_stopping_strategy_to_dict>, <class 'ax.metrics.sklearn.SklearnMetric'>: <function metric_to_dict>, <class 'ax.metrics.chemistry.ChemistryMetric'>: <function metric_to_dict>, <class 'ax.metrics.branin.NegativeBraninMetric'>: <function metric_to_dict>, <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>: <function metric_to_dict>, <class 'ax.core.objective.Objective'>: <function objective_to_dict>, <class 'ax.core.outcome_constraint.ObjectiveThreshold'>: <function outcome_constraint_to_dict>, <class 'ax.core.optimization_config.OptimizationConfig'>: <function optimization_config_to_dict>, <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>: <function logical_early_stopping_strategy_to_dict>, <class 'ax.core.parameter_constraint.OrderConstraint'>: <function order_parameter_constraint_to_dict>, <class 'ax.core.outcome_constraint.OutcomeConstraint'>: <function outcome_constraint_to_dict>, <class 'ax.core.parameter_constraint.ParameterConstraint'>: <function parameter_constraint_to_dict>, <class 'ax.core.parameter_distribution.ParameterDistribution'>: <function parameter_distribution_to_dict>, <class 'pathlib.Path'>: <function pathlib_to_dict>, <class 'pathlib.PurePath'>: <function pathlib_to_dict>, <class 'pathlib.PosixPath'>: <function pathlib_to_dict>, <class 'pathlib.WindowsPath'>: <function pathlib_to_dict>, <class 'pathlib.PurePosixPath'>: <function pathlib_to_dict>, <class 'pathlib.PureWindowsPath'>: <function pathlib_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>: <function pytorch_cnn_torchvision_benchmark_problem_to_dict>, <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>: <function runner_to_dict>, <class 'ax.core.parameter.RangeParameter'>: <function range_parameter_to_dict>, <class 'ax.core.risk_measures.RiskMeasure'>: <function risk_measure_to_dict>, <class 'ax.core.search_space.RobustSearchSpace'>: <function robust_search_space_to_dict>, <class 'botorch.models.transforms.input.Round'>: <function botorch_component_to_dict>, <class 'ax.modelbridge.transition_criterion.TransitionCriterion'>: <function transition_criterion_to_dict>, <class 'ax.core.objective.ScalarizedObjective'>: <function scalarized_objective_to_dict>, <class 'ax.core.search_space.SearchSpace'>: <function search_space_to_dict>, <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>: <function single_objective_benchmark_problem_to_dict>, <class 'ax.core.search_space.HierarchicalSearchSpace'>: <function search_space_to_dict>, <class 'ax.core.parameter_constraint.SumConstraint'>: <function sum_parameter_constraint_to_dict>, <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>: <function surrogate_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>: <function metric_to_dict>, <class 'ax.benchmark.problems.surrogate.SurrogateRunner'>: <function runner_to_dict>, <class 'ax.runners.synthetic.SyntheticRunner'>: <function runner_to_dict>, <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>: <function threshold_early_stopping_strategy_to_dict>, <class 'ax.core.trial.Trial'>: <function trial_to_dict>, <class 'ax.core.observation.ObservationFeatures'>: <function observation_features_to_dict>, <class 'ax.models.winsorization_config.WinsorizationConfig'>: <function winsorization_config_to_dict>}, json_class_encoder_registry: ~typing.Dict[~typing.Type, ~typing.Callable[[~typing.Any], ~typing.Dict[str, ~typing.Any]]] = {<class 'ax.models.torch.botorch_modular.acquisition.Acquisition'>: <function botorch_modular_to_dict>, <class 'botorch.acquisition.acquisition.AcquisitionFunction'>: <function botorch_modular_to_dict>, <class 'gpytorch.likelihoods.likelihood.Likelihood'>: <function botorch_modular_to_dict>, <class 'torch.nn.modules.module.Module'>: <function botorch_modular_to_dict>, <class 'gpytorch.mlls.marginal_log_likelihood.MarginalLogLikelihood'>: <function botorch_modular_to_dict>, <class 'botorch.models.model.Model'>: <function botorch_modular_to_dict>, <class 'ax.modelbridge.transforms.base.Transform'>: <function transform_type_to_dict>}, json_decoder_registry: ~typing.Dict[str, ~typing.Type] = {'AbandonedArm': <class 'ax.core.batch_trial.AbandonedArm'>, 'AggregatedBenchmarkResult': <class 'ax.benchmark.benchmark_result.AggregatedBenchmarkResult'>, 'AndEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.AndEarlyStoppingStrategy'>, 'Arm': <class 'ax.core.arm.Arm'>, 'AugmentedBraninMetric': <class 'ax.metrics.branin.AugmentedBraninMetric'>, 'AugmentedHartmann6Metric': <class 'ax.metrics.hartmann6.AugmentedHartmann6Metric'>, 'BatchTrial': <class 'ax.core.batch_trial.BatchTrial'>, 'BenchmarkMethod': <class 'ax.benchmark.benchmark_method.BenchmarkMethod'>, 'BenchmarkProblem': <class 'ax.benchmark.benchmark_problem.BenchmarkProblem'>, 'BenchmarkResult': <class 'ax.benchmark.benchmark_result.BenchmarkResult'>, 'BoTorchModel': <class 'ax.models.torch.botorch_modular.model.BoTorchModel'>, 'BotorchTestProblemMetric': <class 'ax.metrics.botorch_test_problem.BotorchTestProblemMetric'>, 'BotorchTestProblemRunner': <class 'ax.runners.botorch_test_problem.BotorchTestProblemRunner'>, 'BraninMetric': <class 'ax.metrics.branin.BraninMetric'>, 'BraninTimestampMapMetric': <class 'ax.metrics.branin_map.BraninTimestampMapMetric'>, 'ChainedInputTransform': <class 'botorch.models.transforms.input.ChainedInputTransform'>, 'ChemistryMetric': <class 'ax.metrics.chemistry.ChemistryMetric'>, 'ChemistryProblemType': <enum 'ChemistryProblemType'>, 'ChoiceParameter': <class 'ax.core.parameter.ChoiceParameter'>, 'ComparisonOp': <enum 'ComparisonOp'>, 'Data': <class 'ax.core.data.Data'>, 'DataType': <enum 'DataType'>, 'DictLookupMetric': <class 'ax.metrics.dict_lookup.DictLookupMetric'>, 'DomainType': <enum 'DomainType'>, 'Experiment': <class 'ax.core.experiment.Experiment'>, 'FactorialMetric': <class 'ax.metrics.factorial.FactorialMetric'>, 'FixedParameter': <class 'ax.core.parameter.FixedParameter'>, 'GammaPrior': <class 'gpytorch.priors.torch_priors.GammaPrior'>, 'GenerationNode': <class 'ax.modelbridge.generation_node.GenerationNode'>, 'GenerationStep': <class 'ax.modelbridge.generation_node.GenerationStep'>, 'GenerationStrategy': <class 'ax.modelbridge.generation_strategy.GenerationStrategy'>, 'GeneratorRun': <class 'ax.core.generator_run.GeneratorRun'>, 'GeneratorRunStruct': <class 'ax.core.batch_trial.GeneratorRunStruct'>, 'Hartmann6Metric': <class 'ax.metrics.hartmann6.Hartmann6Metric'>, 'HierarchicalSearchSpace': <class 'ax.core.search_space.HierarchicalSearchSpace'>, 'ImprovementGlobalStoppingStrategy': <class 'ax.global_stopping.strategies.improvement.ImprovementGlobalStoppingStrategy'>, 'Interval': <class 'gpytorch.constraints.constraints.Interval'>, 'JenattonMetric': <class 'ax.metrics.jenatton.JenattonMetric'>, 'L2NormMetric': <class 'ax.metrics.l2norm.L2NormMetric'>, 'LifecycleStage': <enum 'LifecycleStage'>, 'ListSurrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'MapData': <class 'ax.core.map_data.MapData'>, 'MapKeyInfo': <class 'ax.core.map_data.MapKeyInfo'>, 'MapMetric': <class 'ax.core.map_metric.MapMetric'>, 'MaxTrials': <class 'ax.modelbridge.transition_criterion.MaxTrials'>, 'Metric': <class 'ax.core.metric.Metric'>, 'MinTrials': <class 'ax.modelbridge.transition_criterion.MinTrials'>, 'MinimumPreferenceOccurances': <class 'ax.modelbridge.transition_criterion.MinimumPreferenceOccurances'>, 'MinimumTrialsInStatus': <class 'ax.modelbridge.transition_criterion.MinimumTrialsInStatus'>, 'ModelRegistryBase': <enum 'ModelRegistryBase'>, 'ModelSpec': <class 'ax.modelbridge.model_spec.ModelSpec'>, 'Models': <enum 'Models'>, 'MultiObjective': <class 'ax.core.objective.MultiObjective'>, 'MultiObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.MultiObjectiveBenchmarkProblem'>, 'MultiObjectiveOptimizationConfig': <class 'ax.core.optimization_config.MultiObjectiveOptimizationConfig'>, 'MultiTypeExperiment': <class 'ax.core.multi_type_experiment.MultiTypeExperiment'>, 'NegativeBraninMetric': <class 'ax.metrics.branin.NegativeBraninMetric'>, 'NoisyFunctionMetric': <class 'ax.metrics.noisy_function.NoisyFunctionMetric'>, 'Normalize': <class 'botorch.models.transforms.input.Normalize'>, 'Objective': <class 'ax.core.objective.Objective'>, 'ObjectiveThreshold': <class 'ax.core.outcome_constraint.ObjectiveThreshold'>, 'ObservationFeatures': <class 'ax.core.observation.ObservationFeatures'>, 'OptimizationConfig': <class 'ax.core.optimization_config.OptimizationConfig'>, 'OrEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.logical.OrEarlyStoppingStrategy'>, 'OrderConstraint': <class 'ax.core.parameter_constraint.OrderConstraint'>, 'OutcomeConstraint': <class 'ax.core.outcome_constraint.OutcomeConstraint'>, 'ParameterConstraint': <class 'ax.core.parameter_constraint.ParameterConstraint'>, 'ParameterConstraintType': <enum 'ParameterConstraintType'>, 'ParameterDistribution': <class 'ax.core.parameter_distribution.ParameterDistribution'>, 'ParameterType': <enum 'ParameterType'>, 'Path': <function pathlib_from_json>, 'PercentileEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.percentile.PercentileEarlyStoppingStrategy'>, 'PosixPath': <function pathlib_from_json>, 'PurePath': <function pathlib_from_json>, 'PurePosixPath': <function pathlib_from_json>, 'PureWindowsPath': <function pathlib_from_json>, 'PyTorchCNNMetric': <class 'ax.benchmark.problems.hpo.pytorch_cnn.PyTorchCNNMetric'>, 'PyTorchCNNTorchvisionBenchmarkProblem': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionBenchmarkProblem'>, 'PyTorchCNNTorchvisionRunner': <class 'ax.benchmark.problems.hpo.torchvision.PyTorchCNNTorchvisionRunner'>, 'RangeParameter': <class 'ax.core.parameter.RangeParameter'>, 'RiskMeasure': <class 'ax.core.risk_measures.RiskMeasure'>, 'RobustSearchSpace': <class 'ax.core.search_space.RobustSearchSpace'>, 'Round': <class 'botorch.models.transforms.input.Round'>, 'ScalarizedObjective': <class 'ax.core.objective.ScalarizedObjective'>, 'SchedulerOptions': <class 'ax.service.utils.scheduler_options.SchedulerOptions'>, 'SearchSpace': <class 'ax.core.search_space.SearchSpace'>, 'SingleObjectiveBenchmarkProblem': <class 'ax.benchmark.benchmark_problem.SingleObjectiveBenchmarkProblem'>, 'SklearnDataset': <enum 'SklearnDataset'>, 'SklearnMetric': <class 'ax.metrics.sklearn.SklearnMetric'>, 'SklearnModelType': <enum 'SklearnModelType'>, 'SumConstraint': <class 'ax.core.parameter_constraint.SumConstraint'>, 'Surrogate': <class 'ax.models.torch.botorch_modular.surrogate.Surrogate'>, 'SurrogateMetric': <class 'ax.benchmark.problems.surrogate.SurrogateMetric'>, 'SurrogateRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'SurrogateSpec': <class 'ax.models.torch.botorch_modular.model.SurrogateSpec'>, 'SyntheticRunner': <class 'ax.runners.synthetic.SyntheticRunner'>, 'ThresholdEarlyStoppingStrategy': <class 'ax.early_stopping.strategies.threshold.ThresholdEarlyStoppingStrategy'>, 'Trial': <class 'ax.core.trial.Trial'>, 'TrialStatus': <enum 'TrialStatus'>, 'TrialType': <enum 'TrialType'>, 'WindowsPath': <function pathlib_from_json>, 'WinsorizationConfig': <class 'ax.models.winsorization_config.WinsorizationConfig'>}, json_class_decoder_registry: ~typing.Dict[str, ~typing.Callable[[~typing.Dict[str, ~typing.Any]], ~typing.Any]] = {'Type[AcquisitionFunction]': <function class_from_json>, 'Type[Acquisition]': <function class_from_json>, 'Type[InputTransform]': <function input_transform_type_from_json>, 'Type[Likelihood]': <function class_from_json>, 'Type[MarginalLogLikelihood]': <function class_from_json>, 'Type[Model]': <function class_from_json>, 'Type[OutcomeTransform]': <function outcome_transform_type_from_json>, 'Type[Transform]': <function transform_type_from_json>, 'Type[torch.nn.Module]': <function class_from_json>})[source]¶
Bases:
RegistryBundleBase
A concrete implementation of RegistryBundleBase with sensible defaults.
- property sqa_config: SQAConfig¶
- class ax.storage.registry_bundle.RegistryBundleBase(metric_clss: Dict[Type[Metric], Optional[int]], runner_clss: Dict[Type[Runner], Optional[int]], json_encoder_registry: Dict[Type, Callable[[Any], Dict[str, Any]]], json_class_encoder_registry: Dict[Type, Callable[[Any], Dict[str, Any]]], json_decoder_registry: Dict[str, Type], json_class_decoder_registry: Dict[str, Callable[[Dict[str, Any]], Any]])[source]¶
Bases:
ABC
An abstraction to help with storing experiments with custom Metrics and Runners.
Rather than managing registries individually, the RegistryBundle consumes custom metrics, runners, and configuration information and is lazily creates the storage registries needed for saving and loading.
- Parameters:
metric_clss – A dictionary from Metric classes to the int their type should be encoded as in the associated SQAMetric. If no None is passed for the int a hash will be generated.
runner_clss – A dictionary from Runner classes to the int their type should be encoded as in the associated SQARunner. If no None is passed for the int a hash will be generated.
json_encoder_registry – A dictionary from Types to methods from an instance of the type to JSON.
json_class_encoder_registry – A dictionary from Types to methods from the type’s class to JSON.
json_decoder_registry – A dictionary from str class labels to their associated Type.
json_class_decoder_registry – A dictionary from str class labels to an associated method for reconstruction.
- classmethod from_registry_bundles(*registry_bundles: RegistryBundleBase) RegistryBundleBase [source]¶
- abstract property sqa_config: SQAConfig¶
Utilities¶
- class ax.storage.utils.MetricIntent(value)[source]¶
Bases:
Enum
Class for enumerating metric use types.