forecasting-tools 0.2.89__tar.gz → 0.2.90__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/PKG-INFO +1 -1
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/general_llm.py +6 -21
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/.gitignore +2 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/__init__.py +18 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/_training_data.py +123 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/benchmark.ipynb +1352 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/calibration_adjuster.py +209 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/constant_shift_adjuster.py +63 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/decision_tree_adjuster.py +227 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/k_means_adjuster.py +266 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/logistic_recalibration_adjuster.py +132 -0
- forecasting_tools-0.2.90/forecasting_tools/calibration_adjustment/step_adjuster.py +183 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/congress_v2_page.py +0 -1
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/metaculus_client.py +10 -3
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/pyproject.toml +1 -1
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/LICENSE +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/README.md +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/ai_congress_v2/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/ai_congress_v2/congress_member_agent.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/ai_congress_v2/congress_orchestrator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/ai_congress_v2/data_models.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/ai_congress_v2/member_profiles.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/ai_congress_v2/tools.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/base_rates/base_rate_researcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/base_rates/deduplicator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/base_rates/estimator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/base_rates/niche_list_researcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/deprecated/configured_llms.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/deprecated/general_researcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/deprecated/question_generator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/deprecated/question_responder.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/deprecated/question_router.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/deprecated/research_coordinator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/minor_tools.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/other/data_analyzer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/other/hosted_file.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/generated_question.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/harmful_question_identifier.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/q3_q4_quarterly_questions.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/question_decomposer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/question_operationalizer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/simple_question.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/question_generators/topic_generator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/research/computer_use.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/research/find_a_dataset.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/research/key_factors_researcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/research/smart_searcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/agent_runner.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/data_models.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/effect_engine.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/industrial_basin.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/milbrook.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/simple_business.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/simple_dnd.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/simple_election.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/willowbrook.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/example_situations/z_broken_mafia.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/intervention_testing/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/intervention_testing/data_models.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/intervention_testing/forecast_resolver.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/intervention_testing/intervention_policy_agent.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/intervention_testing/intervention_runner.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/intervention_testing/intervention_storage.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/simulator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/agents_and_tools/situation_simulator/situation_generator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/agent_wrappers.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/ai_utils/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/ai_utils/openai_utils.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/ai_utils/response_types.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/README.md +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/claude35sonnet.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/deepseek_r1.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/gpt4o.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/gpt4ovision.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/gpto1.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/gpto1preview.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/metaculus4o.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/deprecated_model_classes/perplexity.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/exa_searcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/ai_model.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/combined_llm_archetype.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/incurs_cost.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/named_model.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/outputs_text.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/priced_per_request.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/request_limited_model.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/retryable_model.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/time_limited_model.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/token_limited_model.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/tokens_are_calculatable.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_interfaces/tokens_incur_cost.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/model_tracker.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/resource_managers/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/resource_managers/hard_limit_manager.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/resource_managers/monetary_cost_manager.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/resource_managers/refreshing_bucket_rate_limiter.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/bot_evaluator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/bot_optimizer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/control_prompt.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/customizable_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/prompt_data_models.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/prompt_optimizer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/auto_optimizers/question_plus_research.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/cp_benchmarking/benchmark_displayer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/cp_benchmarking/benchmark_for_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/cp_benchmarking/benchmarker.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/binary_report.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/coherence_link.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/conditional_models.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/conditional_report.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/data_organizer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/forecast_report.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/markdown_tree.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/multiple_choice_report.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/numeric_report.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/questions.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/timestamped_predictions.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/data_models/user_response.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/bot_lists.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q1_veritas_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q1t_w_convert_to_binary.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q1t_w_personas_and_exa.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q2t_w_decomposition.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q3t_w_asknews.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q3t_w_exa.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q3t_w_q4vbinary.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q4_veritas_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q4v_w_exa.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q4v_w_exa_and_dseekr1.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/experiments/q4v_w_exa_and_o1_preview.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/forecast_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/main_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/gpt_4_1_optimized_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/q1_template_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/q2_template_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/q3_template_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/q4_template_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/research_only_bot_2025_fall.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/template_bot_2025_fall.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/template_bot_2026_spring.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/official_bots/uniform_probability_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/forecast_bots/template_bot.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/Home.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/base_rate_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/benchmark_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/chat_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/csv_agent.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/estimator_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/forecaster_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/intervention_leaderboard_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/key_factors_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/niche_list_researcher_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/app_pages/simulator_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/base_rate_page_examples.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/congress_page_example.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/congress_v2_page_example.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/estimator_page_examples.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/forecast_page_examples.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/key_factors_page_examples.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/niche_list_page_examples.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/example_outputs/question_generator_page_examples.json +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/helpers/app_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/helpers/custom_auth.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/helpers/report_displayer.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/front_end/helpers/tool_page.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/asknews_cache.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/asknews_searcher.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/forecast_database_manager.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/metaculus_api.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/prediction_extractor.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/structure_output.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/helpers/works_cited_creator.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/__init__.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/async_batching.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/coda_utils.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/custom_logger.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/file_manipulation.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/jsonable.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/misc.py +0 -0
- {forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/util/stats.py +0 -0
{forecasting_tools-0.2.89 → forecasting_tools-0.2.90}/forecasting_tools/ai_models/general_llm.py
RENAMED
|
@@ -359,16 +359,15 @@ class GeneralLlm(
|
|
|
359
359
|
return typeguard.check_type(citations, list[str])
|
|
360
360
|
|
|
361
361
|
# OpenRouter returns Perplexity citations as url_citation annotations
|
|
362
|
-
# rather than in model_extra["citations"].
|
|
363
|
-
#
|
|
364
|
-
#
|
|
365
|
-
# We deduplicate to reconstruct the original indexed list where
|
|
366
|
-
# urls[i] corresponds to citation [i+1] in the text.
|
|
362
|
+
# rather than in model_extra["citations"]. URLs may be duplicated
|
|
363
|
+
# (e.g. once with titles, once without). We deduplicate while
|
|
364
|
+
# preserving first-seen order so urls[i] corresponds to [i+1].
|
|
367
365
|
message = choices[0].message
|
|
368
366
|
annotations = getattr(message, "annotations", None)
|
|
369
367
|
if not annotations:
|
|
370
368
|
return []
|
|
371
|
-
|
|
369
|
+
seen: set[str] = set()
|
|
370
|
+
unique_urls: list[str] = []
|
|
372
371
|
for annotation in annotations:
|
|
373
372
|
if not isinstance(annotation, dict):
|
|
374
373
|
continue
|
|
@@ -376,23 +375,9 @@ class GeneralLlm(
|
|
|
376
375
|
continue
|
|
377
376
|
url_info = annotation.get("url_citation", {})
|
|
378
377
|
url = url_info.get("url", "")
|
|
379
|
-
if url:
|
|
380
|
-
all_urls.append(url)
|
|
381
|
-
|
|
382
|
-
seen: set[str] = set()
|
|
383
|
-
unique_urls: list[str] = []
|
|
384
|
-
for url in all_urls:
|
|
385
|
-
if url not in seen:
|
|
378
|
+
if url and url not in seen:
|
|
386
379
|
seen.add(url)
|
|
387
380
|
unique_urls.append(url)
|
|
388
|
-
|
|
389
|
-
num_unique = len(unique_urls)
|
|
390
|
-
num_total = len(all_urls)
|
|
391
|
-
if num_total != num_unique and num_total != num_unique * 2:
|
|
392
|
-
raise ValueError(
|
|
393
|
-
f"Expected annotations to contain each URL once or twice, "
|
|
394
|
-
f"but got {num_total} total URLs and {num_unique} unique URLs"
|
|
395
|
-
)
|
|
396
381
|
return unique_urls
|
|
397
382
|
|
|
398
383
|
def _normalize_response(
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from forecasting_tools.calibration_adjustments.calibration_adjuster import (
|
|
2
|
+
CalibrationAdjuster as CalibrationAdjuster,
|
|
3
|
+
)
|
|
4
|
+
from forecasting_tools.calibration_adjustments.constant_shift_adjuster import (
|
|
5
|
+
ConstantShiftAdjuster as ConstantShiftAdjuster,
|
|
6
|
+
)
|
|
7
|
+
from forecasting_tools.calibration_adjustments.decision_tree_adjuster import (
|
|
8
|
+
DecisionTreeAdjuster as DecisionTreeAdjuster,
|
|
9
|
+
)
|
|
10
|
+
from forecasting_tools.calibration_adjustments.k_means_adjuster import (
|
|
11
|
+
KMeansAdjuster as KMeansAdjuster,
|
|
12
|
+
)
|
|
13
|
+
from forecasting_tools.calibration_adjustments.logistic_recalibration_adjuster import (
|
|
14
|
+
LogisticRecalibrationAdjuster as LogisticRecalibrationAdjuster,
|
|
15
|
+
)
|
|
16
|
+
from forecasting_tools.calibration_adjustments.step_adjuster import (
|
|
17
|
+
StepAdjuster as StepAdjuster,
|
|
18
|
+
)
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import logging
|
|
5
|
+
|
|
6
|
+
import numpy as np
|
|
7
|
+
import pandas as pd
|
|
8
|
+
|
|
9
|
+
logger = logging.getLogger(__name__)
|
|
10
|
+
|
|
11
|
+
_VALID_BINARY_RESOLUTIONS = {"yes", "no"}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def extract_bernoulli_observations(
|
|
15
|
+
forecasts: pd.DataFrame,
|
|
16
|
+
) -> tuple[np.ndarray, np.ndarray]:
|
|
17
|
+
"""Extract (prediction, outcome) pairs from a forecasts DataFrame.
|
|
18
|
+
|
|
19
|
+
Each binary forecast contributes one observation:
|
|
20
|
+
(probability_yes, 1.0 if resolution=='yes' else 0.0)
|
|
21
|
+
|
|
22
|
+
Each multiple-choice forecast contributes one observation per option:
|
|
23
|
+
(p_option_i, 1.0 if resolution==option_i else 0.0)
|
|
24
|
+
|
|
25
|
+
Rows that are not resolved binary or multiple-choice are skipped.
|
|
26
|
+
Malformed rows (missing probability, unparsable JSON, length
|
|
27
|
+
mismatches between options and probabilities) are also skipped.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
predictions: 1-D float array of predicted probabilities.
|
|
31
|
+
outcomes: 1-D float array of resolved outcomes (0.0 or 1.0).
|
|
32
|
+
|
|
33
|
+
Raises:
|
|
34
|
+
ValueError: if no usable observations are found.
|
|
35
|
+
"""
|
|
36
|
+
predictions: list[float] = []
|
|
37
|
+
outcomes: list[float] = []
|
|
38
|
+
|
|
39
|
+
for _, row in forecasts.iterrows():
|
|
40
|
+
q_type = row.get("type")
|
|
41
|
+
resolution = row.get("resolution")
|
|
42
|
+
|
|
43
|
+
if pd.isna(resolution) or resolution is None:
|
|
44
|
+
continue
|
|
45
|
+
|
|
46
|
+
if q_type == "binary":
|
|
47
|
+
_process_binary_row(row, resolution, predictions, outcomes)
|
|
48
|
+
elif q_type == "multiple_choice":
|
|
49
|
+
_process_mc_row(row, resolution, predictions, outcomes)
|
|
50
|
+
|
|
51
|
+
if not predictions:
|
|
52
|
+
raise ValueError(
|
|
53
|
+
"No usable resolved binary or multiple-choice rows in DataFrame"
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return np.array(predictions, dtype=np.float64), np.array(outcomes, dtype=np.float64)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _process_binary_row(
|
|
60
|
+
row: pd.Series,
|
|
61
|
+
resolution: str,
|
|
62
|
+
predictions: list[float],
|
|
63
|
+
outcomes: list[float],
|
|
64
|
+
) -> None:
|
|
65
|
+
if resolution not in _VALID_BINARY_RESOLUTIONS:
|
|
66
|
+
return
|
|
67
|
+
|
|
68
|
+
prob = row.get("probability_yes")
|
|
69
|
+
if prob is None or (isinstance(prob, float) and np.isnan(prob)):
|
|
70
|
+
return
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
prob = float(prob)
|
|
74
|
+
except (ValueError, TypeError):
|
|
75
|
+
return
|
|
76
|
+
|
|
77
|
+
if not 0.0 <= prob <= 1.0:
|
|
78
|
+
return
|
|
79
|
+
|
|
80
|
+
predictions.append(prob)
|
|
81
|
+
outcomes.append(1.0 if resolution == "yes" else 0.0)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def _process_mc_row(
|
|
85
|
+
row: pd.Series,
|
|
86
|
+
resolution: str,
|
|
87
|
+
predictions: list[float],
|
|
88
|
+
outcomes: list[float],
|
|
89
|
+
) -> None:
|
|
90
|
+
raw_probs = row.get("probability_yes_per_category")
|
|
91
|
+
raw_options = row.get("options")
|
|
92
|
+
|
|
93
|
+
if pd.isna(raw_probs) or pd.isna(raw_options):
|
|
94
|
+
return
|
|
95
|
+
|
|
96
|
+
try:
|
|
97
|
+
probs = json.loads(raw_probs) if isinstance(raw_probs, str) else raw_probs
|
|
98
|
+
options = (
|
|
99
|
+
json.loads(raw_options) if isinstance(raw_options, str) else raw_options
|
|
100
|
+
)
|
|
101
|
+
except (json.JSONDecodeError, TypeError):
|
|
102
|
+
return
|
|
103
|
+
|
|
104
|
+
if not isinstance(probs, list) or not isinstance(options, list):
|
|
105
|
+
return
|
|
106
|
+
if len(probs) != len(options):
|
|
107
|
+
logger.warning(
|
|
108
|
+
"Skipping MC row: options length (%d) != probabilities length (%d)",
|
|
109
|
+
len(options),
|
|
110
|
+
len(probs),
|
|
111
|
+
)
|
|
112
|
+
return
|
|
113
|
+
|
|
114
|
+
for option, prob in zip(options, probs):
|
|
115
|
+
try:
|
|
116
|
+
prob = float(prob)
|
|
117
|
+
except (ValueError, TypeError):
|
|
118
|
+
continue
|
|
119
|
+
if not 0.0 <= prob <= 1.0:
|
|
120
|
+
continue
|
|
121
|
+
|
|
122
|
+
predictions.append(prob)
|
|
123
|
+
outcomes.append(1.0 if resolution == option else 0.0)
|