From 85bd5b00a73a4d9cb98ee473e24c168e62b6219d Mon Sep 17 00:00:00 2001 From: Bernie Beckerman Date: Mon, 4 Mar 2024 13:03:23 -0800 Subject: [PATCH] Pyre Configurationless migration for] [batch:221/244] (#2243) Summary: Pull Request resolved: https://github.com/facebook/Ax/pull/2243 Reviewed By: yizhouyu Differential Revision: D54469983 fbshipit-source-id: f276f3c6c25768b8b7e35f13ad8e84da7fc5bf82 --- ax/__init__.py | 2 ++ ax/analysis/base_analysis.py | 2 ++ ax/analysis/base_plotly_visualization.py | 2 ++ ax/analysis/parallel_coordinates_plot.py | 2 ++ ax/analysis/tests/test_parallel_coordinates_plot.py | 2 ++ ax/benchmark/benchmark.py | 2 ++ ax/benchmark/benchmark_method.py | 2 ++ ax/benchmark/benchmark_problem.py | 2 ++ ax/benchmark/benchmark_result.py | 2 ++ ax/benchmark/methods/__init__.py | 2 ++ ax/benchmark/methods/modular_botorch.py | 2 ++ ax/benchmark/problems/__init__.py | 2 ++ ax/benchmark/problems/hd_embedding.py | 2 ++ ax/benchmark/problems/hpo/__init__.py | 2 ++ ax/benchmark/problems/hpo/pytorch_cnn.py | 2 ++ ax/benchmark/problems/hpo/torchvision.py | 2 ++ ax/benchmark/problems/registry.py | 2 ++ ax/benchmark/problems/surrogate.py | 2 ++ ax/benchmark/problems/synthetic/discretized/__init__.py | 2 ++ ax/benchmark/problems/synthetic/discretized/mixed_integer.py | 2 ++ ax/benchmark/problems/synthetic/hss/__init__.py | 2 ++ ax/benchmark/problems/synthetic/hss/jenatton.py | 2 ++ ax/benchmark/tests/__init__.py | 2 ++ ax/benchmark/tests/test_benchmark.py | 2 ++ ax/benchmark/tests/test_benchmark_method.py | 2 ++ ax/benchmark/tests/test_benchmark_problem.py | 2 ++ ax/benchmark/tests/test_methods.py | 2 ++ ax/benchmark/tests/test_mixed_integer_problems.py | 2 ++ ax/benchmark/tests/test_problem_storage.py | 2 ++ ax/benchmark/tests/test_problems.py | 2 ++ ax/benchmark/tests/test_surrogate_problems.py | 2 ++ ax/benchmark/tests/test_surrogate_runner.py | 2 ++ ax/core/__init__.py | 2 ++ ax/core/base_trial.py | 2 ++ ax/core/batch_trial.py | 2 ++ ax/core/data.py | 2 ++ ax/core/experiment.py | 2 ++ ax/core/formatting_utils.py | 2 ++ ax/core/generation_strategy_interface.py | 2 ++ ax/core/generator_run.py | 2 ++ ax/core/map_data.py | 2 ++ ax/core/map_metric.py | 2 ++ ax/core/metric.py | 2 ++ ax/core/multi_type_experiment.py | 2 ++ ax/core/objective.py | 2 ++ ax/core/observation.py | 2 ++ ax/core/optimization_config.py | 2 ++ ax/core/outcome_constraint.py | 2 ++ ax/core/parameter.py | 2 ++ ax/core/parameter_distribution.py | 2 ++ ax/core/risk_measures.py | 2 ++ ax/core/runner.py | 2 ++ ax/core/tests/test_arm.py | 2 ++ ax/core/tests/test_batch_trial.py | 2 ++ ax/core/tests/test_data.py | 2 ++ ax/core/tests/test_experiment.py | 2 ++ ax/core/tests/test_formatting_utils.py | 2 ++ ax/core/tests/test_generator_run.py | 2 ++ ax/core/tests/test_map_data.py | 2 ++ ax/core/tests/test_map_metric.py | 2 ++ ax/core/tests/test_metric.py | 2 ++ ax/core/tests/test_multi_type_experiment.py | 2 ++ ax/core/tests/test_objective.py | 2 ++ ax/core/tests/test_observation.py | 2 ++ ax/core/tests/test_optimization_config.py | 2 ++ ax/core/tests/test_outcome_constraint.py | 2 ++ ax/core/tests/test_parameter.py | 2 ++ ax/core/tests/test_parameter_constraint.py | 2 ++ ax/core/tests/test_parameter_distribution.py | 2 ++ ax/core/tests/test_risk_measures.py | 2 ++ ax/core/tests/test_runner.py | 2 ++ ax/core/tests/test_search_space.py | 2 ++ ax/core/tests/test_trial.py | 2 ++ ax/core/tests/test_types.py | 2 ++ ax/core/tests/test_utils.py | 2 ++ ax/core/trial.py | 2 ++ ax/core/types.py | 2 ++ ax/core/utils.py | 2 ++ ax/early_stopping/__init__.py | 2 ++ ax/early_stopping/strategies/__init__.py | 2 ++ ax/early_stopping/strategies/base.py | 2 ++ ax/early_stopping/strategies/logical.py | 2 ++ ax/early_stopping/strategies/percentile.py | 2 ++ ax/early_stopping/strategies/threshold.py | 2 ++ ax/early_stopping/tests/__init__.py | 2 ++ ax/early_stopping/tests/test_strategies.py | 2 ++ ax/early_stopping/utils.py | 2 ++ ax/exceptions/constants.py | 2 ++ ax/exceptions/core.py | 2 ++ ax/exceptions/data_provider.py | 2 ++ ax/exceptions/generation_strategy.py | 2 ++ ax/exceptions/model.py | 2 ++ ax/exceptions/storage.py | 2 ++ ax/global_stopping/__init__.py | 2 ++ ax/global_stopping/strategies/__init__.py | 2 ++ ax/global_stopping/strategies/base.py | 2 ++ ax/global_stopping/strategies/improvement.py | 2 ++ ax/global_stopping/tests/__init__.py | 2 ++ ax/global_stopping/tests/tests_strategies.py | 2 ++ ax/health_check/tests/test_search_space.py | 2 ++ ax/metrics/__init__.py | 2 ++ ax/metrics/botorch_test_problem.py | 2 ++ ax/metrics/branin.py | 2 ++ ax/metrics/branin_map.py | 2 ++ ax/metrics/chemistry.py | 2 ++ ax/metrics/curve.py | 2 ++ ax/metrics/dict_lookup.py | 2 ++ ax/metrics/factorial.py | 2 ++ ax/metrics/hartmann6.py | 2 ++ ax/metrics/jenatton.py | 2 ++ ax/metrics/l2norm.py | 2 ++ ax/metrics/noisy_function.py | 2 ++ ax/metrics/noisy_function_map.py | 2 ++ ax/metrics/sklearn.py | 2 ++ ax/metrics/tensorboard.py | 2 ++ ax/metrics/tests/test_chemistry.py | 2 ++ ax/metrics/tests/test_curve.py | 2 ++ ax/metrics/tests/test_dict_lookup.py | 2 ++ ax/metrics/tests/test_noisy_function.py | 2 ++ ax/metrics/tests/test_sklearn.py | 2 ++ ax/metrics/tests/test_tensorboard.py | 2 ++ ax/metrics/torchx.py | 2 ++ ax/modelbridge/__init__.py | 2 ++ ax/modelbridge/base.py | 2 ++ ax/modelbridge/cross_validation.py | 2 ++ ax/modelbridge/discrete.py | 2 ++ ax/modelbridge/dispatch_utils.py | 2 ++ ax/modelbridge/factory.py | 2 ++ ax/modelbridge/generation_node.py | 2 ++ ax/modelbridge/generation_strategy.py | 2 ++ ax/modelbridge/map_torch.py | 2 ++ ax/modelbridge/model_spec.py | 2 ++ ax/modelbridge/modelbridge_utils.py | 2 ++ ax/modelbridge/pairwise.py | 2 ++ ax/modelbridge/prediction_utils.py | 2 ++ ax/modelbridge/random.py | 2 ++ ax/modelbridge/registry.py | 2 ++ ax/modelbridge/strategies/alebo.py | 2 ++ ax/modelbridge/strategies/rembo.py | 2 ++ ax/modelbridge/tests/test_aepsych_criterion.py | 2 ++ ax/modelbridge/tests/test_alebo_strategy.py | 2 ++ ax/modelbridge/tests/test_base_modelbridge.py | 2 ++ ax/modelbridge/tests/test_cross_validation.py | 2 ++ ax/modelbridge/tests/test_discrete_modelbridge.py | 2 ++ ax/modelbridge/tests/test_dispatch_utils.py | 2 ++ ax/modelbridge/tests/test_factory.py | 2 ++ ax/modelbridge/tests/test_generation_node.py | 2 ++ ax/modelbridge/tests/test_generation_strategy.py | 2 ++ ax/modelbridge/tests/test_map_torch_modelbridge.py | 2 ++ ax/modelbridge/tests/test_model_fit_metrics.py | 2 ++ ax/modelbridge/tests/test_model_spec.py | 2 ++ ax/modelbridge/tests/test_modelbridge_utils.py | 2 ++ ax/modelbridge/tests/test_pairwise_modelbridge.py | 2 ++ ax/modelbridge/tests/test_prediction_utils.py | 2 ++ ax/modelbridge/tests/test_random_modelbridge.py | 2 ++ ax/modelbridge/tests/test_registry.py | 2 ++ ax/modelbridge/tests/test_rembo_strategy.py | 2 ++ ax/modelbridge/tests/test_robust_modelbridge.py | 2 ++ ax/modelbridge/tests/test_torch_modelbridge.py | 2 ++ ax/modelbridge/tests/test_torch_moo_modelbridge.py | 2 ++ ax/modelbridge/tests/test_transform_utils.py | 2 ++ ax/modelbridge/tests/test_transition_criterion.py | 2 ++ ax/modelbridge/tests/test_utils.py | 2 ++ ax/modelbridge/torch.py | 2 ++ ax/modelbridge/transforms/__init__.py | 2 ++ ax/modelbridge/transforms/base.py | 2 ++ ax/modelbridge/transforms/cap_parameter.py | 2 ++ ax/modelbridge/transforms/cast.py | 2 ++ ax/modelbridge/transforms/centered_unit_x.py | 2 ++ ax/modelbridge/transforms/choice_encode.py | 2 ++ ax/modelbridge/transforms/convert_metric_names.py | 2 ++ ax/modelbridge/transforms/derelativize.py | 2 ++ ax/modelbridge/transforms/int_range_to_choice.py | 2 ++ ax/modelbridge/transforms/int_to_float.py | 2 ++ ax/modelbridge/transforms/inverse_gaussian_cdf_y.py | 2 ++ ax/modelbridge/transforms/ivw.py | 2 ++ ax/modelbridge/transforms/log.py | 2 ++ ax/modelbridge/transforms/log_y.py | 2 ++ ax/modelbridge/transforms/logit.py | 2 ++ ax/modelbridge/transforms/map_unit_x.py | 2 ++ ax/modelbridge/transforms/merge_repeated_measurements.py | 2 ++ ax/modelbridge/transforms/metrics_as_task.py | 2 ++ ax/modelbridge/transforms/one_hot.py | 2 ++ ax/modelbridge/transforms/percentile_y.py | 2 ++ ax/modelbridge/transforms/power_transform_y.py | 2 ++ ax/modelbridge/transforms/relativize.py | 2 ++ ax/modelbridge/transforms/remove_fixed.py | 2 ++ ax/modelbridge/transforms/rounding.py | 2 ++ ax/modelbridge/transforms/search_space_to_choice.py | 2 ++ ax/modelbridge/transforms/search_space_to_float.py | 2 ++ ax/modelbridge/transforms/standardize_y.py | 2 ++ ax/modelbridge/transforms/stratified_standardize_y.py | 2 ++ ax/modelbridge/transforms/task_encode.py | 2 ++ ax/modelbridge/transforms/tests/test_base_transform.py | 2 ++ .../transforms/tests/test_cap_parameter_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_cast_transform.py | 2 ++ .../transforms/tests/test_centered_unit_x_transform.py | 2 ++ .../transforms/tests/test_choice_encode_transform.py | 2 ++ .../transforms/tests/test_convert_metric_names_transform.py | 2 ++ .../transforms/tests/test_derelativize_transform.py | 2 ++ .../transforms/tests/test_int_range_to_choice_transform.py | 2 ++ .../transforms/tests/test_int_to_float_transform.py | 2 ++ .../transforms/tests/test_inverse_gaussian_cdf_y_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_ivw_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_log_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_log_y_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_logit_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_map_unit_x_transform.py | 2 ++ .../tests/test_merge_repeated_measurements_transform.py | 2 ++ .../transforms/tests/test_metrics_as_task_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_one_hot_transform.py | 2 ++ .../transforms/tests/test_percentile_y_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_power_y_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_relativize_transform.py | 2 ++ .../transforms/tests/test_remove_fixed_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_rounding_transform.py | 2 ++ .../transforms/tests/test_search_space_to_choice_transform.py | 2 ++ .../transforms/tests/test_search_space_to_float_transform.py | 2 ++ .../transforms/tests/test_standardize_y_transform.py | 2 ++ .../tests/test_stratified_standardize_y_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_task_encode_transform.py | 2 ++ .../transforms/tests/test_trial_as_task_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_unit_x_transform.py | 2 ++ .../transforms/tests/test_winsorize_legacy_transform.py | 2 ++ ax/modelbridge/transforms/tests/test_winsorize_transform.py | 2 ++ ax/modelbridge/transforms/trial_as_task.py | 2 ++ ax/modelbridge/transforms/unit_x.py | 2 ++ ax/modelbridge/transforms/utils.py | 2 ++ ax/modelbridge/transforms/winsorize.py | 2 ++ ax/modelbridge/transition_criterion.py | 2 ++ ax/models/__init__.py | 2 ++ ax/models/base.py | 2 ++ ax/models/discrete/eb_thompson.py | 2 ++ ax/models/discrete/full_factorial.py | 2 ++ ax/models/discrete/thompson.py | 2 ++ ax/models/discrete_base.py | 2 ++ ax/models/model_utils.py | 2 ++ ax/models/random/alebo_initializer.py | 2 ++ ax/models/random/base.py | 2 ++ ax/models/random/rembo_initializer.py | 2 ++ ax/models/random/sobol.py | 2 ++ ax/models/random/uniform.py | 2 ++ ax/models/tests/test_alebo.py | 2 ++ ax/models/tests/test_alebo_initializer.py | 2 ++ ax/models/tests/test_base.py | 2 ++ ax/models/tests/test_botorch_defaults.py | 2 ++ ax/models/tests/test_botorch_kg.py | 2 ++ ax/models/tests/test_botorch_mes.py | 2 ++ ax/models/tests/test_botorch_model.py | 2 ++ ax/models/tests/test_botorch_moo_defaults.py | 2 ++ ax/models/tests/test_botorch_moo_model.py | 2 ++ ax/models/tests/test_cbo_lcea.py | 2 ++ ax/models/tests/test_cbo_lcem.py | 2 ++ ax/models/tests/test_cbo_sac.py | 2 ++ ax/models/tests/test_discrete.py | 2 ++ ax/models/tests/test_eb_thompson.py | 2 ++ ax/models/tests/test_full_factorial.py | 2 ++ ax/models/tests/test_fully_bayesian.py | 2 ++ ax/models/tests/test_model_utils.py | 2 ++ ax/models/tests/test_posterior_mean.py | 2 ++ ax/models/tests/test_random.py | 2 ++ ax/models/tests/test_randomforest.py | 2 ++ ax/models/tests/test_rembo.py | 2 ++ ax/models/tests/test_rembo_initializer.py | 2 ++ ax/models/tests/test_sobol.py | 2 ++ ax/models/tests/test_thompson.py | 2 ++ ax/models/tests/test_torch.py | 2 ++ ax/models/tests/test_torch_model_utils.py | 2 ++ ax/models/tests/test_torch_utils.py | 2 ++ ax/models/tests/test_uniform.py | 2 ++ ax/models/torch/alebo.py | 2 ++ ax/models/torch/botorch.py | 2 ++ ax/models/torch/botorch_defaults.py | 2 ++ ax/models/torch/botorch_kg.py | 2 ++ ax/models/torch/botorch_mes.py | 2 ++ ax/models/torch/botorch_modular/__init__.py | 2 ++ ax/models/torch/botorch_modular/acquisition.py | 2 ++ .../torch/botorch_modular/input_constructors/__init__.py | 2 ++ .../torch/botorch_modular/input_constructors/covar_modules.py | 2 ++ .../botorch_modular/input_constructors/input_transforms.py | 2 ++ .../botorch_modular/input_constructors/outcome_transform.py | 2 ++ ax/models/torch/botorch_modular/kernels.py | 2 ++ ax/models/torch/botorch_modular/list_surrogate.py | 2 ++ ax/models/torch/botorch_modular/model.py | 2 ++ ax/models/torch/botorch_modular/multi_fidelity.py | 2 ++ ax/models/torch/botorch_modular/optimizer_argparse.py | 2 ++ ax/models/torch/botorch_modular/sebo.py | 2 ++ ax/models/torch/botorch_modular/utils.py | 2 ++ ax/models/torch/botorch_moo.py | 2 ++ ax/models/torch/botorch_moo_defaults.py | 2 ++ ax/models/torch/cbo_lcea.py | 2 ++ ax/models/torch/cbo_lcem.py | 2 ++ ax/models/torch/cbo_sac.py | 2 ++ ax/models/torch/frontier_utils.py | 2 ++ ax/models/torch/fully_bayesian.py | 2 ++ ax/models/torch/fully_bayesian_model_utils.py | 2 ++ ax/models/torch/posterior_mean.py | 2 ++ ax/models/torch/randomforest.py | 2 ++ ax/models/torch/rembo.py | 2 ++ ax/models/torch/tests/test_acquisition.py | 2 ++ ax/models/torch/tests/test_covar_modules_argparse.py | 2 ++ ax/models/torch/tests/test_input_transform_argparse.py | 2 ++ ax/models/torch/tests/test_kernels.py | 2 ++ ax/models/torch/tests/test_model.py | 2 ++ ax/models/torch/tests/test_multi_fidelity.py | 2 ++ ax/models/torch/tests/test_optimizer_argparse.py | 2 ++ ax/models/torch/tests/test_outcome_transform_argparse.py | 2 ++ ax/models/torch/tests/test_sebo.py | 2 ++ ax/models/torch/tests/test_surrogate.py | 2 ++ ax/models/torch/tests/test_utils.py | 2 ++ ax/models/torch/utils.py | 2 ++ ax/models/torch_base.py | 2 ++ ax/models/types.py | 2 ++ ax/models/winsorization_config.py | 2 ++ ax/plot/bandit_rollout.py | 2 ++ ax/plot/base.py | 2 ++ ax/plot/color.py | 2 ++ ax/plot/contour.py | 2 ++ ax/plot/diagnostic.py | 2 ++ ax/plot/feature_importances.py | 2 ++ ax/plot/helper.py | 2 ++ ax/plot/marginal_effects.py | 2 ++ ax/plot/parallel_coordinates.py | 2 ++ ax/plot/pareto_frontier.py | 2 ++ ax/plot/pareto_utils.py | 2 ++ ax/plot/render.py | 2 ++ ax/plot/scatter.py | 2 ++ ax/plot/slice.py | 2 ++ ax/plot/table_view.py | 2 ++ ax/plot/tests/__init__.py | 2 ++ ax/plot/tests/long_running/test_pareto_utils.py | 2 ++ ax/plot/tests/test_contours.py | 2 ++ ax/plot/tests/test_diagnostic.py | 2 ++ ax/plot/tests/test_feature_importances.py | 2 ++ ax/plot/tests/test_fitted_scatter.py | 2 ++ ax/plot/tests/test_helper.py | 2 ++ ax/plot/tests/test_parallel_coordinates.py | 2 ++ ax/plot/tests/test_pareto_utils.py | 2 ++ ax/plot/tests/test_slices.py | 2 ++ ax/plot/tests/test_tile_fitted.py | 2 ++ ax/plot/tests/test_traces.py | 2 ++ ax/plot/trace.py | 2 ++ ax/runners/__init__.py | 2 ++ ax/runners/botorch_test_problem.py | 2 ++ ax/runners/simulated_backend.py | 2 ++ ax/runners/single_running_trial_mixin.py | 2 ++ ax/runners/synthetic.py | 2 ++ ax/runners/tests/test_botorch_test_problem.py | 2 ++ ax/runners/tests/test_single_running_trial_mixin.py | 2 ++ ax/runners/tests/test_torchx.py | 2 ++ ax/runners/torchx.py | 2 ++ ax/service/__init__.py | 2 ++ ax/service/ax_client.py | 2 ++ ax/service/interactive_loop.py | 2 ++ ax/service/managed_loop.py | 2 ++ ax/service/scheduler.py | 2 ++ ax/service/tests/__init__.py | 2 ++ ax/service/tests/scheduler_test_utils.py | 2 ++ ax/service/tests/test_ax_client.py | 2 ++ ax/service/tests/test_best_point.py | 2 ++ ax/service/tests/test_best_point_utils.py | 2 ++ ax/service/tests/test_early_stopping.py | 2 ++ ax/service/tests/test_global_stopping.py | 2 ++ ax/service/tests/test_instantiation_utils.py | 2 ++ ax/service/tests/test_interactive_loop.py | 2 ++ ax/service/tests/test_managed_loop.py | 2 ++ ax/service/tests/test_report_utils.py | 2 ++ ax/service/tests/test_scheduler.py | 2 ++ ax/service/tests/test_with_db_settings_base.py | 2 ++ ax/service/utils/best_point.py | 2 ++ ax/service/utils/best_point_mixin.py | 2 ++ ax/service/utils/early_stopping.py | 2 ++ ax/service/utils/instantiation.py | 2 ++ ax/service/utils/report_utils.py | 2 ++ ax/service/utils/scheduler_options.py | 2 ++ ax/service/utils/with_db_settings_base.py | 2 ++ ax/storage/__init__.py | 2 ++ ax/storage/botorch_modular_registry.py | 2 ++ ax/storage/json_store/__init__.py | 2 ++ ax/storage/json_store/decoder.py | 2 ++ ax/storage/json_store/decoders.py | 2 ++ ax/storage/json_store/encoder.py | 2 ++ ax/storage/json_store/encoders.py | 2 ++ ax/storage/json_store/load.py | 2 ++ ax/storage/json_store/registry.py | 2 ++ ax/storage/json_store/save.py | 2 ++ ax/storage/json_store/tests/test_json_store.py | 2 ++ ax/storage/metric_registry.py | 2 ++ ax/storage/registry_bundle.py | 2 ++ ax/storage/runner_registry.py | 2 ++ ax/storage/sqa_store/__init__.py | 2 ++ ax/storage/sqa_store/db.py | 2 ++ ax/storage/sqa_store/decoder.py | 2 ++ ax/storage/sqa_store/delete.py | 2 ++ ax/storage/sqa_store/encoder.py | 2 ++ ax/storage/sqa_store/json.py | 2 ++ ax/storage/sqa_store/load.py | 2 ++ ax/storage/sqa_store/reduced_state.py | 2 ++ ax/storage/sqa_store/save.py | 2 ++ ax/storage/sqa_store/sqa_classes.py | 2 ++ ax/storage/sqa_store/sqa_config.py | 2 ++ ax/storage/sqa_store/sqa_enum.py | 2 ++ ax/storage/sqa_store/structs.py | 2 ++ ax/storage/sqa_store/tests/test_sqa_store.py | 2 ++ ax/storage/sqa_store/tests/test_utils.py | 2 ++ ax/storage/sqa_store/tests/utils.py | 2 ++ ax/storage/sqa_store/timestamp.py | 2 ++ ax/storage/sqa_store/utils.py | 2 ++ ax/storage/sqa_store/validation.py | 2 ++ ax/storage/tests/test_botorch_modular_registry.py | 2 ++ ax/storage/tests/test_registry_bundle.py | 2 ++ ax/storage/transform_registry.py | 2 ++ ax/storage/utils.py | 2 ++ ax/telemetry/ax_client.py | 2 ++ ax/telemetry/common.py | 2 ++ ax/telemetry/experiment.py | 2 ++ ax/telemetry/generation_strategy.py | 2 ++ ax/telemetry/optimization.py | 2 ++ ax/telemetry/scheduler.py | 2 ++ ax/telemetry/tests/test_ax_client.py | 2 ++ ax/telemetry/tests/test_experiment.py | 2 ++ ax/telemetry/tests/test_generation_strategy.py | 2 ++ ax/telemetry/tests/test_optimization.py | 2 ++ ax/telemetry/tests/test_scheduler.py | 2 ++ ax/utils/common/base.py | 2 ++ ax/utils/common/constants.py | 2 ++ ax/utils/common/decorator.py | 2 ++ ax/utils/common/equality.py | 2 ++ ax/utils/common/executils.py | 2 ++ ax/utils/common/kwargs.py | 2 ++ ax/utils/common/result.py | 2 ++ ax/utils/common/serialization.py | 2 ++ ax/utils/common/tests/test_docutils.py | 2 ++ ax/utils/common/tests/test_equality.py | 2 ++ ax/utils/common/tests/test_executils.py | 2 ++ ax/utils/common/tests/test_kwargutils.py | 2 ++ ax/utils/common/tests/test_logger.py | 2 ++ ax/utils/common/tests/test_result.py | 2 ++ ax/utils/common/tests/test_serialization.py | 2 ++ ax/utils/common/tests/test_testutils.py | 4 +++- ax/utils/common/tests/test_typeutils.py | 2 ++ ax/utils/common/timeutils.py | 2 ++ ax/utils/common/typeutils.py | 2 ++ ax/utils/common/typeutils_torch.py | 2 ++ ax/utils/measurement/synthetic_functions.py | 2 ++ ax/utils/measurement/tests/test_synthetic_functions.py | 2 ++ ax/utils/notebook/plotting.py | 2 ++ ax/utils/report/render.py | 2 ++ ax/utils/report/tests/test_render.py | 2 ++ ax/utils/sensitivity/derivative_gp.py | 2 ++ ax/utils/sensitivity/derivative_measures.py | 2 ++ ax/utils/sensitivity/sobol_measures.py | 2 ++ ax/utils/sensitivity/tests/test_sensitivity.py | 2 ++ ax/utils/stats/model_fit_stats.py | 2 ++ ax/utils/stats/statstools.py | 2 ++ ax/utils/stats/tests/test_statstools.py | 2 ++ ax/utils/testing/backend_scheduler.py | 2 ++ ax/utils/testing/backend_simulator.py | 2 ++ ax/utils/testing/benchmark_stubs.py | 2 ++ ax/utils/testing/core_stubs.py | 2 ++ ax/utils/testing/metrics/backend_simulator_map.py | 2 ++ ax/utils/testing/metrics/branin_backend_map.py | 2 ++ ax/utils/testing/mock.py | 2 ++ ax/utils/testing/modeling_stubs.py | 2 ++ ax/utils/testing/test_init_files.py | 2 ++ ax/utils/testing/tests/test_backend_simulator.py | 2 ++ ax/utils/testing/tests/test_utils.py | 2 ++ ax/utils/testing/torch_stubs.py | 2 ++ ax/utils/testing/utils.py | 2 ++ ax/utils/tutorials/cnn_utils.py | 2 ++ 470 files changed, 941 insertions(+), 1 deletion(-) diff --git a/ax/__init__.py b/ax/__init__.py index 72cec77d2f6..5d262606c41 100644 --- a/ax/__init__.py +++ b/ax/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core import ( Arm, BatchTrial, diff --git a/ax/analysis/base_analysis.py b/ax/analysis/base_analysis.py index 1bffef63150..752ee5c1f3b 100644 --- a/ax/analysis/base_analysis.py +++ b/ax/analysis/base_analysis.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABC, abstractmethod import pandas as pd diff --git a/ax/analysis/base_plotly_visualization.py b/ax/analysis/base_plotly_visualization.py index c24613bc68c..3f2558d1f2b 100644 --- a/ax/analysis/base_plotly_visualization.py +++ b/ax/analysis/base_plotly_visualization.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import abstractmethod import plotly.graph_objects as go diff --git a/ax/analysis/parallel_coordinates_plot.py b/ax/analysis/parallel_coordinates_plot.py index 36b79593f03..f8a67697432 100644 --- a/ax/analysis/parallel_coordinates_plot.py +++ b/ax/analysis/parallel_coordinates_plot.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional, Tuple import pandas as pd diff --git a/ax/analysis/tests/test_parallel_coordinates_plot.py b/ax/analysis/tests/test_parallel_coordinates_plot.py index 7f69fc306a3..18f1d760cde 100644 --- a/ax/analysis/tests/test_parallel_coordinates_plot.py +++ b/ax/analysis/tests/test_parallel_coordinates_plot.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.analysis.parallel_coordinates_plot import ParallelCoordinatesPlot from ax.core.batch_trial import BatchTrial diff --git a/ax/benchmark/benchmark.py b/ax/benchmark/benchmark.py index 0996a744b49..65be035ea73 100644 --- a/ax/benchmark/benchmark.py +++ b/ax/benchmark/benchmark.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Module for benchmarking Ax algorithms. diff --git a/ax/benchmark/benchmark_method.py b/ax/benchmark/benchmark_method.py index 64dee0daaf3..3b3797fac8c 100644 --- a/ax/benchmark/benchmark_method.py +++ b/ax/benchmark/benchmark_method.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass from ax.modelbridge.generation_strategy import GenerationStrategy diff --git a/ax/benchmark/benchmark_problem.py b/ax/benchmark/benchmark_problem.py index ec1799be96e..6cc2c9b1752 100644 --- a/ax/benchmark/benchmark_problem.py +++ b/ax/benchmark/benchmark_problem.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import abc from typing import Any, Dict, List, Optional, Protocol, runtime_checkable, Type diff --git a/ax/benchmark/benchmark_result.py b/ax/benchmark/benchmark_result.py index f3170bebfb5..f5290caa885 100644 --- a/ax/benchmark/benchmark_result.py +++ b/ax/benchmark/benchmark_result.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass from typing import Dict, Iterable, List, Optional diff --git a/ax/benchmark/methods/__init__.py b/ax/benchmark/methods/__init__.py index 7bec24cb17b..ffb2930b3a8 100644 --- a/ax/benchmark/methods/__init__.py +++ b/ax/benchmark/methods/__init__.py @@ -2,3 +2,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/benchmark/methods/modular_botorch.py b/ax/benchmark/methods/modular_botorch.py index ed7f77cc3f5..17f2e6e73bc 100644 --- a/ax/benchmark/methods/modular_botorch.py +++ b/ax/benchmark/methods/modular_botorch.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Optional, Type, Union from ax.benchmark.benchmark_method import ( diff --git a/ax/benchmark/problems/__init__.py b/ax/benchmark/problems/__init__.py index 7bec24cb17b..ffb2930b3a8 100644 --- a/ax/benchmark/problems/__init__.py +++ b/ax/benchmark/problems/__init__.py @@ -2,3 +2,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/benchmark/problems/hd_embedding.py b/ax/benchmark/problems/hd_embedding.py index cf341eada88..960773b9df4 100644 --- a/ax/benchmark/problems/hd_embedding.py +++ b/ax/benchmark/problems/hd_embedding.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import copy from typing import TypeVar diff --git a/ax/benchmark/problems/hpo/__init__.py b/ax/benchmark/problems/hpo/__init__.py index 7bec24cb17b..ffb2930b3a8 100644 --- a/ax/benchmark/problems/hpo/__init__.py +++ b/ax/benchmark/problems/hpo/__init__.py @@ -2,3 +2,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/benchmark/problems/hpo/pytorch_cnn.py b/ax/benchmark/problems/hpo/pytorch_cnn.py index 251ae703345..d8f5a95efd6 100644 --- a/ax/benchmark/problems/hpo/pytorch_cnn.py +++ b/ax/benchmark/problems/hpo/pytorch_cnn.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Iterable, Set import pandas as pd diff --git a/ax/benchmark/problems/hpo/torchvision.py b/ax/benchmark/problems/hpo/torchvision.py index 564db2039fa..5511d0bd699 100644 --- a/ax/benchmark/problems/hpo/torchvision.py +++ b/ax/benchmark/problems/hpo/torchvision.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os from typing import Any, Dict, Optional diff --git a/ax/benchmark/problems/registry.py b/ax/benchmark/problems/registry.py index 6d976e09c79..9c34278aab2 100644 --- a/ax/benchmark/problems/registry.py +++ b/ax/benchmark/problems/registry.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import copy from dataclasses import dataclass from typing import Any, Callable, Dict diff --git a/ax/benchmark/problems/surrogate.py b/ax/benchmark/problems/surrogate.py index 5999c69f04a..284e04c1ee6 100644 --- a/ax/benchmark/problems/surrogate.py +++ b/ax/benchmark/problems/surrogate.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple import pandas as pd diff --git a/ax/benchmark/problems/synthetic/discretized/__init__.py b/ax/benchmark/problems/synthetic/discretized/__init__.py index 7bec24cb17b..ffb2930b3a8 100644 --- a/ax/benchmark/problems/synthetic/discretized/__init__.py +++ b/ax/benchmark/problems/synthetic/discretized/__init__.py @@ -2,3 +2,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/benchmark/problems/synthetic/discretized/mixed_integer.py b/ax/benchmark/problems/synthetic/discretized/mixed_integer.py index 31f38305410..9159b5dff40 100644 --- a/ax/benchmark/problems/synthetic/discretized/mixed_integer.py +++ b/ax/benchmark/problems/synthetic/discretized/mixed_integer.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Mixed integer extensions of some common synthetic test functions. These are adapted from [Daulton2022bopr]_. diff --git a/ax/benchmark/problems/synthetic/hss/__init__.py b/ax/benchmark/problems/synthetic/hss/__init__.py index 7bec24cb17b..ffb2930b3a8 100644 --- a/ax/benchmark/problems/synthetic/hss/__init__.py +++ b/ax/benchmark/problems/synthetic/hss/__init__.py @@ -2,3 +2,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/benchmark/problems/synthetic/hss/jenatton.py b/ax/benchmark/problems/synthetic/hss/jenatton.py index 265b9744c2c..ad6d1d00eef 100644 --- a/ax/benchmark/problems/synthetic/hss/jenatton.py +++ b/ax/benchmark/problems/synthetic/hss/jenatton.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.benchmark.benchmark_problem import SingleObjectiveBenchmarkProblem from ax.core.objective import Objective from ax.core.optimization_config import OptimizationConfig diff --git a/ax/benchmark/tests/__init__.py b/ax/benchmark/tests/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/benchmark/tests/__init__.py +++ b/ax/benchmark/tests/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/benchmark/tests/test_benchmark.py b/ax/benchmark/tests/test_benchmark.py index 7ba2ea9f02c..4705ea7ac83 100644 --- a/ax/benchmark/tests/test_benchmark.py +++ b/ax/benchmark/tests/test_benchmark.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import tempfile import numpy as np diff --git a/ax/benchmark/tests/test_benchmark_method.py b/ax/benchmark/tests/test_benchmark_method.py index 989ff73ea64..55ae0d131ea 100644 --- a/ax/benchmark/tests/test_benchmark_method.py +++ b/ax/benchmark/tests/test_benchmark_method.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.benchmark.benchmark_method import ( BenchmarkMethod, get_sequential_optimization_scheduler_options, diff --git a/ax/benchmark/tests/test_benchmark_problem.py b/ax/benchmark/tests/test_benchmark_problem.py index 21d83413f1f..95810171f60 100644 --- a/ax/benchmark/tests/test_benchmark_problem.py +++ b/ax/benchmark/tests/test_benchmark_problem.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional, Union from ax.benchmark.benchmark_problem import ( diff --git a/ax/benchmark/tests/test_methods.py b/ax/benchmark/tests/test_methods.py index 743eabea988..bdafd9ec1fe 100644 --- a/ax/benchmark/tests/test_methods.py +++ b/ax/benchmark/tests/test_methods.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.benchmark.benchmark import benchmark_replication diff --git a/ax/benchmark/tests/test_mixed_integer_problems.py b/ax/benchmark/tests/test_mixed_integer_problems.py index ae87623fd47..830a75b385e 100644 --- a/ax/benchmark/tests/test_mixed_integer_problems.py +++ b/ax/benchmark/tests/test_mixed_integer_problems.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest.mock import MagicMock import torch diff --git a/ax/benchmark/tests/test_problem_storage.py b/ax/benchmark/tests/test_problem_storage.py index 81735f16a5d..60ececb6512 100644 --- a/ax/benchmark/tests/test_problem_storage.py +++ b/ax/benchmark/tests/test_problem_storage.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.benchmark.problems.hpo.torchvision import PyTorchCNNTorchvisionBenchmarkProblem from ax.storage.json_store.decoder import object_from_json from ax.storage.json_store.encoder import object_to_json diff --git a/ax/benchmark/tests/test_problems.py b/ax/benchmark/tests/test_problems.py index e44c02d9243..1960b64ec58 100644 --- a/ax/benchmark/tests/test_problems.py +++ b/ax/benchmark/tests/test_problems.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.benchmark.problems.registry import BENCHMARK_PROBLEM_REGISTRY, get_problem from ax.utils.common.testutils import TestCase diff --git a/ax/benchmark/tests/test_surrogate_problems.py b/ax/benchmark/tests/test_surrogate_problems.py index f0811e42986..b699bc55ae2 100644 --- a/ax/benchmark/tests/test_surrogate_problems.py +++ b/ax/benchmark/tests/test_surrogate_problems.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.benchmark.benchmark import compute_score_trace diff --git a/ax/benchmark/tests/test_surrogate_runner.py b/ax/benchmark/tests/test_surrogate_runner.py index 9e01aa92366..0c31f55e5f8 100644 --- a/ax/benchmark/tests/test_surrogate_runner.py +++ b/ax/benchmark/tests/test_surrogate_runner.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest.mock import MagicMock import torch diff --git a/ax/core/__init__.py b/ax/core/__init__.py index 2fd4ddc6094..db93aa44ff7 100644 --- a/ax/core/__init__.py +++ b/ax/core/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + # flake8: noqa F401 from ax.core.arm import Arm from ax.core.batch_trial import BatchTrial diff --git a/ax/core/base_trial.py b/ax/core/base_trial.py index 3581ff0c8b9..97846b79458 100644 --- a/ax/core/base_trial.py +++ b/ax/core/base_trial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from abc import ABC, abstractmethod, abstractproperty diff --git a/ax/core/batch_trial.py b/ax/core/batch_trial.py index 1aa8c406091..f63f1ffd1a3 100644 --- a/ax/core/batch_trial.py +++ b/ax/core/batch_trial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import warnings diff --git a/ax/core/data.py b/ax/core/data.py index f7e32e3ce52..de2fbde8a19 100644 --- a/ax/core/data.py +++ b/ax/core/data.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import json diff --git a/ax/core/experiment.py b/ax/core/experiment.py index 18a2a5b5e29..35378549957 100644 --- a/ax/core/experiment.py +++ b/ax/core/experiment.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import logging diff --git a/ax/core/formatting_utils.py b/ax/core/formatting_utils.py index 0d41e7c1de7..eba8e033580 100644 --- a/ax/core/formatting_utils.py +++ b/ax/core/formatting_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from enum import Enum from typing import cast, Dict, List, Optional, Tuple, Type, Union diff --git a/ax/core/generation_strategy_interface.py b/ax/core/generation_strategy_interface.py index 9aafc15d98d..b3501c88750 100644 --- a/ax/core/generation_strategy_interface.py +++ b/ax/core/generation_strategy_interface.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABC, abstractmethod from typing import List, Optional diff --git a/ax/core/generator_run.py b/ax/core/generator_run.py index 012cdcf6802..3308b886ada 100644 --- a/ax/core/generator_run.py +++ b/ax/core/generator_run.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import copy diff --git a/ax/core/map_data.py b/ax/core/map_data.py index b77d5390549..256a6a6f538 100644 --- a/ax/core/map_data.py +++ b/ax/core/map_data.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from logging import Logger diff --git a/ax/core/map_metric.py b/ax/core/map_metric.py index 2398494b318..94fa9dde6af 100644 --- a/ax/core/map_metric.py +++ b/ax/core/map_metric.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Type diff --git a/ax/core/metric.py b/ax/core/metric.py index 2a9704038ea..3c9fbe6e6c2 100644 --- a/ax/core/metric.py +++ b/ax/core/metric.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import traceback diff --git a/ax/core/multi_type_experiment.py b/ax/core/multi_type_experiment.py index f7259ed87e5..1e15ff60cc9 100644 --- a/ax/core/multi_type_experiment.py +++ b/ax/core/multi_type_experiment.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import Any, Dict, List, Optional, Set diff --git a/ax/core/objective.py b/ax/core/objective.py index 67f9da77f4b..653c0f9afc1 100644 --- a/ax/core/objective.py +++ b/ax/core/objective.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import warnings diff --git a/ax/core/observation.py b/ax/core/observation.py index 4c04941f232..ba4955ce588 100644 --- a/ax/core/observation.py +++ b/ax/core/observation.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import json diff --git a/ax/core/optimization_config.py b/ax/core/optimization_config.py index 3b5fc797510..0411b71dc58 100644 --- a/ax/core/optimization_config.py +++ b/ax/core/optimization_config.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from itertools import groupby from logging import Logger from typing import Dict, List, Optional diff --git a/ax/core/outcome_constraint.py b/ax/core/outcome_constraint.py index 8bb1dc1163f..34579beaf01 100644 --- a/ax/core/outcome_constraint.py +++ b/ax/core/outcome_constraint.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import logging diff --git a/ax/core/parameter.py b/ax/core/parameter.py index 514b07e0c5d..7b1c59422df 100644 --- a/ax/core/parameter.py +++ b/ax/core/parameter.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from abc import ABCMeta, abstractmethod, abstractproperty diff --git a/ax/core/parameter_distribution.py b/ax/core/parameter_distribution.py index 0b4b1c441f3..6a9346f2800 100644 --- a/ax/core/parameter_distribution.py +++ b/ax/core/parameter_distribution.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from copy import deepcopy diff --git a/ax/core/risk_measures.py b/ax/core/risk_measures.py index 6cd1a1710af..6a01ec9a6dd 100644 --- a/ax/core/risk_measures.py +++ b/ax/core/risk_measures.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from copy import deepcopy diff --git a/ax/core/runner.py b/ax/core/runner.py index 2ebdc6553fd..4d7b40297a0 100644 --- a/ax/core/runner.py +++ b/ax/core/runner.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/ax/core/tests/test_arm.py b/ax/core/tests/test_arm.py index b9a28dea4ef..7fe47285134 100644 --- a/ax/core/tests/test_arm.py +++ b/ax/core/tests/test_arm.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.arm import Arm from ax.utils.common.testutils import TestCase diff --git a/ax/core/tests/test_batch_trial.py b/ax/core/tests/test_batch_trial.py index d4a668149f4..7f1e858fca6 100644 --- a/ax/core/tests/test_batch_trial.py +++ b/ax/core/tests/test_batch_trial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from time import sleep from unittest import mock diff --git a/ax/core/tests/test_data.py b/ax/core/tests/test_data.py index d1d8d9119d0..1e6f4d4e875 100644 --- a/ax/core/tests/test_data.py +++ b/ax/core/tests/test_data.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import random import pandas as pd diff --git a/ax/core/tests/test_experiment.py b/ax/core/tests/test_experiment.py index a3f9eb076f4..af41dae2fa7 100644 --- a/ax/core/tests/test_experiment.py +++ b/ax/core/tests/test_experiment.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import Dict, List, Type from unittest.mock import MagicMock, patch diff --git a/ax/core/tests/test_formatting_utils.py b/ax/core/tests/test_formatting_utils.py index f78af0c2199..bdf3b39219f 100644 --- a/ax/core/tests/test_formatting_utils.py +++ b/ax/core/tests/test_formatting_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.formatting_utils import raw_data_to_evaluation from ax.exceptions.core import UserInputError from ax.utils.common.testutils import TestCase diff --git a/ax/core/tests/test_generator_run.py b/ax/core/tests/test_generator_run.py index 4b948e96cf0..a9d730fe3cf 100644 --- a/ax/core/tests/test_generator_run.py +++ b/ax/core/tests/test_generator_run.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.arm import Arm from ax.core.generator_run import GeneratorRun from ax.exceptions.core import UnsupportedError diff --git a/ax/core/tests/test_map_data.py b/ax/core/tests/test_map_data.py index 79f0e5cfca8..419cc7380c1 100644 --- a/ax/core/tests/test_map_data.py +++ b/ax/core/tests/test_map_data.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import pandas as pd from ax.core.data import Data diff --git a/ax/core/tests/test_map_metric.py b/ax/core/tests/test_map_metric.py index 1994111b16b..55d97b44859 100644 --- a/ax/core/tests/test_map_metric.py +++ b/ax/core/tests/test_map_metric.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.map_metric import MapMetric from ax.utils.common.testutils import TestCase from ax.utils.testing.core_stubs import get_map_data diff --git a/ax/core/tests/test_metric.py b/ax/core/tests/test_metric.py index b673d78428a..b6faa8f0944 100644 --- a/ax/core/tests/test_metric.py +++ b/ax/core/tests/test_metric.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.metric import Metric, MetricFetchE from ax.utils.common.result import Err from ax.utils.common.testutils import TestCase diff --git a/ax/core/tests/test_multi_type_experiment.py b/ax/core/tests/test_multi_type_experiment.py index 3843869a79d..a23f787c0ae 100644 --- a/ax/core/tests/test_multi_type_experiment.py +++ b/ax/core/tests/test_multi_type_experiment.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.metrics.branin import BraninMetric from ax.runners.synthetic import SyntheticRunner from ax.utils.common.testutils import TestCase diff --git a/ax/core/tests/test_objective.py b/ax/core/tests/test_objective.py index b511c48eb07..3c6e7a3059d 100644 --- a/ax/core/tests/test_objective.py +++ b/ax/core/tests/test_objective.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from ax.core.metric import Metric diff --git a/ax/core/tests/test_observation.py b/ax/core/tests/test_observation.py index e03e9c9fb8e..a840096ff84 100644 --- a/ax/core/tests/test_observation.py +++ b/ax/core/tests/test_observation.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from unittest.mock import Mock, PropertyMock diff --git a/ax/core/tests/test_optimization_config.py b/ax/core/tests/test_optimization_config.py index e2a2a754d7d..30739d8c512 100644 --- a/ax/core/tests/test_optimization_config.py +++ b/ax/core/tests/test_optimization_config.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.metric import Metric from ax.core.objective import MultiObjective, Objective, ScalarizedObjective from ax.core.optimization_config import ( diff --git a/ax/core/tests/test_outcome_constraint.py b/ax/core/tests/test_outcome_constraint.py index 042420453f7..399c7f6a093 100644 --- a/ax/core/tests/test_outcome_constraint.py +++ b/ax/core/tests/test_outcome_constraint.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock from ax.core.metric import Metric diff --git a/ax/core/tests/test_parameter.py b/ax/core/tests/test_parameter.py index f25f9d1eab7..2cae278ad89 100644 --- a/ax/core/tests/test_parameter.py +++ b/ax/core/tests/test_parameter.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.parameter import ( _get_parameter_type, ChoiceParameter, diff --git a/ax/core/tests/test_parameter_constraint.py b/ax/core/tests/test_parameter_constraint.py index 329b5b0ea6e..c05c5b680dd 100644 --- a/ax/core/tests/test_parameter_constraint.py +++ b/ax/core/tests/test_parameter_constraint.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.parameter import ( ChoiceParameter, FixedParameter, diff --git a/ax/core/tests/test_parameter_distribution.py b/ax/core/tests/test_parameter_distribution.py index d3129463480..2e5f93401e7 100644 --- a/ax/core/tests/test_parameter_distribution.py +++ b/ax/core/tests/test_parameter_distribution.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.parameter_distribution import ParameterDistribution from ax.core.search_space import RobustSearchSpace from ax.exceptions.core import UserInputError diff --git a/ax/core/tests/test_risk_measures.py b/ax/core/tests/test_risk_measures.py index af865f16ac7..d3ad5775507 100644 --- a/ax/core/tests/test_risk_measures.py +++ b/ax/core/tests/test_risk_measures.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.risk_measures import RiskMeasure from ax.utils.common.testutils import TestCase diff --git a/ax/core/tests/test_runner.py b/ax/core/tests/test_runner.py index 192caf0a9f8..63f2845257a 100644 --- a/ax/core/tests/test_runner.py +++ b/ax/core/tests/test_runner.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock from ax.core.base_trial import BaseTrial diff --git a/ax/core/tests/test_search_space.py b/ax/core/tests/test_search_space.py index 0a2f7de9f67..642436ad736 100644 --- a/ax/core/tests/test_search_space.py +++ b/ax/core/tests/test_search_space.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses import warnings from random import choice diff --git a/ax/core/tests/test_trial.py b/ax/core/tests/test_trial.py index 4e4c96e435d..b8d0b940c3a 100644 --- a/ax/core/tests/test_trial.py +++ b/ax/core/tests/test_trial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import itertools from copy import deepcopy from unittest import mock diff --git a/ax/core/tests/test_types.py b/ax/core/tests/test_types.py index f9b6972b9ba..9cab3c842b6 100644 --- a/ax/core/tests/test_types.py +++ b/ax/core/tests/test_types.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.types import ( merge_model_predict, validate_evaluation_outcome, diff --git a/ax/core/tests/test_utils.py b/ax/core/tests/test_utils.py index 7463e7a16b5..a5c5f5ab129 100644 --- a/ax/core/tests/test_utils.py +++ b/ax/core/tests/test_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from unittest.mock import patch diff --git a/ax/core/trial.py b/ax/core/trial.py index cde8c0b5f0b..d79f903bb91 100644 --- a/ax/core/trial.py +++ b/ax/core/trial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from copy import deepcopy diff --git a/ax/core/types.py b/ax/core/types.py index 367d884049b..bd1a5bdca9f 100644 --- a/ax/core/types.py +++ b/ax/core/types.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum from typing import ( Any, diff --git a/ax/core/utils.py b/ax/core/utils.py index 7c8438781dc..657bf5a5e89 100644 --- a/ax/core/utils.py +++ b/ax/core/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import defaultdict from typing import Dict, Iterable, List, NamedTuple, Optional, Set, Tuple diff --git a/ax/early_stopping/__init__.py b/ax/early_stopping/__init__.py index de7bbc79ce3..10d5f9fc694 100644 --- a/ax/early_stopping/__init__.py +++ b/ax/early_stopping/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.early_stopping import strategies diff --git a/ax/early_stopping/strategies/__init__.py b/ax/early_stopping/strategies/__init__.py index 1953e77aaac..63747677726 100644 --- a/ax/early_stopping/strategies/__init__.py +++ b/ax/early_stopping/strategies/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.early_stopping.strategies.base import ( BaseEarlyStoppingStrategy, EarlyStoppingTrainingData, diff --git a/ax/early_stopping/strategies/base.py b/ax/early_stopping/strategies/base.py index 076c241239b..3988bae41d4 100644 --- a/ax/early_stopping/strategies/base.py +++ b/ax/early_stopping/strategies/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import warnings from abc import ABC, abstractmethod diff --git a/ax/early_stopping/strategies/logical.py b/ax/early_stopping/strategies/logical.py index 1d10d920327..7afcb3ca0be 100644 --- a/ax/early_stopping/strategies/logical.py +++ b/ax/early_stopping/strategies/logical.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from functools import reduce from typing import Any, Dict, Optional, Sequence, Set diff --git a/ax/early_stopping/strategies/percentile.py b/ax/early_stopping/strategies/percentile.py index 29435557b27..4f6800be20a 100644 --- a/ax/early_stopping/strategies/percentile.py +++ b/ax/early_stopping/strategies/percentile.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, Iterable, List, Optional, Set, Tuple diff --git a/ax/early_stopping/strategies/threshold.py b/ax/early_stopping/strategies/threshold.py index e1012912a9d..a0918f0d0e1 100644 --- a/ax/early_stopping/strategies/threshold.py +++ b/ax/early_stopping/strategies/threshold.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, Iterable, List, Optional, Set, Tuple diff --git a/ax/early_stopping/tests/__init__.py b/ax/early_stopping/tests/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/early_stopping/tests/__init__.py +++ b/ax/early_stopping/tests/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/early_stopping/tests/test_strategies.py b/ax/early_stopping/tests/test_strategies.py index 2e821ea0c51..aef12d50a99 100644 --- a/ax/early_stopping/tests/test_strategies.py +++ b/ax/early_stopping/tests/test_strategies.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import Any, cast, Dict, Optional, Set diff --git a/ax/early_stopping/utils.py b/ax/early_stopping/utils.py index e900c9c3089..0e5a158cfc5 100644 --- a/ax/early_stopping/utils.py +++ b/ax/early_stopping/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import defaultdict from logging import Logger from typing import Dict, List, Optional, Tuple diff --git a/ax/exceptions/constants.py b/ax/exceptions/constants.py index 2e1f9478cf7..254d3905bed 100644 --- a/ax/exceptions/constants.py +++ b/ax/exceptions/constants.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + TS_MIN_WEIGHT_ERROR = """\ No arms generated by Thompson Sampling had weight > min_weight. \ The minimum weight required is {min_weight:2.4}, and the \ diff --git a/ax/exceptions/core.py b/ax/exceptions/core.py index 424325340d4..14afff8245c 100644 --- a/ax/exceptions/core.py +++ b/ax/exceptions/core.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + class AxError(Exception): """Base Ax exception. diff --git a/ax/exceptions/data_provider.py b/ax/exceptions/data_provider.py index ace80f0ded1..d172670e54d 100644 --- a/ax/exceptions/data_provider.py +++ b/ax/exceptions/data_provider.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Iterable diff --git a/ax/exceptions/generation_strategy.py b/ax/exceptions/generation_strategy.py index 0233008a753..282a143e4d3 100644 --- a/ax/exceptions/generation_strategy.py +++ b/ax/exceptions/generation_strategy.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import typing # noqa F401, this is to enable type-checking from typing import Optional diff --git a/ax/exceptions/model.py b/ax/exceptions/model.py index a1a53412a0a..01bc865f288 100644 --- a/ax/exceptions/model.py +++ b/ax/exceptions/model.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.exceptions.core import AxError diff --git a/ax/exceptions/storage.py b/ax/exceptions/storage.py index 1ce719586ff..03a172c63fa 100644 --- a/ax/exceptions/storage.py +++ b/ax/exceptions/storage.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.exceptions.core import AxError diff --git a/ax/global_stopping/__init__.py b/ax/global_stopping/__init__.py index a014cdcd248..88f98c35230 100644 --- a/ax/global_stopping/__init__.py +++ b/ax/global_stopping/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.global_stopping import strategies diff --git a/ax/global_stopping/strategies/__init__.py b/ax/global_stopping/strategies/__init__.py index 3fcaac66e8b..99da2b56db9 100644 --- a/ax/global_stopping/strategies/__init__.py +++ b/ax/global_stopping/strategies/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.global_stopping.strategies.base import BaseGlobalStoppingStrategy from ax.global_stopping.strategies.improvement import ImprovementGlobalStoppingStrategy diff --git a/ax/global_stopping/strategies/base.py b/ax/global_stopping/strategies/base.py index 6ad1bd78c42..9780179def5 100644 --- a/ax/global_stopping/strategies/base.py +++ b/ax/global_stopping/strategies/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABC, abstractmethod from typing import Any, Tuple diff --git a/ax/global_stopping/strategies/improvement.py b/ax/global_stopping/strategies/improvement.py index a9ee30df5d8..6789a6f75c9 100644 --- a/ax/global_stopping/strategies/improvement.py +++ b/ax/global_stopping/strategies/improvement.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, List, Optional, Tuple diff --git a/ax/global_stopping/tests/__init__.py b/ax/global_stopping/tests/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/global_stopping/tests/__init__.py +++ b/ax/global_stopping/tests/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/global_stopping/tests/tests_strategies.py b/ax/global_stopping/tests/tests_strategies.py index c1ad1737d3b..84d0bdeab78 100644 --- a/ax/global_stopping/tests/tests_strategies.py +++ b/ax/global_stopping/tests/tests_strategies.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Tuple import numpy as np diff --git a/ax/health_check/tests/test_search_space.py b/ax/health_check/tests/test_search_space.py index 77de2daad83..71b26e85088 100644 --- a/ax/health_check/tests/test_search_space.py +++ b/ax/health_check/tests/test_search_space.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List from ax.core import SearchSpace diff --git a/ax/metrics/__init__.py b/ax/metrics/__init__.py index 61cea92a6c7..5be0f37df9c 100644 --- a/ax/metrics/__init__.py +++ b/ax/metrics/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + # flake8: noqa F401 from ax.metrics.branin import BraninMetric from ax.metrics.chemistry import ChemistryMetric diff --git a/ax/metrics/botorch_test_problem.py b/ax/metrics/botorch_test_problem.py index 7f949fbe004..5660df35bf8 100644 --- a/ax/metrics/botorch_test_problem.py +++ b/ax/metrics/botorch_test_problem.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Optional import pandas as pd diff --git a/ax/metrics/branin.py b/ax/metrics/branin.py index 53e4ec3c63b..884c776981e 100644 --- a/ax/metrics/branin.py +++ b/ax/metrics/branin.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.metrics.noisy_function import NoisyFunctionMetric from ax.utils.common.typeutils import checked_cast diff --git a/ax/metrics/branin_map.py b/ax/metrics/branin_map.py index 1d408e23958..25fc3c97e79 100644 --- a/ax/metrics/branin_map.py +++ b/ax/metrics/branin_map.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import math diff --git a/ax/metrics/chemistry.py b/ax/metrics/chemistry.py index a8cd67cd200..ef3800ad11c 100644 --- a/ax/metrics/chemistry.py +++ b/ax/metrics/chemistry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Classes for optimizing yields from chemical reactions. diff --git a/ax/metrics/curve.py b/ax/metrics/curve.py index 9e49af645da..b816089b3ba 100644 --- a/ax/metrics/curve.py +++ b/ax/metrics/curve.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Metrics that allow to retrieve curves of partial results. Typically used to retrieve partial learning curves of ML training jobs. diff --git a/ax/metrics/dict_lookup.py b/ax/metrics/dict_lookup.py index 573a2518a1d..1c9ad693e3f 100644 --- a/ax/metrics/dict_lookup.py +++ b/ax/metrics/dict_lookup.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union diff --git a/ax/metrics/factorial.py b/ax/metrics/factorial.py index b8e8315b68d..f53746f067c 100644 --- a/ax/metrics/factorial.py +++ b/ax/metrics/factorial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Tuple import numpy as np diff --git a/ax/metrics/hartmann6.py b/ax/metrics/hartmann6.py index ef8bb275d55..5cdb479df34 100644 --- a/ax/metrics/hartmann6.py +++ b/ax/metrics/hartmann6.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.metrics.noisy_function import NoisyFunctionMetric from ax.utils.common.typeutils import checked_cast diff --git a/ax/metrics/jenatton.py b/ax/metrics/jenatton.py index 8acf2939650..8fedb8d034b 100644 --- a/ax/metrics/jenatton.py +++ b/ax/metrics/jenatton.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Optional import pandas as pd diff --git a/ax/metrics/l2norm.py b/ax/metrics/l2norm.py index aec728e62ce..d0e109b1328 100644 --- a/ax/metrics/l2norm.py +++ b/ax/metrics/l2norm.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.metrics.noisy_function import NoisyFunctionMetric diff --git a/ax/metrics/noisy_function.py b/ax/metrics/noisy_function.py index d01a6b577fd..bb24fe350f0 100644 --- a/ax/metrics/noisy_function.py +++ b/ax/metrics/noisy_function.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Callable, List, Optional diff --git a/ax/metrics/noisy_function_map.py b/ax/metrics/noisy_function_map.py index 735361b7a18..9118b74c389 100644 --- a/ax/metrics/noisy_function_map.py +++ b/ax/metrics/noisy_function_map.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from logging import Logger diff --git a/ax/metrics/sklearn.py b/ax/metrics/sklearn.py index 8cbdd736118..a9b5848c46f 100644 --- a/ax/metrics/sklearn.py +++ b/ax/metrics/sklearn.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from copy import deepcopy diff --git a/ax/metrics/tensorboard.py b/ax/metrics/tensorboard.py index 30d254c3eb8..6e229192dae 100644 --- a/ax/metrics/tensorboard.py +++ b/ax/metrics/tensorboard.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import logging diff --git a/ax/metrics/tests/test_chemistry.py b/ax/metrics/tests/test_chemistry.py index 04565e78fdd..d2f4890548b 100644 --- a/ax/metrics/tests/test_chemistry.py +++ b/ax/metrics/tests/test_chemistry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from enum import Enum from unittest import mock diff --git a/ax/metrics/tests/test_curve.py b/ax/metrics/tests/test_curve.py index a51cfeb6cc0..52e486579a2 100644 --- a/ax/metrics/tests/test_curve.py +++ b/ax/metrics/tests/test_curve.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.metrics.curve import AbstractCurveMetric from ax.utils.common.testutils import TestCase diff --git a/ax/metrics/tests/test_dict_lookup.py b/ax/metrics/tests/test_dict_lookup.py index c3a4fc3a6cd..254abb0480e 100644 --- a/ax/metrics/tests/test_dict_lookup.py +++ b/ax/metrics/tests/test_dict_lookup.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock from ax.core.arm import Arm diff --git a/ax/metrics/tests/test_noisy_function.py b/ax/metrics/tests/test_noisy_function.py index 3fee1f1935a..84e341d2102 100644 --- a/ax/metrics/tests/test_noisy_function.py +++ b/ax/metrics/tests/test_noisy_function.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from ax.metrics.noisy_function import GenericNoisyFunctionMetric diff --git a/ax/metrics/tests/test_sklearn.py b/ax/metrics/tests/test_sklearn.py index f47186e9349..f8a93dcab47 100644 --- a/ax/metrics/tests/test_sklearn.py +++ b/ax/metrics/tests/test_sklearn.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from contextlib import ExitStack from enum import Enum from math import sqrt diff --git a/ax/metrics/tests/test_tensorboard.py b/ax/metrics/tests/test_tensorboard.py index f903fdd5a22..251f5ca450f 100644 --- a/ax/metrics/tests/test_tensorboard.py +++ b/ax/metrics/tests/test_tensorboard.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Iterable, List, Optional, Union from unittest import mock diff --git a/ax/metrics/torchx.py b/ax/metrics/torchx.py index e42d0bb2f17..a9c60bc75d6 100644 --- a/ax/metrics/torchx.py +++ b/ax/metrics/torchx.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, cast diff --git a/ax/modelbridge/__init__.py b/ax/modelbridge/__init__.py index 48ad14eaa8f..95c55c32641 100644 --- a/ax/modelbridge/__init__.py +++ b/ax/modelbridge/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + # flake8: noqa F401 from ax.modelbridge import transforms from ax.modelbridge.base import ModelBridge diff --git a/ax/modelbridge/base.py b/ax/modelbridge/base.py index 342dff604e6..766b9e4f586 100644 --- a/ax/modelbridge/base.py +++ b/ax/modelbridge/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json import time import warnings diff --git a/ax/modelbridge/cross_validation.py b/ax/modelbridge/cross_validation.py index 645d51ae72a..e319e050650 100644 --- a/ax/modelbridge/cross_validation.py +++ b/ax/modelbridge/cross_validation.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABC, abstractmethod from collections import defaultdict from copy import deepcopy diff --git a/ax/modelbridge/discrete.py b/ax/modelbridge/discrete.py index 22abb78f9dc..3e4436d8e66 100644 --- a/ax/modelbridge/discrete.py +++ b/ax/modelbridge/discrete.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, Set, Tuple from ax.core.observation import ( diff --git a/ax/modelbridge/dispatch_utils.py b/ax/modelbridge/dispatch_utils.py index 29e10f130e7..d6eba2e747b 100644 --- a/ax/modelbridge/dispatch_utils.py +++ b/ax/modelbridge/dispatch_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import warnings from math import ceil diff --git a/ax/modelbridge/factory.py b/ax/modelbridge/factory.py index 51b1101784e..8e8471e3a52 100644 --- a/ax/modelbridge/factory.py +++ b/ax/modelbridge/factory.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, List, Optional, Type diff --git a/ax/modelbridge/generation_node.py b/ax/modelbridge/generation_node.py index b20ddfafab9..5697038e6e5 100644 --- a/ax/modelbridge/generation_node.py +++ b/ax/modelbridge/generation_node.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import dataclass, field diff --git a/ax/modelbridge/generation_strategy.py b/ax/modelbridge/generation_strategy.py index 21892f9eca5..190e2d37718 100644 --- a/ax/modelbridge/generation_strategy.py +++ b/ax/modelbridge/generation_strategy.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from copy import deepcopy diff --git a/ax/modelbridge/map_torch.py b/ax/modelbridge/map_torch.py index 73a6353941b..0f0f1f50418 100644 --- a/ax/modelbridge/map_torch.py +++ b/ax/modelbridge/map_torch.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, List, Optional, Tuple, Type import numpy as np diff --git a/ax/modelbridge/model_spec.py b/ax/modelbridge/model_spec.py index 49e7ce61c6e..cca8bde87a3 100644 --- a/ax/modelbridge/model_spec.py +++ b/ax/modelbridge/model_spec.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import json diff --git a/ax/modelbridge/modelbridge_utils.py b/ax/modelbridge/modelbridge_utils.py index 7fd27d480f5..fe521bd006f 100644 --- a/ax/modelbridge/modelbridge_utils.py +++ b/ax/modelbridge/modelbridge_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import warnings diff --git a/ax/modelbridge/pairwise.py b/ax/modelbridge/pairwise.py index af66815de5c..5095279b444 100644 --- a/ax/modelbridge/pairwise.py +++ b/ax/modelbridge/pairwise.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import List, Optional, Tuple diff --git a/ax/modelbridge/prediction_utils.py b/ax/modelbridge/prediction_utils.py index 6a797f7f832..db632d4728c 100644 --- a/ax/modelbridge/prediction_utils.py +++ b/ax/modelbridge/prediction_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Dict, List, Optional, Set, Tuple diff --git a/ax/modelbridge/random.py b/ax/modelbridge/random.py index a21adcddeb1..ca1dc4b7215 100644 --- a/ax/modelbridge/random.py +++ b/ax/modelbridge/random.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional from ax.core.experiment import Experiment diff --git a/ax/modelbridge/registry.py b/ax/modelbridge/registry.py index 1c6d0e48359..b94b344fbfe 100644 --- a/ax/modelbridge/registry.py +++ b/ax/modelbridge/registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Module containing a registry of standard models (and generators, samplers etc.) such as Sobol generator, GP+EI, Thompson sampler, etc. diff --git a/ax/modelbridge/strategies/alebo.py b/ax/modelbridge/strategies/alebo.py index bf8cef40f2c..8a7540f1849 100644 --- a/ax/modelbridge/strategies/alebo.py +++ b/ax/modelbridge/strategies/alebo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Optional import numpy as np diff --git a/ax/modelbridge/strategies/rembo.py b/ax/modelbridge/strategies/rembo.py index e1130a79ba0..a26e0c0c288 100644 --- a/ax/modelbridge/strategies/rembo.py +++ b/ax/modelbridge/strategies/rembo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from collections import defaultdict from typing import Any, Dict, List, Optional, Set, Tuple diff --git a/ax/modelbridge/tests/test_aepsych_criterion.py b/ax/modelbridge/tests/test_aepsych_criterion.py index 88a13fd2f15..012ed4e40b0 100644 --- a/ax/modelbridge/tests/test_aepsych_criterion.py +++ b/ax/modelbridge/tests/test_aepsych_criterion.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest.mock import patch import pandas as pd diff --git a/ax/modelbridge/tests/test_alebo_strategy.py b/ax/modelbridge/tests/test_alebo_strategy.py index c62ca02313b..ac05197a9d2 100644 --- a/ax/modelbridge/tests/test_alebo_strategy.py +++ b/ax/modelbridge/tests/test_alebo_strategy.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock import numpy as np diff --git a/ax/modelbridge/tests/test_base_modelbridge.py b/ax/modelbridge/tests/test_base_modelbridge.py index 13a81e4e8c1..3d3e39b9721 100644 --- a/ax/modelbridge/tests/test_base_modelbridge.py +++ b/ax/modelbridge/tests/test_base_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from typing import Any, List from unittest import mock diff --git a/ax/modelbridge/tests/test_cross_validation.py b/ax/modelbridge/tests/test_cross_validation.py index 1750d9232bf..2da51d182e4 100644 --- a/ax/modelbridge/tests/test_cross_validation.py +++ b/ax/modelbridge/tests/test_cross_validation.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List from unittest import mock diff --git a/ax/modelbridge/tests/test_discrete_modelbridge.py b/ax/modelbridge/tests/test_discrete_modelbridge.py index 1e1d45fdbec..cb8757fe79f 100644 --- a/ax/modelbridge/tests/test_discrete_modelbridge.py +++ b/ax/modelbridge/tests/test_discrete_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock from unittest.mock import Mock diff --git a/ax/modelbridge/tests/test_dispatch_utils.py b/ax/modelbridge/tests/test_dispatch_utils.py index 74616148776..644f4855166 100644 --- a/ax/modelbridge/tests/test_dispatch_utils.py +++ b/ax/modelbridge/tests/test_dispatch_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import warnings from typing import Any, Dict diff --git a/ax/modelbridge/tests/test_factory.py b/ax/modelbridge/tests/test_factory.py index d4c09dd7c0c..13ded3fd64a 100644 --- a/ax/modelbridge/tests/test_factory.py +++ b/ax/modelbridge/tests/test_factory.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock import pandas as pd diff --git a/ax/modelbridge/tests/test_generation_node.py b/ax/modelbridge/tests/test_generation_node.py index 9e52c807bf9..010f9abd340 100644 --- a/ax/modelbridge/tests/test_generation_node.py +++ b/ax/modelbridge/tests/test_generation_node.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from logging import Logger from unittest.mock import patch, PropertyMock diff --git a/ax/modelbridge/tests/test_generation_strategy.py b/ax/modelbridge/tests/test_generation_strategy.py index f8ec6949cd9..1b5d5ec5307 100644 --- a/ax/modelbridge/tests/test_generation_strategy.py +++ b/ax/modelbridge/tests/test_generation_strategy.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import cast, List from unittest import mock diff --git a/ax/modelbridge/tests/test_map_torch_modelbridge.py b/ax/modelbridge/tests/test_map_torch_modelbridge.py index fc281a75fee..3a14f203234 100644 --- a/ax/modelbridge/tests/test_map_torch_modelbridge.py +++ b/ax/modelbridge/tests/test_map_torch_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock import numpy as np diff --git a/ax/modelbridge/tests/test_model_fit_metrics.py b/ax/modelbridge/tests/test_model_fit_metrics.py index a38c17966cd..074fdc0198d 100644 --- a/ax/modelbridge/tests/test_model_fit_metrics.py +++ b/ax/modelbridge/tests/test_model_fit_metrics.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import cast, Dict from ax.core.experiment import Experiment diff --git a/ax/modelbridge/tests/test_model_spec.py b/ax/modelbridge/tests/test_model_spec.py index d4cd0d99303..04e464a5d2e 100644 --- a/ax/modelbridge/tests/test_model_spec.py +++ b/ax/modelbridge/tests/test_model_spec.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from unittest import mock from unittest.mock import MagicMock, Mock, patch diff --git a/ax/modelbridge/tests/test_modelbridge_utils.py b/ax/modelbridge/tests/test_modelbridge_utils.py index 146da6d3ce9..f863eed92c1 100644 --- a/ax/modelbridge/tests/test_modelbridge_utils.py +++ b/ax/modelbridge/tests/test_modelbridge_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass from typing import List, Union diff --git a/ax/modelbridge/tests/test_pairwise_modelbridge.py b/ax/modelbridge/tests/test_pairwise_modelbridge.py index 951cd58926e..35a06721cc1 100644 --- a/ax/modelbridge/tests/test_pairwise_modelbridge.py +++ b/ax/modelbridge/tests/test_pairwise_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict import numpy as np diff --git a/ax/modelbridge/tests/test_prediction_utils.py b/ax/modelbridge/tests/test_prediction_utils.py index 72a9e9481ab..2fb9c603ac0 100644 --- a/ax/modelbridge/tests/test_prediction_utils.py +++ b/ax/modelbridge/tests/test_prediction_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock import numpy as np diff --git a/ax/modelbridge/tests/test_random_modelbridge.py b/ax/modelbridge/tests/test_random_modelbridge.py index d808bbf38d7..2b48d43207a 100644 --- a/ax/modelbridge/tests/test_random_modelbridge.py +++ b/ax/modelbridge/tests/test_random_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import OrderedDict from unittest import mock diff --git a/ax/modelbridge/tests/test_registry.py b/ax/modelbridge/tests/test_registry.py index f215ff69fe8..80970dfa3b5 100644 --- a/ax/modelbridge/tests/test_registry.py +++ b/ax/modelbridge/tests/test_registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import OrderedDict import numpy as np diff --git a/ax/modelbridge/tests/test_rembo_strategy.py b/ax/modelbridge/tests/test_rembo_strategy.py index 02ae35e6b99..5116ba92180 100644 --- a/ax/modelbridge/tests/test_rembo_strategy.py +++ b/ax/modelbridge/tests/test_rembo_strategy.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import torch from ax.core.experiment import Experiment from ax.core.objective import Objective diff --git a/ax/modelbridge/tests/test_robust_modelbridge.py b/ax/modelbridge/tests/test_robust_modelbridge.py index 02ab10a5010..17c560eb6e3 100644 --- a/ax/modelbridge/tests/test_robust_modelbridge.py +++ b/ax/modelbridge/tests/test_robust_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Optional from ax.core import Objective, OptimizationConfig diff --git a/ax/modelbridge/tests/test_torch_modelbridge.py b/ax/modelbridge/tests/test_torch_modelbridge.py index eb9850dcaf4..021a4217f2d 100644 --- a/ax/modelbridge/tests/test_torch_modelbridge.py +++ b/ax/modelbridge/tests/test_torch_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from contextlib import ExitStack from typing import Any, Dict, Optional from unittest import mock diff --git a/ax/modelbridge/tests/test_torch_moo_modelbridge.py b/ax/modelbridge/tests/test_torch_moo_modelbridge.py index 9ca7834f647..714869df71c 100644 --- a/ax/modelbridge/tests/test_torch_moo_modelbridge.py +++ b/ax/modelbridge/tests/test_torch_moo_modelbridge.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from contextlib import ExitStack from typing import List, Optional from unittest.mock import patch diff --git a/ax/modelbridge/tests/test_transform_utils.py b/ax/modelbridge/tests/test_transform_utils.py index 922ab4cdb17..9184a5096fe 100644 --- a/ax/modelbridge/tests/test_transform_utils.py +++ b/ax/modelbridge/tests/test_transform_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock import numpy as np diff --git a/ax/modelbridge/tests/test_transition_criterion.py b/ax/modelbridge/tests/test_transition_criterion.py index 5c5b10ee623..234ddc00ea2 100644 --- a/ax/modelbridge/tests/test_transition_criterion.py +++ b/ax/modelbridge/tests/test_transition_criterion.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from logging import Logger from unittest.mock import patch diff --git a/ax/modelbridge/tests/test_utils.py b/ax/modelbridge/tests/test_utils.py index 27bf210a897..c90db16ba4d 100644 --- a/ax/modelbridge/tests/test_utils.py +++ b/ax/modelbridge/tests/test_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock from unittest.mock import patch diff --git a/ax/modelbridge/torch.py b/ax/modelbridge/torch.py index 27e4fd67187..046b0f43845 100644 --- a/ax/modelbridge/torch.py +++ b/ax/modelbridge/torch.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from collections import defaultdict diff --git a/ax/modelbridge/transforms/__init__.py b/ax/modelbridge/transforms/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/modelbridge/transforms/__init__.py +++ b/ax/modelbridge/transforms/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/modelbridge/transforms/base.py b/ax/modelbridge/transforms/base.py index dc87da4ae57..07bf282e8e3 100644 --- a/ax/modelbridge/transforms/base.py +++ b/ax/modelbridge/transforms/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import List, Optional, TYPE_CHECKING diff --git a/ax/modelbridge/transforms/cap_parameter.py b/ax/modelbridge/transforms/cap_parameter.py index 3fcc7a480f3..30cc3e02ff1 100644 --- a/ax/modelbridge/transforms/cap_parameter.py +++ b/ax/modelbridge/transforms/cap_parameter.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional, TYPE_CHECKING from ax.core.observation import Observation diff --git a/ax/modelbridge/transforms/cast.py b/ax/modelbridge/transforms/cast.py index a52dd8792ad..60579cac775 100644 --- a/ax/modelbridge/transforms/cast.py +++ b/ax/modelbridge/transforms/cast.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional, TYPE_CHECKING from ax.core.observation import Observation, ObservationFeatures diff --git a/ax/modelbridge/transforms/centered_unit_x.py b/ax/modelbridge/transforms/centered_unit_x.py index c62692c986c..d4fbbe6afd7 100644 --- a/ax/modelbridge/transforms/centered_unit_x.py +++ b/ax/modelbridge/transforms/centered_unit_x.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.modelbridge.transforms.unit_x import UnitX diff --git a/ax/modelbridge/transforms/choice_encode.py b/ax/modelbridge/transforms/choice_encode.py index 84edf5d9bd5..14391230f4d 100644 --- a/ax/modelbridge/transforms/choice_encode.py +++ b/ax/modelbridge/transforms/choice_encode.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, Tuple, TYPE_CHECKING import numpy as np diff --git a/ax/modelbridge/transforms/convert_metric_names.py b/ax/modelbridge/transforms/convert_metric_names.py index a049c7e7656..57846e9f843 100644 --- a/ax/modelbridge/transforms/convert_metric_names.py +++ b/ax/modelbridge/transforms/convert_metric_names.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, TYPE_CHECKING from ax.core.multi_type_experiment import MultiTypeExperiment diff --git a/ax/modelbridge/transforms/derelativize.py b/ax/modelbridge/transforms/derelativize.py index 64563733c0d..7e1c3376f0a 100644 --- a/ax/modelbridge/transforms/derelativize.py +++ b/ax/modelbridge/transforms/derelativize.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import List, Optional, TYPE_CHECKING diff --git a/ax/modelbridge/transforms/int_range_to_choice.py b/ax/modelbridge/transforms/int_range_to_choice.py index 7fdc5b7bbcc..c94b152e79d 100644 --- a/ax/modelbridge/transforms/int_range_to_choice.py +++ b/ax/modelbridge/transforms/int_range_to_choice.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, Set, TYPE_CHECKING from ax.core.observation import Observation diff --git a/ax/modelbridge/transforms/int_to_float.py b/ax/modelbridge/transforms/int_to_float.py index a1bf818df6c..9b1bf746581 100644 --- a/ax/modelbridge/transforms/int_to_float.py +++ b/ax/modelbridge/transforms/int_to_float.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Dict, List, Optional, Set, TYPE_CHECKING diff --git a/ax/modelbridge/transforms/inverse_gaussian_cdf_y.py b/ax/modelbridge/transforms/inverse_gaussian_cdf_y.py index 0853e341f72..63b5ec4e9a5 100644 --- a/ax/modelbridge/transforms/inverse_gaussian_cdf_y.py +++ b/ax/modelbridge/transforms/inverse_gaussian_cdf_y.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import List, Optional, TYPE_CHECKING diff --git a/ax/modelbridge/transforms/ivw.py b/ax/modelbridge/transforms/ivw.py index c57f2235115..6b54aec9126 100644 --- a/ax/modelbridge/transforms/ivw.py +++ b/ax/modelbridge/transforms/ivw.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Dict, List diff --git a/ax/modelbridge/transforms/log.py b/ax/modelbridge/transforms/log.py index 150d3c7f190..632c2c5c9b1 100644 --- a/ax/modelbridge/transforms/log.py +++ b/ax/modelbridge/transforms/log.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from typing import List, Optional, Set, TYPE_CHECKING diff --git a/ax/modelbridge/transforms/log_y.py b/ax/modelbridge/transforms/log_y.py index 07dc4059b1c..b3656c39cc7 100644 --- a/ax/modelbridge/transforms/log_y.py +++ b/ax/modelbridge/transforms/log_y.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from logging import Logger diff --git a/ax/modelbridge/transforms/logit.py b/ax/modelbridge/transforms/logit.py index d2bb7bd7685..230ee96342f 100644 --- a/ax/modelbridge/transforms/logit.py +++ b/ax/modelbridge/transforms/logit.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional, Set, TYPE_CHECKING from ax.core.observation import Observation, ObservationFeatures diff --git a/ax/modelbridge/transforms/map_unit_x.py b/ax/modelbridge/transforms/map_unit_x.py index d6e8b1d6471..265468d7c0c 100644 --- a/ax/modelbridge/transforms/map_unit_x.py +++ b/ax/modelbridge/transforms/map_unit_x.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from collections import defaultdict diff --git a/ax/modelbridge/transforms/merge_repeated_measurements.py b/ax/modelbridge/transforms/merge_repeated_measurements.py index 4ccbbed1409..703f0a5b23e 100644 --- a/ax/modelbridge/transforms/merge_repeated_measurements.py +++ b/ax/modelbridge/transforms/merge_repeated_measurements.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from collections import defaultdict diff --git a/ax/modelbridge/transforms/metrics_as_task.py b/ax/modelbridge/transforms/metrics_as_task.py index 85c2c1aedab..64e2ea5dc24 100644 --- a/ax/modelbridge/transforms/metrics_as_task.py +++ b/ax/modelbridge/transforms/metrics_as_task.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, TYPE_CHECKING import numpy as np diff --git a/ax/modelbridge/transforms/one_hot.py b/ax/modelbridge/transforms/one_hot.py index 223cd3f5289..d7c8848f07a 100644 --- a/ax/modelbridge/transforms/one_hot.py +++ b/ax/modelbridge/transforms/one_hot.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, TYPE_CHECKING import numpy as np diff --git a/ax/modelbridge/transforms/percentile_y.py b/ax/modelbridge/transforms/percentile_y.py index 44fdb840c27..a02a0e6b260 100644 --- a/ax/modelbridge/transforms/percentile_y.py +++ b/ax/modelbridge/transforms/percentile_y.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from logging import Logger from typing import List, Optional, TYPE_CHECKING diff --git a/ax/modelbridge/transforms/power_transform_y.py b/ax/modelbridge/transforms/power_transform_y.py index 25710b24898..8be08323269 100644 --- a/ax/modelbridge/transforms/power_transform_y.py +++ b/ax/modelbridge/transforms/power_transform_y.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from collections import defaultdict diff --git a/ax/modelbridge/transforms/relativize.py b/ax/modelbridge/transforms/relativize.py index 8bcbb61edc6..e9389afbf37 100644 --- a/ax/modelbridge/transforms/relativize.py +++ b/ax/modelbridge/transforms/relativize.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from abc import ABC, abstractmethod diff --git a/ax/modelbridge/transforms/remove_fixed.py b/ax/modelbridge/transforms/remove_fixed.py index d1ab96be93d..22ea718c637 100644 --- a/ax/modelbridge/transforms/remove_fixed.py +++ b/ax/modelbridge/transforms/remove_fixed.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, TYPE_CHECKING, Union from ax.core.observation import Observation, ObservationFeatures diff --git a/ax/modelbridge/transforms/rounding.py b/ax/modelbridge/transforms/rounding.py index 17079852559..a87caa84e26 100644 --- a/ax/modelbridge/transforms/rounding.py +++ b/ax/modelbridge/transforms/rounding.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math import random from copy import copy diff --git a/ax/modelbridge/transforms/search_space_to_choice.py b/ax/modelbridge/transforms/search_space_to_choice.py index cd71306fd37..7cea2aa9be5 100644 --- a/ax/modelbridge/transforms/search_space_to_choice.py +++ b/ax/modelbridge/transforms/search_space_to_choice.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional, TYPE_CHECKING from ax.core.arm import Arm diff --git a/ax/modelbridge/transforms/search_space_to_float.py b/ax/modelbridge/transforms/search_space_to_float.py index b866365c269..50cacd04085 100644 --- a/ax/modelbridge/transforms/search_space_to_float.py +++ b/ax/modelbridge/transforms/search_space_to_float.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List from ax.core.arm import Arm diff --git a/ax/modelbridge/transforms/standardize_y.py b/ax/modelbridge/transforms/standardize_y.py index 81075d81a01..8bedd8c85b7 100644 --- a/ax/modelbridge/transforms/standardize_y.py +++ b/ax/modelbridge/transforms/standardize_y.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import DefaultDict, Dict, List, Optional, Tuple, TYPE_CHECKING, Union diff --git a/ax/modelbridge/transforms/stratified_standardize_y.py b/ax/modelbridge/transforms/stratified_standardize_y.py index ab4050edfc9..8110f3efb19 100644 --- a/ax/modelbridge/transforms/stratified_standardize_y.py +++ b/ax/modelbridge/transforms/stratified_standardize_y.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import defaultdict from logging import Logger from typing import DefaultDict, Dict, List, Optional, Tuple, TYPE_CHECKING, Union diff --git a/ax/modelbridge/transforms/task_encode.py b/ax/modelbridge/transforms/task_encode.py index 8405e565135..97d9022ebc4 100644 --- a/ax/modelbridge/transforms/task_encode.py +++ b/ax/modelbridge/transforms/task_encode.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, TYPE_CHECKING from ax.core.observation import Observation diff --git a/ax/modelbridge/transforms/tests/test_base_transform.py b/ax/modelbridge/transforms/tests/test_base_transform.py index 4e7f042787c..6b1d4c5f283 100644 --- a/ax/modelbridge/transforms/tests/test_base_transform.py +++ b/ax/modelbridge/transforms/tests/test_base_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from unittest.mock import MagicMock diff --git a/ax/modelbridge/transforms/tests/test_cap_parameter_transform.py b/ax/modelbridge/transforms/tests/test_cap_parameter_transform.py index 08cac491a62..075c943f595 100644 --- a/ax/modelbridge/transforms/tests/test_cap_parameter_transform.py +++ b/ax/modelbridge/transforms/tests/test_cap_parameter_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.parameter import ChoiceParameter, ParameterType, RangeParameter from ax.core.search_space import SearchSpace from ax.exceptions.core import UnsupportedError diff --git a/ax/modelbridge/transforms/tests/test_cast_transform.py b/ax/modelbridge/transforms/tests/test_cast_transform.py index 47175459d6a..6fa400b54e3 100644 --- a/ax/modelbridge/transforms/tests/test_cast_transform.py +++ b/ax/modelbridge/transforms/tests/test_cast_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from unittest.mock import patch diff --git a/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py b/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py index 767b9d6b624..af79001345a 100644 --- a/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py +++ b/ax/modelbridge/transforms/tests/test_centered_unit_x_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.modelbridge.transforms.centered_unit_x import CenteredUnitX from ax.modelbridge.transforms.tests.test_unit_x_transform import UnitXTransformTest diff --git a/ax/modelbridge/transforms/tests/test_choice_encode_transform.py b/ax/modelbridge/transforms/tests/test_choice_encode_transform.py index 2382bb806ec..37425ddbf51 100644 --- a/ax/modelbridge/transforms/tests/test_choice_encode_transform.py +++ b/ax/modelbridge/transforms/tests/test_choice_encode_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import List, Sized diff --git a/ax/modelbridge/transforms/tests/test_convert_metric_names_transform.py b/ax/modelbridge/transforms/tests/test_convert_metric_names_transform.py index 5704df80de5..af9b514d295 100644 --- a/ax/modelbridge/transforms/tests/test_convert_metric_names_transform.py +++ b/ax/modelbridge/transforms/tests/test_convert_metric_names_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import copy from ax.core.observation import observations_from_data diff --git a/ax/modelbridge/transforms/tests/test_derelativize_transform.py b/ax/modelbridge/transforms/tests/test_derelativize_transform.py index 3874e4a9cbe..924ee4d2f05 100644 --- a/ax/modelbridge/transforms/tests/test_derelativize_transform.py +++ b/ax/modelbridge/transforms/tests/test_derelativize_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from unittest import mock from unittest.mock import Mock, patch diff --git a/ax/modelbridge/transforms/tests/test_int_range_to_choice_transform.py b/ax/modelbridge/transforms/tests/test_int_range_to_choice_transform.py index c77704eed45..03e8cf46bcc 100644 --- a/ax/modelbridge/transforms/tests/test_int_range_to_choice_transform.py +++ b/ax/modelbridge/transforms/tests/test_int_range_to_choice_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from ax.core.observation import ObservationFeatures diff --git a/ax/modelbridge/transforms/tests/test_int_to_float_transform.py b/ax/modelbridge/transforms/tests/test_int_to_float_transform.py index 44b302ab6c8..efbd60e6dfe 100644 --- a/ax/modelbridge/transforms/tests/test_int_to_float_transform.py +++ b/ax/modelbridge/transforms/tests/test_int_to_float_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from unittest import mock diff --git a/ax/modelbridge/transforms/tests/test_inverse_gaussian_cdf_y_transform.py b/ax/modelbridge/transforms/tests/test_inverse_gaussian_cdf_y_transform.py index 9367039025d..51a743a6315 100644 --- a/ax/modelbridge/transforms/tests/test_inverse_gaussian_cdf_y_transform.py +++ b/ax/modelbridge/transforms/tests/test_inverse_gaussian_cdf_y_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_ivw_transform.py b/ax/modelbridge/transforms/tests/test_ivw_transform.py index 4d486ee9f44..7b7262dd5de 100644 --- a/ax/modelbridge/transforms/tests/test_ivw_transform.py +++ b/ax/modelbridge/transforms/tests/test_ivw_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.core.observation import ObservationData from ax.modelbridge.transforms.ivw import IVW, ivw_metric_merge diff --git a/ax/modelbridge/transforms/tests/test_log_transform.py b/ax/modelbridge/transforms/tests/test_log_transform.py index 2fb7ab5e8ee..a93114e4379 100644 --- a/ax/modelbridge/transforms/tests/test_log_transform.py +++ b/ax/modelbridge/transforms/tests/test_log_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from copy import deepcopy diff --git a/ax/modelbridge/transforms/tests/test_log_y_transform.py b/ax/modelbridge/transforms/tests/test_log_y_transform.py index 4058b03d2c0..afb7a060f4a 100644 --- a/ax/modelbridge/transforms/tests/test_log_y_transform.py +++ b/ax/modelbridge/transforms/tests/test_log_y_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from copy import deepcopy diff --git a/ax/modelbridge/transforms/tests/test_logit_transform.py b/ax/modelbridge/transforms/tests/test_logit_transform.py index f2c7ea96e9f..1329d5d9ca6 100644 --- a/ax/modelbridge/transforms/tests/test_logit_transform.py +++ b/ax/modelbridge/transforms/tests/test_logit_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from ax.core.observation import ObservationFeatures diff --git a/ax/modelbridge/transforms/tests/test_map_unit_x_transform.py b/ax/modelbridge/transforms/tests/test_map_unit_x_transform.py index 335bb835ccc..c6c034834cd 100644 --- a/ax/modelbridge/transforms/tests/test_map_unit_x_transform.py +++ b/ax/modelbridge/transforms/tests/test_map_unit_x_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_merge_repeated_measurements_transform.py b/ax/modelbridge/transforms/tests/test_merge_repeated_measurements_transform.py index ee647581d85..7774f0986f1 100644 --- a/ax/modelbridge/transforms/tests/test_merge_repeated_measurements_transform.py +++ b/ax/modelbridge/transforms/tests/test_merge_repeated_measurements_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.core.observation import Observation, ObservationData, ObservationFeatures from ax.modelbridge.transforms.merge_repeated_measurements import ( diff --git a/ax/modelbridge/transforms/tests/test_metrics_as_task_transform.py b/ax/modelbridge/transforms/tests/test_metrics_as_task_transform.py index 58d6108871c..018da708adb 100644 --- a/ax/modelbridge/transforms/tests/test_metrics_as_task_transform.py +++ b/ax/modelbridge/transforms/tests/test_metrics_as_task_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_one_hot_transform.py b/ax/modelbridge/transforms/tests/test_one_hot_transform.py index 49bc8f3cf27..9db738615ec 100644 --- a/ax/modelbridge/transforms/tests/test_one_hot_transform.py +++ b/ax/modelbridge/transforms/tests/test_one_hot_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from ax.core.observation import ObservationFeatures diff --git a/ax/modelbridge/transforms/tests/test_percentile_y_transform.py b/ax/modelbridge/transforms/tests/test_percentile_y_transform.py index 68fd3e1295c..2f9d7bc7874 100644 --- a/ax/modelbridge/transforms/tests/test_percentile_y_transform.py +++ b/ax/modelbridge/transforms/tests/test_percentile_y_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_power_y_transform.py b/ax/modelbridge/transforms/tests/test_power_y_transform.py index a6b5e868312..7dce4e3ae4c 100644 --- a/ax/modelbridge/transforms/tests/test_power_y_transform.py +++ b/ax/modelbridge/transforms/tests/test_power_y_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from copy import deepcopy diff --git a/ax/modelbridge/transforms/tests/test_relativize_transform.py b/ax/modelbridge/transforms/tests/test_relativize_transform.py index c6e2c69a79c..1d65cf9cc20 100644 --- a/ax/modelbridge/transforms/tests/test_relativize_transform.py +++ b/ax/modelbridge/transforms/tests/test_relativize_transform.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import List, Tuple from unittest.mock import Mock, patch, PropertyMock diff --git a/ax/modelbridge/transforms/tests/test_remove_fixed_transform.py b/ax/modelbridge/transforms/tests/test_remove_fixed_transform.py index 934dd520f1f..d650e70b8ea 100644 --- a/ax/modelbridge/transforms/tests/test_remove_fixed_transform.py +++ b/ax/modelbridge/transforms/tests/test_remove_fixed_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from ax.core.observation import ObservationFeatures diff --git a/ax/modelbridge/transforms/tests/test_rounding_transform.py b/ax/modelbridge/transforms/tests/test_rounding_transform.py index 1c32ef31944..14d02b7edad 100644 --- a/ax/modelbridge/transforms/tests/test_rounding_transform.py +++ b/ax/modelbridge/transforms/tests/test_rounding_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.modelbridge.transforms.rounding import ( randomized_onehot_round, diff --git a/ax/modelbridge/transforms/tests/test_search_space_to_choice_transform.py b/ax/modelbridge/transforms/tests/test_search_space_to_choice_transform.py index 31a72cd1bf1..9242647b154 100644 --- a/ax/modelbridge/transforms/tests/test_search_space_to_choice_transform.py +++ b/ax/modelbridge/transforms/tests/test_search_space_to_choice_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_search_space_to_float_transform.py b/ax/modelbridge/transforms/tests/test_search_space_to_float_transform.py index 174d539aa50..c4fc95206c6 100644 --- a/ax/modelbridge/transforms/tests/test_search_space_to_float_transform.py +++ b/ax/modelbridge/transforms/tests/test_search_space_to_float_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from ax.core.observation import ObservationFeatures diff --git a/ax/modelbridge/transforms/tests/test_standardize_y_transform.py b/ax/modelbridge/transforms/tests/test_standardize_y_transform.py index e7c09908bc0..16a4695c869 100644 --- a/ax/modelbridge/transforms/tests/test_standardize_y_transform.py +++ b/ax/modelbridge/transforms/tests/test_standardize_y_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from math import sqrt from typing import List diff --git a/ax/modelbridge/transforms/tests/test_stratified_standardize_y_transform.py b/ax/modelbridge/transforms/tests/test_stratified_standardize_y_transform.py index bf24134238f..fd49713f437 100644 --- a/ax/modelbridge/transforms/tests/test_stratified_standardize_y_transform.py +++ b/ax/modelbridge/transforms/tests/test_stratified_standardize_y_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from math import sqrt diff --git a/ax/modelbridge/transforms/tests/test_task_encode_transform.py b/ax/modelbridge/transforms/tests/test_task_encode_transform.py index 8753e6aa4fb..74b370a7ea1 100644 --- a/ax/modelbridge/transforms/tests/test_task_encode_transform.py +++ b/ax/modelbridge/transforms/tests/test_task_encode_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from ax.core.observation import ObservationFeatures diff --git a/ax/modelbridge/transforms/tests/test_trial_as_task_transform.py b/ax/modelbridge/transforms/tests/test_trial_as_task_transform.py index fab43299416..c8cade67229 100644 --- a/ax/modelbridge/transforms/tests/test_trial_as_task_transform.py +++ b/ax/modelbridge/transforms/tests/test_trial_as_task_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_unit_x_transform.py b/ax/modelbridge/transforms/tests/test_unit_x_transform.py index 87e5641bfe0..0f37e237152 100644 --- a/ax/modelbridge/transforms/tests/test_unit_x_transform.py +++ b/ax/modelbridge/transforms/tests/test_unit_x_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import numpy as np diff --git a/ax/modelbridge/transforms/tests/test_winsorize_legacy_transform.py b/ax/modelbridge/transforms/tests/test_winsorize_legacy_transform.py index cf7308effeb..68102edd438 100644 --- a/ax/modelbridge/transforms/tests/test_winsorize_legacy_transform.py +++ b/ax/modelbridge/transforms/tests/test_winsorize_legacy_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from copy import deepcopy diff --git a/ax/modelbridge/transforms/tests/test_winsorize_transform.py b/ax/modelbridge/transforms/tests/test_winsorize_transform.py index 1eeecb2d796..7489bfe707b 100644 --- a/ax/modelbridge/transforms/tests/test_winsorize_transform.py +++ b/ax/modelbridge/transforms/tests/test_winsorize_transform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from copy import deepcopy from typing import Dict, Optional, Tuple diff --git a/ax/modelbridge/transforms/trial_as_task.py b/ax/modelbridge/transforms/trial_as_task.py index b23785ea113..538870386ef 100644 --- a/ax/modelbridge/transforms/trial_as_task.py +++ b/ax/modelbridge/transforms/trial_as_task.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Dict, List, Optional, TYPE_CHECKING, Union diff --git a/ax/modelbridge/transforms/unit_x.py b/ax/modelbridge/transforms/unit_x.py index 048f0cd3167..6fe75043f1e 100644 --- a/ax/modelbridge/transforms/unit_x.py +++ b/ax/modelbridge/transforms/unit_x.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, Tuple, TYPE_CHECKING import numpy as np diff --git a/ax/modelbridge/transforms/utils.py b/ax/modelbridge/transforms/utils.py index 705fd829c45..40749651fe6 100644 --- a/ax/modelbridge/transforms/utils.py +++ b/ax/modelbridge/transforms/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from collections import defaultdict diff --git a/ax/modelbridge/transforms/winsorize.py b/ax/modelbridge/transforms/winsorize.py index 07d55203163..ce0766ed730 100644 --- a/ax/modelbridge/transforms/winsorize.py +++ b/ax/modelbridge/transforms/winsorize.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from logging import Logger from typing import Dict, List, Optional, Tuple, TYPE_CHECKING, Union diff --git a/ax/modelbridge/transition_criterion.py b/ax/modelbridge/transition_criterion.py index db5682c8ed7..9ef8313ffbb 100644 --- a/ax/modelbridge/transition_criterion.py +++ b/ax/modelbridge/transition_criterion.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import abstractmethod from logging import Logger from typing import List, Optional, Set diff --git a/ax/models/__init__.py b/ax/models/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/models/__init__.py +++ b/ax/models/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/models/base.py b/ax/models/base.py index 39c09fb644c..bb08ad708e9 100644 --- a/ax/models/base.py +++ b/ax/models/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict diff --git a/ax/models/discrete/eb_thompson.py b/ax/models/discrete/eb_thompson.py index d41c98978d0..7785b10caa5 100644 --- a/ax/models/discrete/eb_thompson.py +++ b/ax/models/discrete/eb_thompson.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from typing import List, Tuple diff --git a/ax/models/discrete/full_factorial.py b/ax/models/discrete/full_factorial.py index 64f78c67ccd..3ca75d92c2b 100644 --- a/ax/models/discrete/full_factorial.py +++ b/ax/models/discrete/full_factorial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import itertools import logging from functools import reduce diff --git a/ax/models/discrete/thompson.py b/ax/models/discrete/thompson.py index c895c78fb56..e757ed5c172 100644 --- a/ax/models/discrete/thompson.py +++ b/ax/models/discrete/thompson.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import hashlib import json from typing import Dict, List, Optional, Tuple diff --git a/ax/models/discrete_base.py b/ax/models/discrete_base.py index 2820c38f629..fd007e4972d 100644 --- a/ax/models/discrete_base.py +++ b/ax/models/discrete_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, Tuple import numpy as np diff --git a/ax/models/model_utils.py b/ax/models/model_utils.py index b813cb2b5e1..c16d31f8d03 100644 --- a/ax/models/model_utils.py +++ b/ax/models/model_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import itertools diff --git a/ax/models/random/alebo_initializer.py b/ax/models/random/alebo_initializer.py index 8615db07e02..ef88447a485 100644 --- a/ax/models/random/alebo_initializer.py +++ b/ax/models/random/alebo_initializer.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Callable, Dict, List, Optional, Tuple from warnings import warn diff --git a/ax/models/random/base.py b/ax/models/random/base.py index f380365d4cd..67947599e24 100644 --- a/ax/models/random/base.py +++ b/ax/models/random/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Callable, Dict, List, Optional, Tuple diff --git a/ax/models/random/rembo_initializer.py b/ax/models/random/rembo_initializer.py index d665c5f239f..bbf1ca1cb39 100644 --- a/ax/models/random/rembo_initializer.py +++ b/ax/models/random/rembo_initializer.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Callable, Dict, List, Optional, Tuple import numpy as np diff --git a/ax/models/random/sobol.py b/ax/models/random/sobol.py index eaae0aa20ad..ecaafefc9fd 100644 --- a/ax/models/random/sobol.py +++ b/ax/models/random/sobol.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Callable, Dict, List, Optional, Tuple import numpy as np diff --git a/ax/models/random/uniform.py b/ax/models/random/uniform.py index 33e4252ed7f..4bab11208c7 100644 --- a/ax/models/random/uniform.py +++ b/ax/models/random/uniform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Optional import numpy as np diff --git a/ax/models/tests/test_alebo.py b/ax/models/tests/test_alebo.py index 54238db5c4a..fe91df0d43c 100644 --- a/ax/models/tests/test_alebo.py +++ b/ax/models/tests/test_alebo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest import mock import numpy as np diff --git a/ax/models/tests/test_alebo_initializer.py b/ax/models/tests/test_alebo_initializer.py index 1cd84c749bd..3a53b32ddf3 100644 --- a/ax/models/tests/test_alebo_initializer.py +++ b/ax/models/tests/test_alebo_initializer.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.models.random.alebo_initializer import ALEBOInitializer from ax.utils.common.testutils import TestCase diff --git a/ax/models/tests/test_base.py b/ax/models/tests/test_base.py index 7fd78d74c3f..334f7f54b83 100644 --- a/ax/models/tests/test_base.py +++ b/ax/models/tests/test_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.models.base import Model from ax.utils.common.testutils import TestCase diff --git a/ax/models/tests/test_botorch_defaults.py b/ax/models/tests/test_botorch_defaults.py index bb9e39de380..989d7994bea 100644 --- a/ax/models/tests/test_botorch_defaults.py +++ b/ax/models/tests/test_botorch_defaults.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from unittest import mock from unittest.mock import Mock diff --git a/ax/models/tests/test_botorch_kg.py b/ax/models/tests/test_botorch_kg.py index be08b42c3f2..2b723ec64b9 100644 --- a/ax/models/tests/test_botorch_kg.py +++ b/ax/models/tests/test_botorch_kg.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from typing import Any, Dict from unittest import mock diff --git a/ax/models/tests/test_botorch_mes.py b/ax/models/tests/test_botorch_mes.py index 22d0e10e390..aab9f8505fe 100644 --- a/ax/models/tests/test_botorch_mes.py +++ b/ax/models/tests/test_botorch_mes.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from typing import Any, Dict from unittest import mock diff --git a/ax/models/tests/test_botorch_model.py b/ax/models/tests/test_botorch_model.py index cdcd9f638d0..f5a75551598 100644 --- a/ax/models/tests/test_botorch_model.py +++ b/ax/models/tests/test_botorch_model.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from itertools import chain, product from typing import Any, cast, Dict diff --git a/ax/models/tests/test_botorch_moo_defaults.py b/ax/models/tests/test_botorch_moo_defaults.py index 0c11f44fbac..bd569f7a713 100644 --- a/ax/models/tests/test_botorch_moo_defaults.py +++ b/ax/models/tests/test_botorch_moo_defaults.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from contextlib import ExitStack from typing import Any, cast, Dict, Tuple from unittest import mock diff --git a/ax/models/tests/test_botorch_moo_model.py b/ax/models/tests/test_botorch_moo_model.py index 456261cb1c2..7d7490d7cf2 100644 --- a/ax/models/tests/test_botorch_moo_model.py +++ b/ax/models/tests/test_botorch_moo_model.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from contextlib import ExitStack from typing import Any, Dict diff --git a/ax/models/tests/test_cbo_lcea.py b/ax/models/tests/test_cbo_lcea.py index 3833df522aa..dd39258c8d2 100644 --- a/ax/models/tests/test_cbo_lcea.py +++ b/ax/models/tests/test_cbo_lcea.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import cast diff --git a/ax/models/tests/test_cbo_lcem.py b/ax/models/tests/test_cbo_lcem.py index a907e871f8b..306b74a970f 100644 --- a/ax/models/tests/test_cbo_lcem.py +++ b/ax/models/tests/test_cbo_lcem.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np import torch from ax.models.torch.cbo_lcem import LCEMBO diff --git a/ax/models/tests/test_cbo_sac.py b/ax/models/tests/test_cbo_sac.py index 8601878c61f..ec2f3379913 100644 --- a/ax/models/tests/test_cbo_sac.py +++ b/ax/models/tests/test_cbo_sac.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import cast diff --git a/ax/models/tests/test_discrete.py b/ax/models/tests/test_discrete.py index 7879768b120..5d74efcd4b8 100644 --- a/ax/models/tests/test_discrete.py +++ b/ax/models/tests/test_discrete.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.models.discrete_base import DiscreteModel from ax.utils.common.testutils import TestCase diff --git a/ax/models/tests/test_eb_thompson.py b/ax/models/tests/test_eb_thompson.py index ed8e6dc44b4..c3b7ec2236a 100644 --- a/ax/models/tests/test_eb_thompson.py +++ b/ax/models/tests/test_eb_thompson.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest.mock import patch import numpy as np diff --git a/ax/models/tests/test_full_factorial.py b/ax/models/tests/test_full_factorial.py index f0c5366dfcd..c71d09652aa 100644 --- a/ax/models/tests/test_full_factorial.py +++ b/ax/models/tests/test_full_factorial.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.models.discrete.full_factorial import FullFactorialGenerator diff --git a/ax/models/tests/test_fully_bayesian.py b/ax/models/tests/test_fully_bayesian.py index eee08e01341..0d829fb5425 100644 --- a/ax/models/tests/test_fully_bayesian.py +++ b/ax/models/tests/test_fully_bayesian.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses import warnings from contextlib import ExitStack diff --git a/ax/models/tests/test_model_utils.py b/ax/models/tests/test_model_utils.py index a665dc9a393..dd00ddbba15 100644 --- a/ax/models/tests/test_model_utils.py +++ b/ax/models/tests/test_model_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from itertools import product from unittest.mock import MagicMock diff --git a/ax/models/tests/test_posterior_mean.py b/ax/models/tests/test_posterior_mean.py index 625011ae2ac..66bbc09e484 100644 --- a/ax/models/tests/test_posterior_mean.py +++ b/ax/models/tests/test_posterior_mean.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict import torch diff --git a/ax/models/tests/test_random.py b/ax/models/tests/test_random.py index 479d5c5a71a..f72f4e3a1c3 100644 --- a/ax/models/tests/test_random.py +++ b/ax/models/tests/test_random.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np import torch from ax.models.random.base import RandomModel diff --git a/ax/models/tests/test_randomforest.py b/ax/models/tests/test_randomforest.py index 9a8635d2cc7..66cf45818fb 100644 --- a/ax/models/tests/test_randomforest.py +++ b/ax/models/tests/test_randomforest.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import torch from ax.core.search_space import SearchSpaceDigest from ax.models.torch.randomforest import RandomForest diff --git a/ax/models/tests/test_rembo.py b/ax/models/tests/test_rembo.py index 2789e2baf12..daeafb98cfa 100644 --- a/ax/models/tests/test_rembo.py +++ b/ax/models/tests/test_rembo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import torch from ax.core.search_space import SearchSpaceDigest from ax.models.torch.rembo import REMBO diff --git a/ax/models/tests/test_rembo_initializer.py b/ax/models/tests/test_rembo_initializer.py index 44bba0bffd5..fed1f76ff87 100644 --- a/ax/models/tests/test_rembo_initializer.py +++ b/ax/models/tests/test_rembo_initializer.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.models.random.rembo_initializer import REMBOInitializer from ax.utils.common.testutils import TestCase diff --git a/ax/models/tests/test_sobol.py b/ax/models/tests/test_sobol.py index 4d12b51e963..4eb8a61aa0d 100644 --- a/ax/models/tests/test_sobol.py +++ b/ax/models/tests/test_sobol.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Tuple from unittest import mock diff --git a/ax/models/tests/test_thompson.py b/ax/models/tests/test_thompson.py index 7e4ed2e35ad..65e530c4388 100644 --- a/ax/models/tests/test_thompson.py +++ b/ax/models/tests/test_thompson.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.exceptions.model import ModelError diff --git a/ax/models/tests/test_torch.py b/ax/models/tests/test_torch.py index 58947b7a046..f54c5c28261 100644 --- a/ax/models/tests/test_torch.py +++ b/ax/models/tests/test_torch.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import torch from ax.core.search_space import SearchSpaceDigest from ax.models.torch_base import TorchModel, TorchOptConfig diff --git a/ax/models/tests/test_torch_model_utils.py b/ax/models/tests/test_torch_model_utils.py index 42ba7fd0075..cf2ecf198bd 100644 --- a/ax/models/tests/test_torch_model_utils.py +++ b/ax/models/tests/test_torch_model_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np import torch from ax.exceptions.model import ModelError diff --git a/ax/models/tests/test_torch_utils.py b/ax/models/tests/test_torch_utils.py index adf90ff8e9d..cbf5cb86ec8 100644 --- a/ax/models/tests/test_torch_utils.py +++ b/ax/models/tests/test_torch_utils.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Set, Tuple from unittest.mock import MagicMock, Mock, patch diff --git a/ax/models/tests/test_uniform.py b/ax/models/tests/test_uniform.py index debb38e78ca..826f2532780 100644 --- a/ax/models/tests/test_uniform.py +++ b/ax/models/tests/test_uniform.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.exceptions.core import SearchSpaceExhausted diff --git a/ax/models/torch/alebo.py b/ax/models/torch/alebo.py index 673fcadc508..99dad0b9a20 100644 --- a/ax/models/torch/alebo.py +++ b/ax/models/torch/alebo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import dataclasses diff --git a/ax/models/torch/botorch.py b/ax/models/torch/botorch.py index af9cd57a527..7ea4cf5ba62 100644 --- a/ax/models/torch/botorch.py +++ b/ax/models/torch/botorch.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import warnings diff --git a/ax/models/torch/botorch_defaults.py b/ax/models/torch/botorch_defaults.py index 6ee81439510..862510a476e 100644 --- a/ax/models/torch/botorch_defaults.py +++ b/ax/models/torch/botorch_defaults.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import functools from copy import deepcopy from random import randint diff --git a/ax/models/torch/botorch_kg.py b/ax/models/torch/botorch_kg.py index 4209c335e52..b4d5f2da1ad 100644 --- a/ax/models/torch/botorch_kg.py +++ b/ax/models/torch/botorch_kg.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from typing import Any, Callable, Dict, List, Optional, Tuple, Union diff --git a/ax/models/torch/botorch_mes.py b/ax/models/torch/botorch_mes.py index 2506e8e4ea3..b9677eccea3 100644 --- a/ax/models/torch/botorch_mes.py +++ b/ax/models/torch/botorch_mes.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, List, Optional, Tuple, Union import torch diff --git a/ax/models/torch/botorch_modular/__init__.py b/ax/models/torch/botorch_modular/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/models/torch/botorch_modular/__init__.py +++ b/ax/models/torch/botorch_modular/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/models/torch/botorch_modular/acquisition.py b/ax/models/torch/botorch_modular/acquisition.py index fb2e401b26e..77183394ebf 100644 --- a/ax/models/torch/botorch_modular/acquisition.py +++ b/ax/models/torch/botorch_modular/acquisition.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import dataclasses diff --git a/ax/models/torch/botorch_modular/input_constructors/__init__.py b/ax/models/torch/botorch_modular/input_constructors/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/models/torch/botorch_modular/input_constructors/__init__.py +++ b/ax/models/torch/botorch_modular/input_constructors/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/models/torch/botorch_modular/input_constructors/covar_modules.py b/ax/models/torch/botorch_modular/input_constructors/covar_modules.py index 319a6fc09b3..9660a26d5ef 100644 --- a/ax/models/torch/botorch_modular/input_constructors/covar_modules.py +++ b/ax/models/torch/botorch_modular/input_constructors/covar_modules.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Dict, Optional, Type, Union diff --git a/ax/models/torch/botorch_modular/input_constructors/input_transforms.py b/ax/models/torch/botorch_modular/input_constructors/input_transforms.py index 1cc17df277f..b2e9659f180 100644 --- a/ax/models/torch/botorch_modular/input_constructors/input_transforms.py +++ b/ax/models/torch/botorch_modular/input_constructors/input_transforms.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Dict, Optional, Type diff --git a/ax/models/torch/botorch_modular/input_constructors/outcome_transform.py b/ax/models/torch/botorch_modular/input_constructors/outcome_transform.py index 6dd67fa0f29..dc61c27b750 100644 --- a/ax/models/torch/botorch_modular/input_constructors/outcome_transform.py +++ b/ax/models/torch/botorch_modular/input_constructors/outcome_transform.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations diff --git a/ax/models/torch/botorch_modular/kernels.py b/ax/models/torch/botorch_modular/kernels.py index d23febb0896..7dd25455549 100644 --- a/ax/models/torch/botorch_modular/kernels.py +++ b/ax/models/torch/botorch_modular/kernels.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, List, Optional diff --git a/ax/models/torch/botorch_modular/list_surrogate.py b/ax/models/torch/botorch_modular/list_surrogate.py index 0ef414d4584..9507a8276c6 100644 --- a/ax/models/torch/botorch_modular/list_surrogate.py +++ b/ax/models/torch/botorch_modular/list_surrogate.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + raise DeprecationWarning( "`ListSurrogate` has been deprecated. Please use Surrogate instead, which may now " diff --git a/ax/models/torch/botorch_modular/model.py b/ax/models/torch/botorch_modular/model.py index b5048d071c0..15f445418bf 100644 --- a/ax/models/torch/botorch_modular/model.py +++ b/ax/models/torch/botorch_modular/model.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from copy import deepcopy from dataclasses import dataclass, field diff --git a/ax/models/torch/botorch_modular/multi_fidelity.py b/ax/models/torch/botorch_modular/multi_fidelity.py index c532ef35e35..17370346186 100644 --- a/ax/models/torch/botorch_modular/multi_fidelity.py +++ b/ax/models/torch/botorch_modular/multi_fidelity.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Mapping, Optional from ax.core.search_space import SearchSpaceDigest diff --git a/ax/models/torch/botorch_modular/optimizer_argparse.py b/ax/models/torch/botorch_modular/optimizer_argparse.py index 69bc1bfbf1d..2b815c521b7 100644 --- a/ax/models/torch/botorch_modular/optimizer_argparse.py +++ b/ax/models/torch/botorch_modular/optimizer_argparse.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Dict, Optional, Type, TypeVar, Union diff --git a/ax/models/torch/botorch_modular/sebo.py b/ax/models/torch/botorch_modular/sebo.py index 9b909171267..8bbd1be8834 100644 --- a/ax/models/torch/botorch_modular/sebo.py +++ b/ax/models/torch/botorch_modular/sebo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import functools from copy import deepcopy from functools import partial diff --git a/ax/models/torch/botorch_modular/utils.py b/ax/models/torch/botorch_modular/utils.py index a89330b40e2..3fd07673f45 100644 --- a/ax/models/torch/botorch_modular/utils.py +++ b/ax/models/torch/botorch_modular/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from logging import Logger from typing import Any, Callable, Dict, List, Optional, OrderedDict, Tuple, Type diff --git a/ax/models/torch/botorch_moo.py b/ax/models/torch/botorch_moo.py index 6101b1947c3..757ea420054 100644 --- a/ax/models/torch/botorch_moo.py +++ b/ax/models/torch/botorch_moo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Callable, Dict, List, Optional, Tuple diff --git a/ax/models/torch/botorch_moo_defaults.py b/ax/models/torch/botorch_moo_defaults.py index 85e4bc642ca..8cef589877c 100644 --- a/ax/models/torch/botorch_moo_defaults.py +++ b/ax/models/torch/botorch_moo_defaults.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ References diff --git a/ax/models/torch/cbo_lcea.py b/ax/models/torch/cbo_lcea.py index 5a2a1e875f4..83fddc4e55d 100644 --- a/ax/models/torch/cbo_lcea.py +++ b/ax/models/torch/cbo_lcea.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, cast, Dict, List, Optional, Tuple, Union diff --git a/ax/models/torch/cbo_lcem.py b/ax/models/torch/cbo_lcem.py index d9d98df59d8..8afa6afe1e3 100644 --- a/ax/models/torch/cbo_lcem.py +++ b/ax/models/torch/cbo_lcem.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, List, Optional import torch diff --git a/ax/models/torch/cbo_sac.py b/ax/models/torch/cbo_sac.py index 0d1ea49da5b..a7252e23673 100644 --- a/ax/models/torch/cbo_sac.py +++ b/ax/models/torch/cbo_sac.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, List, Optional diff --git a/ax/models/torch/frontier_utils.py b/ax/models/torch/frontier_utils.py index f1c3fe33cac..caa590b32e5 100644 --- a/ax/models/torch/frontier_utils.py +++ b/ax/models/torch/frontier_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.models.torch.botorch_moo_defaults import ( get_default_frontier_evaluator, get_weighted_mc_objective_and_objective_thresholds, diff --git a/ax/models/torch/fully_bayesian.py b/ax/models/torch/fully_bayesian.py index 4eff668de66..e2ed3fb52e5 100644 --- a/ax/models/torch/fully_bayesian.py +++ b/ax/models/torch/fully_bayesian.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + """ Models and utilities for fully bayesian inference. diff --git a/ax/models/torch/fully_bayesian_model_utils.py b/ax/models/torch/fully_bayesian_model_utils.py index 69ef485f05a..3338c6fb40f 100644 --- a/ax/models/torch/fully_bayesian_model_utils.py +++ b/ax/models/torch/fully_bayesian_model_utils.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, List, Optional, Tuple import pyro diff --git a/ax/models/torch/posterior_mean.py b/ax/models/torch/posterior_mean.py index 635c1d990ee..250bcb75fa3 100644 --- a/ax/models/torch/posterior_mean.py +++ b/ax/models/torch/posterior_mean.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Optional, Tuple diff --git a/ax/models/torch/randomforest.py b/ax/models/torch/randomforest.py index fafa8cb2f56..b9ef64e0819 100644 --- a/ax/models/torch/randomforest.py +++ b/ax/models/torch/randomforest.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, List, Optional, Tuple diff --git a/ax/models/torch/rembo.py b/ax/models/torch/rembo.py index e02017920dd..0fbedaf7813 100644 --- a/ax/models/torch/rembo.py +++ b/ax/models/torch/rembo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from typing import Any, List, Optional, Tuple from warnings import warn diff --git a/ax/models/torch/tests/test_acquisition.py b/ax/models/torch/tests/test_acquisition.py index 69113944aba..81bef0c85aa 100644 --- a/ax/models/torch/tests/test_acquisition.py +++ b/ax/models/torch/tests/test_acquisition.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import dataclasses diff --git a/ax/models/torch/tests/test_covar_modules_argparse.py b/ax/models/torch/tests/test_covar_modules_argparse.py index 3e76f2b0bae..fc41d3631a4 100644 --- a/ax/models/torch/tests/test_covar_modules_argparse.py +++ b/ax/models/torch/tests/test_covar_modules_argparse.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from unittest.mock import patch diff --git a/ax/models/torch/tests/test_input_transform_argparse.py b/ax/models/torch/tests/test_input_transform_argparse.py index 2d05fb716e4..fe45b13ae6a 100644 --- a/ax/models/torch/tests/test_input_transform_argparse.py +++ b/ax/models/torch/tests/test_input_transform_argparse.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from unittest.mock import patch diff --git a/ax/models/torch/tests/test_kernels.py b/ax/models/torch/tests/test_kernels.py index 356fc2850f1..6aeb2e9d151 100644 --- a/ax/models/torch/tests/test_kernels.py +++ b/ax/models/torch/tests/test_kernels.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from itertools import product diff --git a/ax/models/torch/tests/test_model.py b/ax/models/torch/tests/test_model.py index 55b50d385c0..ef81d9a2e17 100644 --- a/ax/models/torch/tests/test_model.py +++ b/ax/models/torch/tests/test_model.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from contextlib import ExitStack from copy import deepcopy diff --git a/ax/models/torch/tests/test_multi_fidelity.py b/ax/models/torch/tests/test_multi_fidelity.py index 61a3c6caaba..dc04accd60b 100644 --- a/ax/models/torch/tests/test_multi_fidelity.py +++ b/ax/models/torch/tests/test_multi_fidelity.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses from unittest.mock import Mock, patch diff --git a/ax/models/torch/tests/test_optimizer_argparse.py b/ax/models/torch/tests/test_optimizer_argparse.py index dd6a3d974f8..14a7ae7379a 100644 --- a/ax/models/torch/tests/test_optimizer_argparse.py +++ b/ax/models/torch/tests/test_optimizer_argparse.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from importlib import reload diff --git a/ax/models/torch/tests/test_outcome_transform_argparse.py b/ax/models/torch/tests/test_outcome_transform_argparse.py index 9646e5596bc..4c8a0e55911 100644 --- a/ax/models/torch/tests/test_outcome_transform_argparse.py +++ b/ax/models/torch/tests/test_outcome_transform_argparse.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import torch from ax.models.torch.botorch_modular.input_constructors.outcome_transform import ( outcome_transform_argparse, diff --git a/ax/models/torch/tests/test_sebo.py b/ax/models/torch/tests/test_sebo.py index b11451883d8..ec97c237eeb 100644 --- a/ax/models/torch/tests/test_sebo.py +++ b/ax/models/torch/tests/test_sebo.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import dataclasses diff --git a/ax/models/torch/tests/test_surrogate.py b/ax/models/torch/tests/test_surrogate.py index 129a682a7da..16cbb15394b 100644 --- a/ax/models/torch/tests/test_surrogate.py +++ b/ax/models/torch/tests/test_surrogate.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses import math from typing import Any, Dict, OrderedDict, Tuple, Type diff --git a/ax/models/torch/tests/test_utils.py b/ax/models/torch/tests/test_utils.py index 9d97a2dc96d..e02355a322b 100644 --- a/ax/models/torch/tests/test_utils.py +++ b/ax/models/torch/tests/test_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from typing import OrderedDict diff --git a/ax/models/torch/utils.py b/ax/models/torch/utils.py index 7792d63933d..bc0099de319 100644 --- a/ax/models/torch/utils.py +++ b/ax/models/torch/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass from logging import Logger from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Type diff --git a/ax/models/torch_base.py b/ax/models/torch_base.py index 01dd9285dbe..4991b4e04de 100644 --- a/ax/models/torch_base.py +++ b/ax/models/torch_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import dataclass, field diff --git a/ax/models/types.py b/ax/models/types.py index 626ded0fca9..88b3a8c26b5 100644 --- a/ax/models/types.py +++ b/ax/models/types.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Union from ax.core.optimization_config import OptimizationConfig diff --git a/ax/models/winsorization_config.py b/ax/models/winsorization_config.py index 4c985ef62bd..501d31babf0 100644 --- a/ax/models/winsorization_config.py +++ b/ax/models/winsorization_config.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass from typing import Optional diff --git a/ax/plot/bandit_rollout.py b/ax/plot/bandit_rollout.py index b0463b7d3b1..cf05928f3cd 100644 --- a/ax/plot/bandit_rollout.py +++ b/ax/plot/bandit_rollout.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, List import plotly.graph_objs as go diff --git a/ax/plot/base.py b/ax/plot/base.py index 2195695bcbd..64418d649c0 100644 --- a/ax/plot/base.py +++ b/ax/plot/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum import json from typing import Any, Dict, List, NamedTuple, Optional, Union diff --git a/ax/plot/color.py b/ax/plot/color.py index ece7ec5aeab..03bc860107e 100644 --- a/ax/plot/color.py +++ b/ax/plot/color.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum from numbers import Real from typing import List, Tuple diff --git a/ax/plot/contour.py b/ax/plot/contour.py index 9028d3f3a0c..58b2df2412a 100644 --- a/ax/plot/contour.py +++ b/ax/plot/contour.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import re from copy import deepcopy from typing import Any, Dict, Optional, Tuple diff --git a/ax/plot/diagnostic.py b/ax/plot/diagnostic.py index 77587740cc2..d0a957612c2 100644 --- a/ax/plot/diagnostic.py +++ b/ax/plot/diagnostic.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import Any, Dict, List, Optional, Tuple diff --git a/ax/plot/feature_importances.py b/ax/plot/feature_importances.py index 14b0179d804..67440a79eec 100644 --- a/ax/plot/feature_importances.py +++ b/ax/plot/feature_importances.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, Optional, Union diff --git a/ax/plot/helper.py b/ax/plot/helper.py index 9dadbaf5e37..e8a5cef2a4f 100644 --- a/ax/plot/helper.py +++ b/ax/plot/helper.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from collections import Counter diff --git a/ax/plot/marginal_effects.py b/ax/plot/marginal_effects.py index 5077f39fc18..017d070ac5c 100644 --- a/ax/plot/marginal_effects.py +++ b/ax/plot/marginal_effects.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, List import pandas as pd diff --git a/ax/plot/parallel_coordinates.py b/ax/plot/parallel_coordinates.py index f60bb9eede6..913dc68fc7e 100644 --- a/ax/plot/parallel_coordinates.py +++ b/ax/plot/parallel_coordinates.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional import pandas as pd diff --git a/ax/plot/pareto_frontier.py b/ax/plot/pareto_frontier.py index adedb9dd5b7..980a1290a53 100644 --- a/ax/plot/pareto_frontier.py +++ b/ax/plot/pareto_frontier.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from typing import Dict, Iterable, List, Optional, Tuple, Union diff --git a/ax/plot/pareto_utils.py b/ax/plot/pareto_utils.py index e7afb579d81..00ccc8fe8c8 100644 --- a/ax/plot/pareto_utils.py +++ b/ax/plot/pareto_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import copy from copy import deepcopy from itertools import combinations diff --git a/ax/plot/render.py b/ax/plot/render.py index 3adcb997b78..923032afd48 100644 --- a/ax/plot/render.py +++ b/ax/plot/render.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum import json import os diff --git a/ax/plot/scatter.py b/ax/plot/scatter.py index ff559e43f8d..065e173a631 100644 --- a/ax/plot/scatter.py +++ b/ax/plot/scatter.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numbers import warnings from collections import OrderedDict diff --git a/ax/plot/slice.py b/ax/plot/slice.py index 04ac5b4dc09..0ec1f59c441 100644 --- a/ax/plot/slice.py +++ b/ax/plot/slice.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import Any, Dict, List, Optional, Tuple, Union diff --git a/ax/plot/table_view.py b/ax/plot/table_view.py index 2ac3c0dd103..288709c604e 100644 --- a/ax/plot/table_view.py +++ b/ax/plot/table_view.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from typing import Tuple diff --git a/ax/plot/tests/__init__.py b/ax/plot/tests/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/plot/tests/__init__.py +++ b/ax/plot/tests/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/plot/tests/long_running/test_pareto_utils.py b/ax/plot/tests/long_running/test_pareto_utils.py index 6f334a2dfd2..2d00fb6db52 100644 --- a/ax/plot/tests/long_running/test_pareto_utils.py +++ b/ax/plot/tests/long_running/test_pareto_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.exceptions.core import UnsupportedError from ax.metrics.branin import BraninMetric from ax.modelbridge.registry import Models diff --git a/ax/plot/tests/test_contours.py b/ax/plot/tests/test_contours.py index 4b9e6e2c722..6156d32b9e3 100644 --- a/ax/plot/tests/test_contours.py +++ b/ax/plot/tests/test_contours.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import plotly.graph_objects as go from ax.modelbridge.registry import Models from ax.plot.base import AxPlotConfig diff --git a/ax/plot/tests/test_diagnostic.py b/ax/plot/tests/test_diagnostic.py index 7af6a917ebf..39aeb76872b 100644 --- a/ax/plot/tests/test_diagnostic.py +++ b/ax/plot/tests/test_diagnostic.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import plotly.graph_objects as go from ax.modelbridge.cross_validation import cross_validate from ax.modelbridge.registry import Models diff --git a/ax/plot/tests/test_feature_importances.py b/ax/plot/tests/test_feature_importances.py index 224d6c86c2b..dbb952e92a6 100644 --- a/ax/plot/tests/test_feature_importances.py +++ b/ax/plot/tests/test_feature_importances.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from typing import Dict diff --git a/ax/plot/tests/test_fitted_scatter.py b/ax/plot/tests/test_fitted_scatter.py index 38a16b89bc7..f8c6ad53c1b 100644 --- a/ax/plot/tests/test_fitted_scatter.py +++ b/ax/plot/tests/test_fitted_scatter.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy import plotly.graph_objects as go diff --git a/ax/plot/tests/test_helper.py b/ax/plot/tests/test_helper.py index 8cd1695703d..2ded89b6eac 100644 --- a/ax/plot/tests/test_helper.py +++ b/ax/plot/tests/test_helper.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.plot.helper import arm_name_to_sort_key, extend_range from ax.utils.common.testutils import TestCase diff --git a/ax/plot/tests/test_parallel_coordinates.py b/ax/plot/tests/test_parallel_coordinates.py index 007c45afb79..f1f47448cea 100644 --- a/ax/plot/tests/test_parallel_coordinates.py +++ b/ax/plot/tests/test_parallel_coordinates.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.plot.base import AxPlotConfig, AxPlotTypes from ax.plot.parallel_coordinates import plot_parallel_coordinates diff --git a/ax/plot/tests/test_pareto_utils.py b/ax/plot/tests/test_pareto_utils.py index 3dcdcd95c0f..c3cd0a959fa 100644 --- a/ax/plot/tests/test_pareto_utils.py +++ b/ax/plot/tests/test_pareto_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import copy from unittest import mock from unittest.mock import patch diff --git a/ax/plot/tests/test_slices.py b/ax/plot/tests/test_slices.py index a39ec0f54af..79a8206a352 100644 --- a/ax/plot/tests/test_slices.py +++ b/ax/plot/tests/test_slices.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import plotly.graph_objects as go from ax.modelbridge.registry import Models from ax.plot.base import AxPlotConfig diff --git a/ax/plot/tests/test_tile_fitted.py b/ax/plot/tests/test_tile_fitted.py index fc3075ddec1..92bd313bb1c 100644 --- a/ax/plot/tests/test_tile_fitted.py +++ b/ax/plot/tests/test_tile_fitted.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Optional from unittest import mock diff --git a/ax/plot/tests/test_traces.py b/ax/plot/tests/test_traces.py index 8e4111a0abb..e89f5f2fe73 100644 --- a/ax/plot/tests/test_traces.py +++ b/ax/plot/tests/test_traces.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np import plotly.graph_objects as go from ax.modelbridge.registry import Models diff --git a/ax/plot/trace.py b/ax/plot/trace.py index b997e0a9edf..fb97cdc4328 100644 --- a/ax/plot/trace.py +++ b/ax/plot/trace.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from datetime import datetime, timedelta from typing import Any, Dict, List, Optional, Tuple, Union diff --git a/ax/runners/__init__.py b/ax/runners/__init__.py index 341d88d15f6..c6d727132a3 100644 --- a/ax/runners/__init__.py +++ b/ax/runners/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + # flake8: noqa F401 from ax.runners.simulated_backend import SimulatedBackendRunner from ax.runners.synthetic import SyntheticRunner diff --git a/ax/runners/botorch_test_problem.py b/ax/runners/botorch_test_problem.py index f6553a7933c..3cb3318f23a 100644 --- a/ax/runners/botorch_test_problem.py +++ b/ax/runners/botorch_test_problem.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import importlib from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Type diff --git a/ax/runners/simulated_backend.py b/ax/runners/simulated_backend.py index 9cafb857c9c..5ad98535e1c 100644 --- a/ax/runners/simulated_backend.py +++ b/ax/runners/simulated_backend.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import defaultdict from typing import Any, Callable, Dict, Iterable, Optional, Set diff --git a/ax/runners/single_running_trial_mixin.py b/ax/runners/single_running_trial_mixin.py index e89ecf78c15..6a9e1ff54b5 100644 --- a/ax/runners/single_running_trial_mixin.py +++ b/ax/runners/single_running_trial_mixin.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import defaultdict from typing import Dict, Iterable, Set diff --git a/ax/runners/synthetic.py b/ax/runners/synthetic.py index 561480212fc..988ba1a30a8 100644 --- a/ax/runners/synthetic.py +++ b/ax/runners/synthetic.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Iterable, List, Optional, Set from ax.core.base_trial import BaseTrial, TrialStatus diff --git a/ax/runners/tests/test_botorch_test_problem.py b/ax/runners/tests/test_botorch_test_problem.py index aee2f7b440b..dbbc1a22577 100644 --- a/ax/runners/tests/test_botorch_test_problem.py +++ b/ax/runners/tests/test_botorch_test_problem.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from itertools import product from unittest.mock import Mock diff --git a/ax/runners/tests/test_single_running_trial_mixin.py b/ax/runners/tests/test_single_running_trial_mixin.py index 4be32097ab7..956a61675bf 100644 --- a/ax/runners/tests/test_single_running_trial_mixin.py +++ b/ax/runners/tests/test_single_running_trial_mixin.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.base_trial import TrialStatus from ax.runners.single_running_trial_mixin import SingleRunningTrialMixin diff --git a/ax/runners/tests/test_torchx.py b/ax/runners/tests/test_torchx.py index 43048949d2d..0d7e3d0a275 100644 --- a/ax/runners/tests/test_torchx.py +++ b/ax/runners/tests/test_torchx.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os import shutil import tempfile diff --git a/ax/runners/torchx.py b/ax/runners/torchx.py index 32f4fc4250a..9e1cd896e00 100644 --- a/ax/runners/torchx.py +++ b/ax/runners/torchx.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import inspect from logging import Logger diff --git a/ax/service/__init__.py b/ax/service/__init__.py index 931bf535843..c18583d251d 100644 --- a/ax/service/__init__.py +++ b/ax/service/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.service.managed_loop import OptimizationLoop, optimize diff --git a/ax/service/ax_client.py b/ax/service/ax_client.py index 24d0d26c122..ada394dc9fb 100644 --- a/ax/service/ax_client.py +++ b/ax/service/ax_client.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json import logging import warnings diff --git a/ax/service/interactive_loop.py b/ax/service/interactive_loop.py index da4acd4d37e..36d6d143340 100644 --- a/ax/service/interactive_loop.py +++ b/ax/service/interactive_loop.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import time from logging import Logger from queue import Queue diff --git a/ax/service/managed_loop.py b/ax/service/managed_loop.py index f1898cac407..f7860a4fa92 100644 --- a/ax/service/managed_loop.py +++ b/ax/service/managed_loop.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import inspect diff --git a/ax/service/scheduler.py b/ax/service/scheduler.py index 6d599812305..3b0ad3ea109 100644 --- a/ax/service/scheduler.py +++ b/ax/service/scheduler.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from collections import defaultdict diff --git a/ax/service/tests/__init__.py b/ax/service/tests/__init__.py index 4b87eb9e4d0..c412c1b3b4f 100644 --- a/ax/service/tests/__init__.py +++ b/ax/service/tests/__init__.py @@ -3,3 +3,5 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. + +# pyre-strict diff --git a/ax/service/tests/scheduler_test_utils.py b/ax/service/tests/scheduler_test_utils.py index 63464a725bd..25669f55c47 100644 --- a/ax/service/tests/scheduler_test_utils.py +++ b/ax/service/tests/scheduler_test_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os from datetime import timedelta from logging import WARNING diff --git a/ax/service/tests/test_ax_client.py b/ax/service/tests/test_ax_client.py index e72b6ab7bfe..7ed8639ef28 100644 --- a/ax/service/tests/test_ax_client.py +++ b/ax/service/tests/test_ax_client.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math import sys import time diff --git a/ax/service/tests/test_best_point.py b/ax/service/tests/test_best_point.py index 087041df6bd..3882e902da9 100644 --- a/ax/service/tests/test_best_point.py +++ b/ax/service/tests/test_best_point.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest.mock import Mock import pandas as pd diff --git a/ax/service/tests/test_best_point_utils.py b/ax/service/tests/test_best_point_utils.py index dec172dea99..8838f3429e0 100644 --- a/ax/service/tests/test_best_point_utils.py +++ b/ax/service/tests/test_best_point_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import random from typing import List from unittest.mock import MagicMock, patch diff --git a/ax/service/tests/test_early_stopping.py b/ax/service/tests/test_early_stopping.py index acd8c3a85fa..1c68972315d 100644 --- a/ax/service/tests/test_early_stopping.py +++ b/ax/service/tests/test_early_stopping.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Optional from ax.service.utils import early_stopping as early_stopping_utils diff --git a/ax/service/tests/test_global_stopping.py b/ax/service/tests/test_global_stopping.py index 4eaaf262caa..872b13f1bac 100644 --- a/ax/service/tests/test_global_stopping.py +++ b/ax/service/tests/test_global_stopping.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Tuple import numpy as np diff --git a/ax/service/tests/test_instantiation_utils.py b/ax/service/tests/test_instantiation_utils.py index ea151d18c29..a648bfd3c97 100644 --- a/ax/service/tests/test_instantiation_utils.py +++ b/ax/service/tests/test_instantiation_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict from ax.core.metric import Metric diff --git a/ax/service/tests/test_interactive_loop.py b/ax/service/tests/test_interactive_loop.py index 26a16a37def..a85d20a3af9 100644 --- a/ax/service/tests/test_interactive_loop.py +++ b/ax/service/tests/test_interactive_loop.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import functools import time diff --git a/ax/service/tests/test_managed_loop.py b/ax/service/tests/test_managed_loop.py index bbe3448504c..3b079b09139 100644 --- a/ax/service/tests/test_managed_loop.py +++ b/ax/service/tests/test_managed_loop.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Tuple, Union from unittest.mock import Mock, patch diff --git a/ax/service/tests/test_report_utils.py b/ax/service/tests/test_report_utils.py index b10b383ddb4..35c3f9dfb0f 100644 --- a/ax/service/tests/test_report_utils.py +++ b/ax/service/tests/test_report_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import copy import itertools from collections import namedtuple diff --git a/ax/service/tests/test_scheduler.py b/ax/service/tests/test_scheduler.py index a1a0f6d15bf..e52491517db 100644 --- a/ax/service/tests/test_scheduler.py +++ b/ax/service/tests/test_scheduler.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.service.tests.scheduler_test_utils import AxSchedulerTestCase diff --git a/ax/service/tests/test_with_db_settings_base.py b/ax/service/tests/test_with_db_settings_base.py index 46d026ff61d..66590f5b796 100644 --- a/ax/service/tests/test_with_db_settings_base.py +++ b/ax/service/tests/test_with_db_settings_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import random import string from typing import Tuple diff --git a/ax/service/utils/best_point.py b/ax/service/utils/best_point.py index 593120ca225..d604e0434cf 100644 --- a/ax/service/utils/best_point.py +++ b/ax/service/utils/best_point.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import OrderedDict from functools import reduce diff --git a/ax/service/utils/best_point_mixin.py b/ax/service/utils/best_point_mixin.py index 586483a8937..94064dc5365 100644 --- a/ax/service/utils/best_point_mixin.py +++ b/ax/service/utils/best_point_mixin.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABCMeta, abstractmethod from functools import partial from logging import Logger diff --git a/ax/service/utils/early_stopping.py b/ax/service/utils/early_stopping.py index 83856001eb7..654baaf8b31 100644 --- a/ax/service/utils/early_stopping.py +++ b/ax/service/utils/early_stopping.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Optional, Set from ax.core.experiment import Experiment diff --git a/ax/service/utils/instantiation.py b/ax/service/utils/instantiation.py index 46a6b2cb88e..44fbd278eee 100644 --- a/ax/service/utils/instantiation.py +++ b/ax/service/utils/instantiation.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum from dataclasses import dataclass diff --git a/ax/service/utils/report_utils.py b/ax/service/utils/report_utils.py index 3dc9834a7e4..e1a9b3679c1 100644 --- a/ax/service/utils/report_utils.py +++ b/ax/service/utils/report_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import itertools import logging from collections import defaultdict diff --git a/ax/service/utils/scheduler_options.py b/ax/service/utils/scheduler_options.py index a1195e35b76..ade9cdbfe16 100644 --- a/ax/service/utils/scheduler_options.py +++ b/ax/service/utils/scheduler_options.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass, field from enum import Enum from logging import INFO diff --git a/ax/service/utils/with_db_settings_base.py b/ax/service/utils/with_db_settings_base.py index 94d7d92adb7..5cacbfbd2ff 100644 --- a/ax/service/utils/with_db_settings_base.py +++ b/ax/service/utils/with_db_settings_base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import re import time diff --git a/ax/storage/__init__.py b/ax/storage/__init__.py index e5dad7d6f50..2aeca2236a7 100644 --- a/ax/storage/__init__.py +++ b/ax/storage/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.storage.json_store import load as json_load, save as json_save diff --git a/ax/storage/botorch_modular_registry.py b/ax/storage/botorch_modular_registry.py index 5bb028d4e45..2742a2df93a 100644 --- a/ax/storage/botorch_modular_registry.py +++ b/ax/storage/botorch_modular_registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, Dict, Type import torch diff --git a/ax/storage/json_store/__init__.py b/ax/storage/json_store/__init__.py index f6854afd33c..5704debd788 100644 --- a/ax/storage/json_store/__init__.py +++ b/ax/storage/json_store/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.storage.json_store.load import load_experiment as json_load from ax.storage.json_store.save import save_experiment as json_save diff --git a/ax/storage/json_store/decoder.py b/ax/storage/json_store/decoder.py index 1f0d3eeab66..041844be53e 100644 --- a/ax/storage/json_store/decoder.py +++ b/ax/storage/json_store/decoder.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import datetime from collections import OrderedDict from enum import Enum diff --git a/ax/storage/json_store/decoders.py b/ax/storage/json_store/decoders.py index 14a0d8ddc87..31f15740cb8 100644 --- a/ax/storage/json_store/decoders.py +++ b/ax/storage/json_store/decoders.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import inspect diff --git a/ax/storage/json_store/encoder.py b/ax/storage/json_store/encoder.py index 273c56b74f8..adb016c0ea7 100644 --- a/ax/storage/json_store/encoder.py +++ b/ax/storage/json_store/encoder.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import dataclasses import datetime import enum diff --git a/ax/storage/json_store/encoders.py b/ax/storage/json_store/encoders.py index 74a0e64ba17..ad3c921ae94 100644 --- a/ax/storage/json_store/encoders.py +++ b/ax/storage/json_store/encoders.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import re import warnings from pathlib import Path diff --git a/ax/storage/json_store/load.py b/ax/storage/json_store/load.py index 45bf74a3ef6..39161961697 100644 --- a/ax/storage/json_store/load.py +++ b/ax/storage/json_store/load.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from typing import Any, Callable, Dict, Type diff --git a/ax/storage/json_store/registry.py b/ax/storage/json_store/registry.py index 0243eb81f36..064f73c3e73 100644 --- a/ax/storage/json_store/registry.py +++ b/ax/storage/json_store/registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import pathlib from typing import Any, Callable, Dict, Type diff --git a/ax/storage/json_store/save.py b/ax/storage/json_store/save.py index 860a4e1f88d..9c7b49229cd 100644 --- a/ax/storage/json_store/save.py +++ b/ax/storage/json_store/save.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from typing import Any, Callable, Dict, Type diff --git a/ax/storage/json_store/tests/test_json_store.py b/ax/storage/json_store/tests/test_json_store.py index 37689aeab39..90106a5794b 100644 --- a/ax/storage/json_store/tests/test_json_store.py +++ b/ax/storage/json_store/tests/test_json_store.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os import tempfile from functools import partial diff --git a/ax/storage/metric_registry.py b/ax/storage/metric_registry.py index 11eaeba7d8e..524fa3b54e5 100644 --- a/ax/storage/metric_registry.py +++ b/ax/storage/metric_registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Callable, Dict, Optional, Tuple, Type diff --git a/ax/storage/registry_bundle.py b/ax/storage/registry_bundle.py index 5b997c8a069..6db596b316e 100644 --- a/ax/storage/registry_bundle.py +++ b/ax/storage/registry_bundle.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from abc import ABC, abstractproperty diff --git a/ax/storage/runner_registry.py b/ax/storage/runner_registry.py index cde158a61da..8089c66fde3 100644 --- a/ax/storage/runner_registry.py +++ b/ax/storage/runner_registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Callable, Dict, Optional, Tuple, Type diff --git a/ax/storage/sqa_store/__init__.py b/ax/storage/sqa_store/__init__.py index 152a564089b..a965f0f109f 100644 --- a/ax/storage/sqa_store/__init__.py +++ b/ax/storage/sqa_store/__init__.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + # necessary to import this file so SQLAlchemy knows about the event listeners # see https://fburl.com/8mn7yjt2 from ax.storage.sqa_store import validation diff --git a/ax/storage/sqa_store/db.py b/ax/storage/sqa_store/db.py index 49f558d90bc..5c9c557740c 100644 --- a/ax/storage/sqa_store/db.py +++ b/ax/storage/sqa_store/db.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from contextlib import contextmanager diff --git a/ax/storage/sqa_store/decoder.py b/ax/storage/sqa_store/decoder.py index 57ce07366cf..f23e7b3de0a 100644 --- a/ax/storage/sqa_store/decoder.py +++ b/ax/storage/sqa_store/decoder.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from collections import defaultdict, OrderedDict from enum import Enum diff --git a/ax/storage/sqa_store/delete.py b/ax/storage/sqa_store/delete.py index 0f25b5ca58d..237a31d4aa7 100644 --- a/ax/storage/sqa_store/delete.py +++ b/ax/storage/sqa_store/delete.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Optional diff --git a/ax/storage/sqa_store/encoder.py b/ax/storage/sqa_store/encoder.py index f394d04355b..03a97ba485d 100644 --- a/ax/storage/sqa_store/encoder.py +++ b/ax/storage/sqa_store/encoder.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from enum import Enum from logging import Logger diff --git a/ax/storage/sqa_store/json.py b/ax/storage/sqa_store/json.py index ec420bb9ce4..fe45454b07e 100644 --- a/ax/storage/sqa_store/json.py +++ b/ax/storage/sqa_store/json.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from json import JSONDecodeError from typing import Any, Dict, List, Optional diff --git a/ax/storage/sqa_store/load.py b/ax/storage/sqa_store/load.py index 47fc9abef9c..b203d1f7a1a 100644 --- a/ax/storage/sqa_store/load.py +++ b/ax/storage/sqa_store/load.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from math import ceil from typing import Any, cast, Dict, List, Optional, Type diff --git a/ax/storage/sqa_store/reduced_state.py b/ax/storage/sqa_store/reduced_state.py index b2b0457621a..ae2534e098d 100644 --- a/ax/storage/sqa_store/reduced_state.py +++ b/ax/storage/sqa_store/reduced_state.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List from ax.storage.sqa_store.sqa_classes import SQAGeneratorRun diff --git a/ax/storage/sqa_store/save.py b/ax/storage/sqa_store/save.py index 8f7bac9fa5d..6f598e5283f 100644 --- a/ax/storage/sqa_store/save.py +++ b/ax/storage/sqa_store/save.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os from logging import Logger diff --git a/ax/storage/sqa_store/sqa_classes.py b/ax/storage/sqa_store/sqa_classes.py index 92c495d06d5..51ba5b8c04a 100644 --- a/ax/storage/sqa_store/sqa_classes.py +++ b/ax/storage/sqa_store/sqa_classes.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from datetime import datetime from typing import Any, Dict, List, Optional diff --git a/ax/storage/sqa_store/sqa_config.py b/ax/storage/sqa_store/sqa_config.py index 4e788a7c543..23fea5fc916 100644 --- a/ax/storage/sqa_store/sqa_config.py +++ b/ax/storage/sqa_store/sqa_config.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import dataclass, field from enum import Enum from typing import Any, Callable, Dict, Optional, Type diff --git a/ax/storage/sqa_store/sqa_enum.py b/ax/storage/sqa_store/sqa_enum.py index b91fd08ccf4..5f0ec089f59 100644 --- a/ax/storage/sqa_store/sqa_enum.py +++ b/ax/storage/sqa_store/sqa_enum.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum from typing import Any, Dict, List diff --git a/ax/storage/sqa_store/structs.py b/ax/storage/sqa_store/structs.py index e7dcc5bca24..b27b1c47913 100644 --- a/ax/storage/sqa_store/structs.py +++ b/ax/storage/sqa_store/structs.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Callable, NamedTuple, Optional from ax.storage.sqa_store.decoder import Decoder diff --git a/ax/storage/sqa_store/tests/test_sqa_store.py b/ax/storage/sqa_store/tests/test_sqa_store.py index c8e1f67973e..096eb1529f1 100644 --- a/ax/storage/sqa_store/tests/test_sqa_store.py +++ b/ax/storage/sqa_store/tests/test_sqa_store.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from datetime import datetime from logging import Logger diff --git a/ax/storage/sqa_store/tests/test_utils.py b/ax/storage/sqa_store/tests/test_utils.py index 45baac3f7c1..9f2111082d2 100644 --- a/ax/storage/sqa_store/tests/test_utils.py +++ b/ax/storage/sqa_store/tests/test_utils.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.storage.sqa_store.db import init_test_engine_and_session_factory from ax.storage.sqa_store.load import load_experiment from ax.storage.sqa_store.save import save_experiment diff --git a/ax/storage/sqa_store/tests/utils.py b/ax/storage/sqa_store/tests/utils.py index d20a10b770c..a369014b5eb 100644 --- a/ax/storage/sqa_store/tests/utils.py +++ b/ax/storage/sqa_store/tests/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.storage.sqa_store.decoder import Decoder from ax.storage.sqa_store.encoder import Encoder from ax.utils.testing.core_stubs import ( diff --git a/ax/storage/sqa_store/timestamp.py b/ax/storage/sqa_store/timestamp.py index daab7b7ba80..ff3d9ea58a4 100644 --- a/ax/storage/sqa_store/timestamp.py +++ b/ax/storage/sqa_store/timestamp.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import datetime from typing import Optional diff --git a/ax/storage/sqa_store/utils.py b/ax/storage/sqa_store/utils.py index 09a5fe4dae7..76ab381c247 100644 --- a/ax/storage/sqa_store/utils.py +++ b/ax/storage/sqa_store/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import warnings from typing import Any, List, Optional diff --git a/ax/storage/sqa_store/validation.py b/ax/storage/sqa_store/validation.py index 1099c7ebfe6..e8f342306b4 100644 --- a/ax/storage/sqa_store/validation.py +++ b/ax/storage/sqa_store/validation.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Callable, List, TypeVar diff --git a/ax/storage/tests/test_botorch_modular_registry.py b/ax/storage/tests/test_botorch_modular_registry.py index 5fde6ce20e3..c6ad22e9bd5 100644 --- a/ax/storage/tests/test_botorch_modular_registry.py +++ b/ax/storage/tests/test_botorch_modular_registry.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.models.torch.botorch_modular.acquisition import Acquisition from ax.storage.botorch_modular_registry import ( ACQUISITION_FUNCTION_REGISTRY, diff --git a/ax/storage/tests/test_registry_bundle.py b/ax/storage/tests/test_registry_bundle.py index 394205b2b5a..34494040c60 100644 --- a/ax/storage/tests/test_registry_bundle.py +++ b/ax/storage/tests/test_registry_bundle.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.metrics.botorch_test_problem import BotorchTestProblemMetric from ax.metrics.branin import BraninMetric from ax.runners.botorch_test_problem import BotorchTestProblemRunner diff --git a/ax/storage/transform_registry.py b/ax/storage/transform_registry.py index 31b318cbbe0..4ffe9bb43c4 100644 --- a/ax/storage/transform_registry.py +++ b/ax/storage/transform_registry.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Type from ax.modelbridge.transforms.base import Transform diff --git a/ax/storage/utils.py b/ax/storage/utils.py index 919cf55c146..9d0b33d8f1c 100644 --- a/ax/storage/utils.py +++ b/ax/storage/utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import enum from hashlib import md5 diff --git a/ax/telemetry/ax_client.py b/ax/telemetry/ax_client.py index e792b7405e8..6b38c1f499b 100644 --- a/ax/telemetry/ax_client.py +++ b/ax/telemetry/ax_client.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import asdict, dataclass diff --git a/ax/telemetry/common.py b/ax/telemetry/common.py index 2cfb4db4ddd..aea7c8240b5 100644 --- a/ax/telemetry/common.py +++ b/ax/telemetry/common.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from datetime import datetime from typing import Any, Dict, List, Tuple, Type diff --git a/ax/telemetry/experiment.py b/ax/telemetry/experiment.py index 8948b0cae0e..637e8ff06ab 100644 --- a/ax/telemetry/experiment.py +++ b/ax/telemetry/experiment.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import dataclass diff --git a/ax/telemetry/generation_strategy.py b/ax/telemetry/generation_strategy.py index b43ff5c2bef..d01ce9240b9 100644 --- a/ax/telemetry/generation_strategy.py +++ b/ax/telemetry/generation_strategy.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import dataclass diff --git a/ax/telemetry/optimization.py b/ax/telemetry/optimization.py index b67ad142b2d..f118ba579e4 100644 --- a/ax/telemetry/optimization.py +++ b/ax/telemetry/optimization.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import dataclass diff --git a/ax/telemetry/scheduler.py b/ax/telemetry/scheduler.py index 07f3af2398c..2d8202a9c4a 100644 --- a/ax/telemetry/scheduler.py +++ b/ax/telemetry/scheduler.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import asdict, dataclass diff --git a/ax/telemetry/tests/test_ax_client.py b/ax/telemetry/tests/test_ax_client.py index 03d65326667..72381e396de 100644 --- a/ax/telemetry/tests/test_ax_client.py +++ b/ax/telemetry/tests/test_ax_client.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, List, Sequence, Union import numpy as np diff --git a/ax/telemetry/tests/test_experiment.py b/ax/telemetry/tests/test_experiment.py index 12d48f62798..d1367e387c5 100644 --- a/ax/telemetry/tests/test_experiment.py +++ b/ax/telemetry/tests/test_experiment.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.core.utils import get_model_times from ax.telemetry.experiment import ExperimentCompletedRecord, ExperimentCreatedRecord from ax.utils.common.testutils import TestCase diff --git a/ax/telemetry/tests/test_generation_strategy.py b/ax/telemetry/tests/test_generation_strategy.py index fa66581f255..8421368e7e8 100644 --- a/ax/telemetry/tests/test_generation_strategy.py +++ b/ax/telemetry/tests/test_generation_strategy.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.telemetry.generation_strategy import GenerationStrategyCreatedRecord from ax.utils.common.testutils import TestCase from ax.utils.testing.modeling_stubs import get_generation_strategy diff --git a/ax/telemetry/tests/test_optimization.py b/ax/telemetry/tests/test_optimization.py index 654cc32aa06..fa43ea6ee94 100644 --- a/ax/telemetry/tests/test_optimization.py +++ b/ax/telemetry/tests/test_optimization.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from dataclasses import asdict from datetime import datetime diff --git a/ax/telemetry/tests/test_scheduler.py b/ax/telemetry/tests/test_scheduler.py index 6c43cb1a0a4..7bf78073a38 100644 --- a/ax/telemetry/tests/test_scheduler.py +++ b/ax/telemetry/tests/test_scheduler.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import cast, Dict from unittest import mock diff --git a/ax/utils/common/base.py b/ax/utils/common/base.py index a5377a84a0e..1fc344c9e29 100644 --- a/ax/utils/common/base.py +++ b/ax/utils/common/base.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import abc diff --git a/ax/utils/common/constants.py b/ax/utils/common/constants.py index 46272205ae1..c1b7ea2b3e5 100644 --- a/ax/utils/common/constants.py +++ b/ax/utils/common/constants.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from enum import Enum, unique from typing import Tuple diff --git a/ax/utils/common/decorator.py b/ax/utils/common/decorator.py index 1d662233e11..28b29ea72bd 100644 --- a/ax/utils/common/decorator.py +++ b/ax/utils/common/decorator.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABC, abstractmethod from typing import Any, Callable, TypeVar diff --git a/ax/utils/common/equality.py b/ax/utils/common/equality.py index 07da9f9e860..23d0fe5c1a5 100644 --- a/ax/utils/common/equality.py +++ b/ax/utils/common/equality.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from datetime import datetime diff --git a/ax/utils/common/executils.py b/ax/utils/common/executils.py index 5dac930b891..e4cf060a448 100644 --- a/ax/utils/common/executils.py +++ b/ax/utils/common/executils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import asyncio import functools import time diff --git a/ax/utils/common/kwargs.py b/ax/utils/common/kwargs.py index 4083e9f4f04..85233a292b6 100644 --- a/ax/utils/common/kwargs.py +++ b/ax/utils/common/kwargs.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from inspect import Parameter, signature from logging import Logger diff --git a/ax/utils/common/result.py b/ax/utils/common/result.py index b6b7ae041eb..36703193318 100644 --- a/ax/utils/common/result.py +++ b/ax/utils/common/result.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from abc import ABC, abstractmethod, abstractproperty diff --git a/ax/utils/common/serialization.py b/ax/utils/common/serialization.py index b66a19c0712..0fa936c9b4b 100644 --- a/ax/utils/common/serialization.py +++ b/ax/utils/common/serialization.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations import inspect diff --git a/ax/utils/common/tests/test_docutils.py b/ax/utils/common/tests/test_docutils.py index b7363bfc8ae..c86e3aadebc 100644 --- a/ax/utils/common/tests/test_docutils.py +++ b/ax/utils/common/tests/test_docutils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.utils.common.docutils import copy_doc from ax.utils.common.testutils import TestCase diff --git a/ax/utils/common/tests/test_equality.py b/ax/utils/common/tests/test_equality.py index 11d459d2a18..4d2df2fc509 100644 --- a/ax/utils/common/tests/test_equality.py +++ b/ax/utils/common/tests/test_equality.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from datetime import datetime import numpy as np diff --git a/ax/utils/common/tests/test_executils.py b/ax/utils/common/tests/test_executils.py index d63b1b04c19..b76c3a9ada9 100644 --- a/ax/utils/common/tests/test_executils.py +++ b/ax/utils/common/tests/test_executils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import time from asyncio import iscoroutinefunction diff --git a/ax/utils/common/tests/test_kwargutils.py b/ax/utils/common/tests/test_kwargutils.py index ce13c5b6413..80199e0391b 100644 --- a/ax/utils/common/tests/test_kwargutils.py +++ b/ax/utils/common/tests/test_kwargutils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Callable, Dict, Optional diff --git a/ax/utils/common/tests/test_logger.py b/ax/utils/common/tests/test_logger.py index d20704b288a..ccda02882fc 100644 --- a/ax/utils/common/tests/test_logger.py +++ b/ax/utils/common/tests/test_logger.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging from tempfile import NamedTemporaryFile from unittest.mock import patch diff --git a/ax/utils/common/tests/test_result.py b/ax/utils/common/tests/test_result.py index 40898f7fffd..553c48a2b66 100644 --- a/ax/utils/common/tests/test_result.py +++ b/ax/utils/common/tests/test_result.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.utils.common.result import Err, Ok, Result, UnwrapError from ax.utils.common.testutils import TestCase diff --git a/ax/utils/common/tests/test_serialization.py b/ax/utils/common/tests/test_serialization.py index 14a9506c269..423fcd5dd11 100644 --- a/ax/utils/common/tests/test_serialization.py +++ b/ax/utils/common/tests/test_serialization.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import NamedTuple from ax.utils.common.serialization import named_tuple_to_dict diff --git a/ax/utils/common/tests/test_testutils.py b/ax/utils/common/tests/test_testutils.py index 95131a6ab70..4a2572b0af9 100644 --- a/ax/utils/common/tests/test_testutils.py +++ b/ax/utils/common/tests/test_testutils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import io import sys @@ -17,7 +19,7 @@ def _f(): raise e -F_FAILURE_LINENO = 17 # Line # for the error in `_f`. +F_FAILURE_LINENO = 19 # Line # for the error in `_f`. def _g() -> None: diff --git a/ax/utils/common/tests/test_typeutils.py b/ax/utils/common/tests/test_typeutils.py index fea6dd41157..6484a76969c 100644 --- a/ax/utils/common/tests/test_typeutils.py +++ b/ax/utils/common/tests/test_typeutils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.utils.common.testutils import TestCase diff --git a/ax/utils/common/timeutils.py b/ax/utils/common/timeutils.py index 1b0de3b566e..769ecef1555 100644 --- a/ax/utils/common/timeutils.py +++ b/ax/utils/common/timeutils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from datetime import datetime, timedelta from time import time from typing import Generator diff --git a/ax/utils/common/typeutils.py b/ax/utils/common/typeutils.py index 62fa75478b0..f563b7d0a79 100644 --- a/ax/utils/common/typeutils.py +++ b/ax/utils/common/typeutils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from inspect import signature from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar diff --git a/ax/utils/common/typeutils_torch.py b/ax/utils/common/typeutils_torch.py index 93c1503441e..9c933652a79 100644 --- a/ax/utils/common/typeutils_torch.py +++ b/ax/utils/common/typeutils_torch.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import json from typing import Union diff --git a/ax/utils/measurement/synthetic_functions.py b/ax/utils/measurement/synthetic_functions.py index 03730bc58c1..34142101047 100644 --- a/ax/utils/measurement/synthetic_functions.py +++ b/ax/utils/measurement/synthetic_functions.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from abc import ABC, abstractmethod from typing import Any, Callable, List, Optional, Tuple, Union diff --git a/ax/utils/measurement/tests/test_synthetic_functions.py b/ax/utils/measurement/tests/test_synthetic_functions.py index 07b09972677..83814c99d70 100644 --- a/ax/utils/measurement/tests/test_synthetic_functions.py +++ b/ax/utils/measurement/tests/test_synthetic_functions.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.utils.common.testutils import TestCase from ax.utils.measurement.synthetic_functions import ( diff --git a/ax/utils/notebook/plotting.py b/ax/utils/notebook/plotting.py index 0bccd2462dc..d6ee7ab3969 100644 --- a/ax/utils/notebook/plotting.py +++ b/ax/utils/notebook/plotting.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from ax.plot.base import AxPlotConfig, AxPlotTypes diff --git a/ax/utils/report/render.py b/ax/utils/report/render.py index 704a87c087c..e6ff9b8dbc1 100644 --- a/ax/utils/report/render.py +++ b/ax/utils/report/render.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os import pkgutil from typing import List, Optional diff --git a/ax/utils/report/tests/test_render.py b/ax/utils/report/tests/test_render.py index ed0261153aa..d3692753828 100644 --- a/ax/utils/report/tests/test_render.py +++ b/ax/utils/report/tests/test_render.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from ax.utils.common.testutils import TestCase from ax.utils.report.render import ( h2_html, diff --git a/ax/utils/sensitivity/derivative_gp.py b/ax/utils/sensitivity/derivative_gp.py index 199553d0984..207a9ee7065 100644 --- a/ax/utils/sensitivity/derivative_gp.py +++ b/ax/utils/sensitivity/derivative_gp.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math import torch diff --git a/ax/utils/sensitivity/derivative_measures.py b/ax/utils/sensitivity/derivative_measures.py index 83ecc97c1e0..b196ec75715 100644 --- a/ax/utils/sensitivity/derivative_measures.py +++ b/ax/utils/sensitivity/derivative_measures.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import Any, Callable, List, Optional, Union diff --git a/ax/utils/sensitivity/sobol_measures.py b/ax/utils/sensitivity/sobol_measures.py index 71c228d9c0c..d188cff6714 100644 --- a/ax/utils/sensitivity/sobol_measures.py +++ b/ax/utils/sensitivity/sobol_measures.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from copy import deepcopy from typing import Any, Callable, Dict, List, Optional, Union diff --git a/ax/utils/sensitivity/tests/test_sensitivity.py b/ax/utils/sensitivity/tests/test_sensitivity.py index ef0ff7514e3..06e9a04185f 100644 --- a/ax/utils/sensitivity/tests/test_sensitivity.py +++ b/ax/utils/sensitivity/tests/test_sensitivity.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import math from typing import cast diff --git a/ax/utils/stats/model_fit_stats.py b/ax/utils/stats/model_fit_stats.py index a0004391bcc..5b3e1043bd8 100644 --- a/ax/utils/stats/model_fit_stats.py +++ b/ax/utils/stats/model_fit_stats.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Dict, Mapping, Optional, Protocol import numpy as np diff --git a/ax/utils/stats/statstools.py b/ax/utils/stats/statstools.py index f50121a972c..e40c8866e7b 100644 --- a/ax/utils/stats/statstools.py +++ b/ax/utils/stats/statstools.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import List, Tuple, Union diff --git a/ax/utils/stats/tests/test_statstools.py b/ax/utils/stats/tests/test_statstools.py index 8e63089f655..ed3745a4bb4 100644 --- a/ax/utils/stats/tests/test_statstools.py +++ b/ax/utils/stats/tests/test_statstools.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from itertools import product import numpy as np diff --git a/ax/utils/testing/backend_scheduler.py b/ax/utils/testing/backend_scheduler.py index 617e3ea1171..28ba222a149 100644 --- a/ax/utils/testing/backend_scheduler.py +++ b/ax/utils/testing/backend_scheduler.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from dataclasses import replace as dataclass_replace diff --git a/ax/utils/testing/backend_simulator.py b/ax/utils/testing/backend_simulator.py index 07230ba3c50..b376803d662 100644 --- a/ax/utils/testing/backend_simulator.py +++ b/ax/utils/testing/backend_simulator.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import logging import random import time diff --git a/ax/utils/testing/benchmark_stubs.py b/ax/utils/testing/benchmark_stubs.py index 892b70fd889..32b9ce4d9e6 100644 --- a/ax/utils/testing/benchmark_stubs.py +++ b/ax/utils/testing/benchmark_stubs.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np from ax.benchmark.benchmark_method import BenchmarkMethod from ax.benchmark.benchmark_problem import ( diff --git a/ax/utils/testing/core_stubs.py b/ax/utils/testing/core_stubs.py index 792050509c3..9ee6d749809 100644 --- a/ax/utils/testing/core_stubs.py +++ b/ax/utils/testing/core_stubs.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from collections import OrderedDict from datetime import datetime, timedelta diff --git a/ax/utils/testing/metrics/backend_simulator_map.py b/ax/utils/testing/metrics/backend_simulator_map.py index e2e11174de4..7afe479fd5a 100644 --- a/ax/utils/testing/metrics/backend_simulator_map.py +++ b/ax/utils/testing/metrics/backend_simulator_map.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any, List from ax.core.base_trial import BaseTrial diff --git a/ax/utils/testing/metrics/branin_backend_map.py b/ax/utils/testing/metrics/branin_backend_map.py index 2ba182b9ab0..f887ebd078e 100644 --- a/ax/utils/testing/metrics/branin_backend_map.py +++ b/ax/utils/testing/metrics/branin_backend_map.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import List, Optional import numpy as np diff --git a/ax/utils/testing/mock.py b/ax/utils/testing/mock.py index 52bb04be751..f3c30ec7f36 100644 --- a/ax/utils/testing/mock.py +++ b/ax/utils/testing/mock.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from contextlib import contextmanager, ExitStack from functools import wraps from typing import Any, Callable, Dict, Generator, Optional diff --git a/ax/utils/testing/modeling_stubs.py b/ax/utils/testing/modeling_stubs.py index 94d7b68ccac..0d8df36c931 100644 --- a/ax/utils/testing/modeling_stubs.py +++ b/ax/utils/testing/modeling_stubs.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from logging import Logger from typing import Any, Dict, List, Optional, Type diff --git a/ax/utils/testing/test_init_files.py b/ax/utils/testing/test_init_files.py index 60d8cac3e51..d03351a7995 100644 --- a/ax/utils/testing/test_init_files.py +++ b/ax/utils/testing/test_init_files.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import os from glob import glob diff --git a/ax/utils/testing/tests/test_backend_simulator.py b/ax/utils/testing/tests/test_backend_simulator.py index 5fed5d59721..25ca436f084 100644 --- a/ax/utils/testing/tests/test_backend_simulator.py +++ b/ax/utils/testing/tests/test_backend_simulator.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from unittest.mock import Mock, patch from ax.core.base_trial import TrialStatus diff --git a/ax/utils/testing/tests/test_utils.py b/ax/utils/testing/tests/test_utils.py index e4906c8c808..9517f27f032 100644 --- a/ax/utils/testing/tests/test_utils.py +++ b/ax/utils/testing/tests/test_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + import numpy as np import torch from ax.utils.common.testutils import TestCase diff --git a/ax/utils/testing/torch_stubs.py b/ax/utils/testing/torch_stubs.py index 6c46c68fcd5..49bb353712e 100644 --- a/ax/utils/testing/torch_stubs.py +++ b/ax/utils/testing/torch_stubs.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple diff --git a/ax/utils/testing/utils.py b/ax/utils/testing/utils.py index 25a7b089071..21c99035bb5 100644 --- a/ax/utils/testing/utils.py +++ b/ax/utils/testing/utils.py @@ -3,6 +3,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from typing import Any import numpy as np diff --git a/ax/utils/tutorials/cnn_utils.py b/ax/utils/tutorials/cnn_utils.py index 927d92c6715..a4bbdc466f0 100644 --- a/ax/utils/tutorials/cnn_utils.py +++ b/ax/utils/tutorials/cnn_utils.py @@ -4,6 +4,8 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +# pyre-strict + from itertools import accumulate from typing import Dict, List, Optional, Tuple