itp-interface 1.0.0__py3-none-any.whl
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.
- itp_interface/__init__.py +0 -0
- itp_interface/agent/__init__.py +0 -0
- itp_interface/agent/simple_proof_agent.py +100 -0
- itp_interface/coq_ser_api/__init__.py +165 -0
- itp_interface/coq_ser_api/contexts.py +283 -0
- itp_interface/coq_ser_api/coq_agent.py +459 -0
- itp_interface/coq_ser_api/coq_backend.py +135 -0
- itp_interface/coq_ser_api/coq_util.py +839 -0
- itp_interface/coq_ser_api/example.py +67 -0
- itp_interface/coq_ser_api/lsp_backend.py +375 -0
- itp_interface/coq_ser_api/py.typed +0 -0
- itp_interface/coq_ser_api/serapi_backend.py +841 -0
- itp_interface/coq_ser_api/util.py +145 -0
- itp_interface/coq_ser_api_old/__init__.py +2583 -0
- itp_interface/coq_ser_api_old/contexts.py +172 -0
- itp_interface/coq_ser_api_old/util.py +146 -0
- itp_interface/lean_server/__init__.py +0 -0
- itp_interface/lean_server/commands.py +484 -0
- itp_interface/lean_server/lean3_search_tool.py +358 -0
- itp_interface/lean_server/lean4_repl_interface.py +151 -0
- itp_interface/lean_server/lean4_utils.py +255 -0
- itp_interface/lean_server/lean_cmd_server.py +111 -0
- itp_interface/lean_server/lean_context.py +60 -0
- itp_interface/lean_server/lean_sync_server.py +174 -0
- itp_interface/lean_server/lean_utils.py +199 -0
- itp_interface/lean_server/py.typed +1 -0
- itp_interface/main/__init__.py +0 -0
- itp_interface/main/config/afp_data_gen.yaml +14 -0
- itp_interface/main/config/benchmark/CompCert.yaml +366 -0
- itp_interface/main/config/benchmark/GeoCoq.yaml +930 -0
- itp_interface/main/config/benchmark/UniMath.yaml +2690 -0
- itp_interface/main/config/benchmark/afp_isabelle.yaml +29200 -0
- itp_interface/main/config/benchmark/agent_proverbot_hard.yaml +247 -0
- itp_interface/main/config/benchmark/category-theory.yaml +470 -0
- itp_interface/main/config/benchmark/compcert_118_subset.yaml +148 -0
- itp_interface/main/config/benchmark/compcert_benchmark.yaml +36 -0
- itp_interface/main/config/benchmark/compcert_benchmark_hard.yaml +498 -0
- itp_interface/main/config/benchmark/compcert_benchmark_hard_1.yaml +55 -0
- itp_interface/main/config/benchmark/compcert_benchmark_hard_2.yaml +24 -0
- itp_interface/main/config/benchmark/compcert_benchmark_hard_3.yaml +95 -0
- itp_interface/main/config/benchmark/compcert_benchmark_hard_7_per_cent.yaml +78 -0
- itp_interface/main/config/benchmark/compcert_benchmark_test.yaml +38 -0
- itp_interface/main/config/benchmark/compcert_benchmark_train.yaml +340 -0
- itp_interface/main/config/benchmark/leandojo_novel_premises_test.yaml +2908 -0
- itp_interface/main/config/benchmark/leandojo_novel_premises_train.yaml +98645 -0
- itp_interface/main/config/benchmark/leandojo_novel_premises_val.yaml +2912 -0
- itp_interface/main/config/benchmark/leandojo_random.yaml +2889 -0
- itp_interface/main/config/benchmark/leandojo_random_test.yaml +2421 -0
- itp_interface/main/config/benchmark/leandojo_random_train.yaml +62729 -0
- itp_interface/main/config/benchmark/leandojo_random_val.yaml +2504 -0
- itp_interface/main/config/benchmark/math-comp.yaml +200 -0
- itp_interface/main/config/benchmark/miniF2F_test.yaml +12 -0
- itp_interface/main/config/benchmark/miniF2F_test_aime.yaml +27 -0
- itp_interface/main/config/benchmark/miniF2F_test_algebra.yaml +30 -0
- itp_interface/main/config/benchmark/miniF2F_test_amc12.yaml +57 -0
- itp_interface/main/config/benchmark/miniF2F_test_few_shot_hard.yaml +231 -0
- itp_interface/main/config/benchmark/miniF2F_test_imo.yaml +32 -0
- itp_interface/main/config/benchmark/miniF2F_test_induction.yaml +20 -0
- itp_interface/main/config/benchmark/miniF2F_test_mathd_algebra.yaml +82 -0
- itp_interface/main/config/benchmark/miniF2F_test_mathd_algebra_hard.yaml +72 -0
- itp_interface/main/config/benchmark/miniF2F_test_mathd_numbertheory.yaml +72 -0
- itp_interface/main/config/benchmark/miniF2F_test_numbertheory.yaml +20 -0
- itp_interface/main/config/benchmark/minicompcert_benchmark_1.yaml +14 -0
- itp_interface/main/config/benchmark/proverbot_hard.yaml +104 -0
- itp_interface/main/config/benchmark/re_prover.yaml +66 -0
- itp_interface/main/config/benchmark/re_prover_hard.yaml +41 -0
- itp_interface/main/config/benchmark/re_prover_very_hard.yaml +22 -0
- itp_interface/main/config/benchmark/reprover_with_retrieval.yaml +73 -0
- itp_interface/main/config/benchmark/reprover_with_retrieval_hard.yaml +30 -0
- itp_interface/main/config/benchmark/reprover_with_retrieval_neg.yaml +195 -0
- itp_interface/main/config/benchmark/simple_benchmark_1.yaml +24 -0
- itp_interface/main/config/benchmark/simple_benchmark_8.yaml +50 -0
- itp_interface/main/config/benchmark/simple_benchmark_9.yaml +65 -0
- itp_interface/main/config/benchmark/simple_benchmark_isabelle.yaml +18 -0
- itp_interface/main/config/benchmark/simple_benchmark_lean.yaml +12 -0
- itp_interface/main/config/benchmark/simple_benchmark_lean_training_data.yaml +12 -0
- itp_interface/main/config/benchmark/simple_rl_benchmark_lean.yaml +14 -0
- itp_interface/main/config/benchmark/stack_machine.yaml +13 -0
- itp_interface/main/config/benchmark/stack_machine_hard.yaml +15 -0
- itp_interface/main/config/category_theory_data_gen.yaml +14 -0
- itp_interface/main/config/category_theory_data_gen_random.yaml +16 -0
- itp_interface/main/config/compcert_data_gen_test.yaml +10 -0
- itp_interface/main/config/compcert_data_gen_train.yaml +7 -0
- itp_interface/main/config/env_settings/bm25_retrieval.yaml +2 -0
- itp_interface/main/config/env_settings/bm25_retrieval_no_dfns.yaml +2 -0
- itp_interface/main/config/env_settings/bm25_retrieval_only_local_no_dfns.yaml +2 -0
- itp_interface/main/config/env_settings/bm25_retrieval_with_print.yaml +2 -0
- itp_interface/main/config/env_settings/bm25_retrieval_with_print_only_local.yaml +2 -0
- itp_interface/main/config/env_settings/bm25_retrieval_with_print_only_local_no_dfns.yaml +2 -0
- itp_interface/main/config/env_settings/no_retrieval.yaml +2 -0
- itp_interface/main/config/experiments.yaml +12 -0
- itp_interface/main/config/geo_coq_data_gen.yaml +14 -0
- itp_interface/main/config/geo_coq_data_gen_random.yaml +16 -0
- itp_interface/main/config/leandojo_random_data_gen.yaml +16 -0
- itp_interface/main/config/math_comp_data_gen.yaml +14 -0
- itp_interface/main/config/math_comp_data_gen_random.yaml +16 -0
- itp_interface/main/config/mathlib_data_gen.yaml +14 -0
- itp_interface/main/config/repo/coq_repos.yaml +191 -0
- itp_interface/main/config/run_settings/default_coq_data_generation_transforms.yaml +24 -0
- itp_interface/main/config/run_settings/default_isabelle_data_generation_transforms.yaml +24 -0
- itp_interface/main/config/run_settings/default_lean4_data_generation_transforms.yaml +24 -0
- itp_interface/main/config/run_settings/default_lean_data_generation_transforms.yaml +24 -0
- itp_interface/main/config/simple_coq_data_gen.yaml +12 -0
- itp_interface/main/config/simple_coq_data_gen_random.yaml +17 -0
- itp_interface/main/config/simple_lean_data_gen.yaml +12 -0
- itp_interface/main/config/simple_rl_lean_data_gen.yaml +12 -0
- itp_interface/main/config/uni_math_data_gen.yaml +14 -0
- itp_interface/main/config.py +192 -0
- itp_interface/main/extract_benchmark_dataset.py +106 -0
- itp_interface/main/filter_dataset.py +107 -0
- itp_interface/main/install.py +92 -0
- itp_interface/main/merge_dataset.py +96 -0
- itp_interface/main/run_tool.py +444 -0
- itp_interface/pisa/.git +1 -0
- itp_interface/pisa/.gitignore +125 -0
- itp_interface/pisa/.idea/.gitignore +8 -0
- itp_interface/pisa/.idea/ClojureProjectResolveSettings.xml +6 -0
- itp_interface/pisa/.idea/codeStyles/Project.xml +7 -0
- itp_interface/pisa/.idea/codeStyles/codeStyleConfig.xml +5 -0
- itp_interface/pisa/.idea/inspectionProfiles/Project_Default.xml +16 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_android_annotations_4_1_1_4_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_api_grpc_proto_google_common_protos_1_17_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_code_findbugs_jsr305_3_0_2_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_code_gson_gson_2_8_6_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_errorprone_error_prone_annotations_2_3_4_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_guava_failureaccess_1_0_1_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_guava_guava_30_0_jre_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava_jar.xml +9 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_j2objc_j2objc_annotations_1_3_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_protobuf_protobuf_java_3_12_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_google_protobuf_protobuf_java_util_3_12_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_lihaoyi_fastparse_2_13_2_3_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_lihaoyi_geny_2_13_0_6_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_lihaoyi_sourcecode_2_13_0_2_1_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_thesamet_scalapb_lenses_2_13_0_10_9_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_thesamet_scalapb_scalapb_runtime_2_13_0_10_9_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_thesamet_scalapb_scalapb_runtime_grpc_2_13_0_10_9_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_thesamet_scalapb_zio_grpc_zio_grpc_core_2_13_0_4_2_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__com_thoughtworks_paranamer_paranamer_2_8_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__commons_io_commons_io_2_8_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__de_unruh_java_patterns_0_1_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__de_unruh_scala_isabelle_2_13_master_SNAPSHOT_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__dev_zio_izumi_reflect_2_13_1_0_0_M9_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__dev_zio_izumi_reflect_thirdparty_boopickle_shaded_2_13_1_0_0_M9_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__dev_zio_zio_2_13_1_0_3_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__dev_zio_zio_stacktracer_2_13_1_0_3_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__dev_zio_zio_streams_2_13_1_0_3_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_api_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_context_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_core_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_netty_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_protobuf_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_protobuf_lite_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_services_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_grpc_grpc_stub_1_34_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_buffer_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_codec_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_codec_http2_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_codec_http_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_codec_socks_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_common_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_handler_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_handler_proxy_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_resolver_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_netty_netty_transport_4_1_51_Final_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__io_perfmark_perfmark_api_0_19_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__net_java_dev_jna_jna_5_3_1_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__net_liftweb_lift_json_2_13_3_4_3_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_apache_commons_commons_lang3_3_11_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_apache_commons_commons_text_1_9_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_checkerframework_checker_qual_3_5_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_codehaus_mojo_animal_sniffer_annotations_1_18_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_jetbrains_annotations_20_1_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_jline_jline_3_16_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_log4s_log4s_2_13_1_9_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scala_lang_modules_scala_collection_compat_2_13_2_1_6_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scala_lang_modules_scala_xml_2_13_1_3_0_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scala_lang_scala_compiler_2_13_4_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scala_lang_scala_library_2_13_4_jar.xml +23 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scala_lang_scala_reflect_2_13_4_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scala_lang_scalap_2_13_4_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_scalaz_scalaz_core_2_13_7_3_2_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_slf4j_slf4j_api_1_7_30_jar.xml +13 -0
- itp_interface/pisa/.idea/libraries/sbt__org_slf4j_slf4j_simple_1_7_30_jar.xml +13 -0
- itp_interface/pisa/.idea/misc.xml +7 -0
- itp_interface/pisa/.idea/modules/PISA-build.iml +127 -0
- itp_interface/pisa/.idea/modules/PISA.iml +94 -0
- itp_interface/pisa/.idea/modules.xml +9 -0
- itp_interface/pisa/.idea/other.xml +6 -0
- itp_interface/pisa/.idea/sbt.xml +20 -0
- itp_interface/pisa/.idea/scala_compiler.xml +6 -0
- itp_interface/pisa/.idea/uiDesigner.xml +124 -0
- itp_interface/pisa/.idea/vcs.xml +6 -0
- itp_interface/pisa/.scalafmt.conf +2 -0
- itp_interface/pisa/LICENSE +29 -0
- itp_interface/pisa/README.md +262 -0
- itp_interface/pisa/build.sbt +49 -0
- itp_interface/pisa/build.sh +26 -0
- itp_interface/pisa/command_generation/close_gaps.py +44 -0
- itp_interface/pisa/command_generation/conjecture_normal_order.py +62 -0
- itp_interface/pisa/command_generation/conjecturer_command_generator.py +36 -0
- itp_interface/pisa/command_generation/create_dirs.py +11 -0
- itp_interface/pisa/command_generation/find_std.py +67 -0
- itp_interface/pisa/command_generation/generate_build_commands_afp.py +15 -0
- itp_interface/pisa/command_generation/generate_build_commands_std.py +15 -0
- itp_interface/pisa/command_generation/generate_commands_afp.py +103 -0
- itp_interface/pisa/command_generation/generate_commands_mini.py +73 -0
- itp_interface/pisa/command_generation/generate_commands_std.py +69 -0
- itp_interface/pisa/command_generation/generate_hammer_extraction_text.py +5 -0
- itp_interface/pisa/command_generation/hammer_command_generator.py +40 -0
- itp_interface/pisa/command_generation/hp_search_command_generator.py +63 -0
- itp_interface/pisa/command_generation/oracle_command_generator.py +56 -0
- itp_interface/pisa/command_generation/search_command_generator.py +69 -0
- itp_interface/pisa/command_generation/summarise_problem_names.py +45 -0
- itp_interface/pisa/command_generation/tpu_hp_search.py +75 -0
- itp_interface/pisa/docker/Dockerfile +34 -0
- itp_interface/pisa/docker/docker_tutorial.md +64 -0
- itp_interface/pisa/eval_setup/copy_isabelle.py +42 -0
- itp_interface/pisa/eval_setup/copy_pisa_jars.py +18 -0
- itp_interface/pisa/mesh_transformer_utils/tokenization.py +86 -0
- itp_interface/pisa/project/build.properties +1 -0
- itp_interface/pisa/project/plugins.sbt +5 -0
- itp_interface/pisa/requirements.txt +4 -0
- itp_interface/pisa/scripts/extract_last_k_steps.py +28 -0
- itp_interface/pisa/scripts/extract_proof_corpus.py +26 -0
- itp_interface/pisa/scripts/gather_hammer_results.py +27 -0
- itp_interface/pisa/scripts/length_in_char_stats.py +20 -0
- itp_interface/pisa/scripts/mix.py +127 -0
- itp_interface/pisa/scripts/results_stat.py +52 -0
- itp_interface/pisa/scripts/test_array_job.sh +34 -0
- itp_interface/pisa/setup.sh +25 -0
- itp_interface/pisa/src/main/protobuf/server.proto +60 -0
- itp_interface/pisa/src/main/python/.idea/.gitignore +8 -0
- itp_interface/pisa/src/main/python/.idea/inspectionProfiles/Project_Default.xml +18 -0
- itp_interface/pisa/src/main/python/.idea/inspectionProfiles/profiles_settings.xml +6 -0
- itp_interface/pisa/src/main/python/.idea/misc.xml +4 -0
- itp_interface/pisa/src/main/python/.idea/modules.xml +8 -0
- itp_interface/pisa/src/main/python/.idea/python.iml +12 -0
- itp_interface/pisa/src/main/python/.idea/vcs.xml +6 -0
- itp_interface/pisa/src/main/python/conjecturing_parsing/conjecturer_postprocessing.py +59 -0
- itp_interface/pisa/src/main/python/data_extraction/extract_data.py +184 -0
- itp_interface/pisa/src/main/python/data_extraction/find_premises.py +221 -0
- itp_interface/pisa/src/main/python/data_extraction/process_data.py +129 -0
- itp_interface/pisa/src/main/python/legacy/PisaFlexibleClient.py +167 -0
- itp_interface/pisa/src/main/python/legacy/autof_test.py +74 -0
- itp_interface/pisa/src/main/python/legacy/cmd_client.py +23 -0
- itp_interface/pisa/src/main/python/legacy/convert_scala_dump_to_test_name_jsons.py +14 -0
- itp_interface/pisa/src/main/python/legacy/create_data_txt.py +72 -0
- itp_interface/pisa/src/main/python/legacy/create_finetune_tfrecords.py +311 -0
- itp_interface/pisa/src/main/python/legacy/demo.py +49 -0
- itp_interface/pisa/src/main/python/legacy/evaluate.py +108 -0
- itp_interface/pisa/src/main/python/legacy/extract_first_step.py +25 -0
- itp_interface/pisa/src/main/python/legacy/get_global_facts.py +35 -0
- itp_interface/pisa/src/main/python/legacy/mix_data.py +19 -0
- itp_interface/pisa/src/main/python/legacy/one_stage_extraction.py +111 -0
- itp_interface/pisa/src/main/python/legacy/prepare_episodic_transitions.py +137 -0
- itp_interface/pisa/src/main/python/legacy/prepare_translation_pairs.py +277 -0
- itp_interface/pisa/src/main/python/pisa_client.py +322 -0
- itp_interface/pisa/src/main/python/server_pb2.py +394 -0
- itp_interface/pisa/src/main/python/server_pb2_grpc.py +230 -0
- itp_interface/pisa/src/main/python/test_client.py +17 -0
- itp_interface/pisa/src/main/python/test_client2.py +79 -0
- itp_interface/pisa/src/main/python/utils/filters.py +59 -0
- itp_interface/pisa/src/main/python/utils/pisa_server_control.py +29 -0
- itp_interface/pisa/src/main/scala/pisa/agent/CheckSyntax.scala +257 -0
- itp_interface/pisa/src/main/scala/pisa/agent/DepThms.scala +29 -0
- itp_interface/pisa/src/main/scala/pisa/agent/PisaStat.scala +46 -0
- itp_interface/pisa/src/main/scala/pisa/agent/RefactorTest.scala +40 -0
- itp_interface/pisa/src/main/scala/pisa/agent/RepHammer.scala +95 -0
- itp_interface/pisa/src/main/scala/pisa/server/HammFacts.scala +63 -0
- itp_interface/pisa/src/main/scala/pisa/server/PisaOS.scala +881 -0
- itp_interface/pisa/src/main/scala/pisa/server/PisaOneStage.scala +540 -0
- itp_interface/pisa/src/main/scala/pisa/server/PisaOneStageServers.scala +1048 -0
- itp_interface/pisa/src/main/scala/pisa/utils/TheoryManager.scala +95 -0
- itp_interface/pisa/src/test/python/analyse_debug.py +33 -0
- itp_interface/pisa/src/test/python/extract_test_seq2seq.py +53 -0
- itp_interface/pisa/src/test/python/extract_test_theorem_ground_truth_indices.py +31 -0
- itp_interface/pisa/src/test/python/proof_originality.py +24 -0
- itp_interface/pisa/src/test/python/test_command_generator.py +25 -0
- itp_interface/pisa/src/test/python/test_model_sequence_accuracy.py +70 -0
- itp_interface/pisa/src/test/scala/pisa/Easy.scala +26 -0
- itp_interface/pisa/src/test/scala/pisa/TestCurl.scala +82 -0
- itp_interface/pisa/src/test/scala/pisa/TestIsa.scala +27 -0
- itp_interface/pisa/test.sh +19 -0
- itp_interface/pisa/universal_test_theorems.tar.gz +0 -0
- itp_interface/repo/build.py +78 -0
- itp_interface/repo/clone.py +79 -0
- itp_interface/repo/dataset_discovery.py +99 -0
- itp_interface/retrieval/__init__.py +0 -0
- itp_interface/retrieval/abstraction.py +35 -0
- itp_interface/retrieval/coq_bm25_reranker.py +153 -0
- itp_interface/retrieval/isabelle_bm25_reranker.py +86 -0
- itp_interface/retrieval/lean3_bm25_reranker.py +86 -0
- itp_interface/rl/__init__.py +0 -0
- itp_interface/rl/abstraction.py +168 -0
- itp_interface/rl/proof_action.py +172 -0
- itp_interface/rl/proof_state.py +149 -0
- itp_interface/rl/proof_tree.py +109 -0
- itp_interface/rl/simpl_proof_env_pool.py +16 -0
- itp_interface/rl/simple_proof_env.py +713 -0
- itp_interface/rl/simple_proof_env_pool.py +591 -0
- itp_interface/scripts/setup.sh +228 -0
- itp_interface/tools/__init__.py +0 -0
- itp_interface/tools/basic_utils.py +172 -0
- itp_interface/tools/bin_packing.py +61 -0
- itp_interface/tools/cache.py +93 -0
- itp_interface/tools/coq_build_spec.py +31 -0
- itp_interface/tools/coq_build_tool.py +319 -0
- itp_interface/tools/coq_context_helper.py +354 -0
- itp_interface/tools/coq_executor.py +508 -0
- itp_interface/tools/coq_local_data_generation_transform.py +158 -0
- itp_interface/tools/coq_parse_utils.py +154 -0
- itp_interface/tools/coq_raw_proofs.py +193 -0
- itp_interface/tools/coq_theorem_proof_pair_generation_transform.py +146 -0
- itp_interface/tools/coq_training_data_generator.py +76 -0
- itp_interface/tools/dynamic_coq_proof_exec.py +220 -0
- itp_interface/tools/dynamic_isabelle_proof_exec.py +229 -0
- itp_interface/tools/dynamic_lean4_proof_exec.py +236 -0
- itp_interface/tools/dynamic_lean_proof_exec.py +228 -0
- itp_interface/tools/isabelle_context_helper.py +66 -0
- itp_interface/tools/isabelle_executor.py +862 -0
- itp_interface/tools/isabelle_local_data_generation_transform.py +149 -0
- itp_interface/tools/isabelle_parse_utils.py +131 -0
- itp_interface/tools/isabelle_server.py +106 -0
- itp_interface/tools/lean4_context_helper.py +72 -0
- itp_interface/tools/lean4_local_data_generation_transform.py +122 -0
- itp_interface/tools/lean4_sync_executor.py +1193 -0
- itp_interface/tools/lean_cmd_executor.py +804 -0
- itp_interface/tools/lean_context_helper.py +327 -0
- itp_interface/tools/lean_dojo_data_generation_transform.py +206 -0
- itp_interface/tools/lean_executor.py +687 -0
- itp_interface/tools/lean_local_data_generation_transform.py +136 -0
- itp_interface/tools/lean_parse_utils.py +32 -0
- itp_interface/tools/log_utils.py +20 -0
- itp_interface/tools/proof_exec_callback.py +76 -0
- itp_interface/tools/ray_utils.py +265 -0
- itp_interface/tools/repl/.git +1 -0
- itp_interface/tools/repl/.github/workflows/ci.yml +24 -0
- itp_interface/tools/repl/.gitignore +7 -0
- itp_interface/tools/repl/.vscode/copyright.code-snippets +13 -0
- itp_interface/tools/repl/.vscode/extensions.json +13 -0
- itp_interface/tools/repl/.vscode/module-docstring.code-snippets +35 -0
- itp_interface/tools/repl/.vscode/settings.json +11 -0
- itp_interface/tools/repl/README.md +174 -0
- itp_interface/tools/repl/REPL/Frontend.lean +47 -0
- itp_interface/tools/repl/REPL/JSON.lean +186 -0
- itp_interface/tools/repl/REPL/Lean/ContextInfo.lean +9 -0
- itp_interface/tools/repl/REPL/Lean/Environment.lean +31 -0
- itp_interface/tools/repl/REPL/Lean/InfoTree/ToJson.lean +114 -0
- itp_interface/tools/repl/REPL/Lean/InfoTree.lean +272 -0
- itp_interface/tools/repl/REPL/Main.lean +323 -0
- itp_interface/tools/repl/REPL/Snapshots.lean +306 -0
- itp_interface/tools/repl/REPL/Util/Path.lean +36 -0
- itp_interface/tools/repl/REPL/Util/Pickle.lean +44 -0
- itp_interface/tools/repl/REPL.lean +4 -0
- itp_interface/tools/repl/lake-manifest.json +5 -0
- itp_interface/tools/repl/lakefile.lean +15 -0
- itp_interface/tools/repl/lean-toolchain +1 -0
- itp_interface/tools/repl/test/Mathlib/.gitignore +5 -0
- itp_interface/tools/repl/test/Mathlib/H20231110.sh +2 -0
- itp_interface/tools/repl/test/Mathlib/ReplMathlibTests.lean +1 -0
- itp_interface/tools/repl/test/Mathlib/lake-manifest.json +68 -0
- itp_interface/tools/repl/test/Mathlib/lakefile.lean +11 -0
- itp_interface/tools/repl/test/Mathlib/lean-toolchain +1 -0
- itp_interface/tools/repl/test/Mathlib/test/20240209.expected.out +20 -0
- itp_interface/tools/repl/test/Mathlib/test/20240209.in +3 -0
- itp_interface/tools/repl/test/Mathlib/test/20240209.lean +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231020.expected.out +8 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231020.in +8 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231020.lean +22 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231110.expected.out +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231110.in +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231115.expected.out +19 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231115.in +5 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231115_2.expected.out +18 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231115_2.in +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231115_3.expected.out +10 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231115_3.in +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231214.in +9 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231214.lean +30 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231215.expected.out +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231215.in +4 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231215_2.expected.out +14 -0
- itp_interface/tools/repl/test/Mathlib/test/H20231215_2.in +3 -0
- itp_interface/tools/repl/test/Mathlib/test/exact.expected.out +37 -0
- itp_interface/tools/repl/test/Mathlib/test/exact.in +10 -0
- itp_interface/tools/repl/test/Mathlib/test/import_Mathlib.lean +1 -0
- itp_interface/tools/repl/test/Mathlib/test/induction.expected.out +29 -0
- itp_interface/tools/repl/test/Mathlib/test/induction.in +10 -0
- itp_interface/tools/repl/test/Mathlib/test/induction.lean +6 -0
- itp_interface/tools/repl/test/Mathlib/test/on_goal.expected.out +22 -0
- itp_interface/tools/repl/test/Mathlib/test/on_goal.in +5 -0
- itp_interface/tools/repl/test/Mathlib/test/pickle.expected.out +16 -0
- itp_interface/tools/repl/test/Mathlib/test/pickle.in +6 -0
- itp_interface/tools/repl/test/Mathlib/test/pickle_2.expected.out +4 -0
- itp_interface/tools/repl/test/Mathlib/test/pickle_2.in +4 -0
- itp_interface/tools/repl/test/Mathlib/test.sh +41 -0
- itp_interface/tools/repl/test/all_tactics.expected.out +13 -0
- itp_interface/tools/repl/test/all_tactics.in +1 -0
- itp_interface/tools/repl/test/by_cases.expected.out +25 -0
- itp_interface/tools/repl/test/by_cases.in +8 -0
- itp_interface/tools/repl/test/by_cases.lean +4 -0
- itp_interface/tools/repl/test/calc.expected.out +32 -0
- itp_interface/tools/repl/test/calc.in +1 -0
- itp_interface/tools/repl/test/def_eval.expected.out +9 -0
- itp_interface/tools/repl/test/def_eval.in +3 -0
- itp_interface/tools/repl/test/enableInitializersExecution.expected.out +2 -0
- itp_interface/tools/repl/test/enableInitializersExecution.in +1 -0
- itp_interface/tools/repl/test/file.expected.out +8 -0
- itp_interface/tools/repl/test/file.in +1 -0
- itp_interface/tools/repl/test/file.lean +5 -0
- itp_interface/tools/repl/test/have_by_sorry.expected.out +28 -0
- itp_interface/tools/repl/test/have_by_sorry.in +6 -0
- itp_interface/tools/repl/test/import_lean.in +1 -0
- itp_interface/tools/repl/test/incomplete.expected.out +18 -0
- itp_interface/tools/repl/test/incomplete.in +3 -0
- itp_interface/tools/repl/test/incomplete.lean +0 -0
- itp_interface/tools/repl/test/infotree.expected.out +20 -0
- itp_interface/tools/repl/test/infotree.in +2 -0
- itp_interface/tools/repl/test/invalid_tactic.expected.out +20 -0
- itp_interface/tools/repl/test/invalid_tactic.in +3 -0
- itp_interface/tools/repl/test/name_generator.expected.out +53 -0
- itp_interface/tools/repl/test/name_generator.in +18 -0
- itp_interface/tools/repl/test/no_goal_sorry.expected.out +11 -0
- itp_interface/tools/repl/test/no_goal_sorry.in +1 -0
- itp_interface/tools/repl/test/no_goal_sorry_2.expected.out +12 -0
- itp_interface/tools/repl/test/no_goal_sorry_2.in +1 -0
- itp_interface/tools/repl/test/options.expected.out +17 -0
- itp_interface/tools/repl/test/options.in +6 -0
- itp_interface/tools/repl/test/pickle_environment.expected.out +8 -0
- itp_interface/tools/repl/test/pickle_environment.in +7 -0
- itp_interface/tools/repl/test/pickle_environment_with_imports.expected.out +10 -0
- itp_interface/tools/repl/test/pickle_environment_with_imports.in +9 -0
- itp_interface/tools/repl/test/pickle_open.expected.out +8 -0
- itp_interface/tools/repl/test/pickle_open.in +7 -0
- itp_interface/tools/repl/test/pickle_open_2.expected.out +4 -0
- itp_interface/tools/repl/test/pickle_open_2.in +3 -0
- itp_interface/tools/repl/test/pickle_open_scoped.expected.out +18 -0
- itp_interface/tools/repl/test/pickle_open_scoped.in +8 -0
- itp_interface/tools/repl/test/pickle_open_scoped_2.expected.out +14 -0
- itp_interface/tools/repl/test/pickle_open_scoped_2.in +3 -0
- itp_interface/tools/repl/test/pickle_proof_state_1.expected.out +26 -0
- itp_interface/tools/repl/test/pickle_proof_state_1.in +15 -0
- itp_interface/tools/repl/test/pickle_proof_state_2.expected.out +4 -0
- itp_interface/tools/repl/test/pickle_proof_state_2.in +3 -0
- itp_interface/tools/repl/test/pickle_proof_state_env.expected.out +26 -0
- itp_interface/tools/repl/test/pickle_proof_state_env.in +15 -0
- itp_interface/tools/repl/test/pickle_scoped_notation.in +16 -0
- itp_interface/tools/repl/test/pickle_scoped_notation_2.in +3 -0
- itp_interface/tools/repl/test/proof_step.expected.out +18 -0
- itp_interface/tools/repl/test/proof_step.in +7 -0
- itp_interface/tools/repl/test/readme.expected.out +16 -0
- itp_interface/tools/repl/test/readme.in +5 -0
- itp_interface/tools/repl/test/sorry_hypotheses.expected.out +16 -0
- itp_interface/tools/repl/test/sorry_hypotheses.in +4 -0
- itp_interface/tools/repl/test/synthesize_placeholder.expected.out +7 -0
- itp_interface/tools/repl/test/synthesize_placeholder.in +1 -0
- itp_interface/tools/repl/test/tactic_mode_sorry.expected.out +14 -0
- itp_interface/tools/repl/test/tactic_mode_sorry.in +3 -0
- itp_interface/tools/repl/test/tactic_sorry.expected.out +12 -0
- itp_interface/tools/repl/test/tactic_sorry.in +1 -0
- itp_interface/tools/repl/test/term_sorry.expected.out +12 -0
- itp_interface/tools/repl/test/term_sorry.in +1 -0
- itp_interface/tools/repl/test/trace_simp.expected.out +41 -0
- itp_interface/tools/repl/test/trace_simp.in +15 -0
- itp_interface/tools/repl/test/unfinished_tactic_block.expected.out +11 -0
- itp_interface/tools/repl/test/unfinished_tactic_block.in +1 -0
- itp_interface/tools/repl/test/unknown_environment.expected.out +2 -0
- itp_interface/tools/repl/test/unknown_environment.in +1 -0
- itp_interface/tools/repl/test/unknown_proof_state.expected.out +14 -0
- itp_interface/tools/repl/test/unknown_proof_state.in +3 -0
- itp_interface/tools/repl/test/unknown_tactic.expected.out +14 -0
- itp_interface/tools/repl/test/unknown_tactic.in +3 -0
- itp_interface/tools/repl/test/variables.expected.out +26 -0
- itp_interface/tools/repl/test/variables.in +5 -0
- itp_interface/tools/repl/test.sh +43 -0
- itp_interface/tools/run_data_generation_transforms.py +350 -0
- itp_interface/tools/theorem_details.py +25 -0
- itp_interface/tools/training_data.py +358 -0
- itp_interface/tools/training_data_format.py +599 -0
- itp_interface-1.0.0.dist-info/METADATA +78 -0
- itp_interface-1.0.0.dist-info/RECORD +485 -0
- itp_interface-1.0.0.dist-info/WHEEL +4 -0
- itp_interface-1.0.0.dist-info/entry_points.txt +3 -0
- itp_interface-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
root_dir = f"{__file__.split('itp_interface')[0]}"
|
|
5
|
+
if root_dir not in sys.path:
|
|
6
|
+
sys.path.append(root_dir)
|
|
7
|
+
import hydra
|
|
8
|
+
import logging
|
|
9
|
+
import os
|
|
10
|
+
import time
|
|
11
|
+
import shutil
|
|
12
|
+
import ray
|
|
13
|
+
import typing
|
|
14
|
+
import numpy as np
|
|
15
|
+
import yaml
|
|
16
|
+
import uuid
|
|
17
|
+
from itp_interface.tools.ray_utils import RayResourcePoolActor, TimedRayExec, RayUtils
|
|
18
|
+
from itp_interface.rl.proof_action import ProofAction
|
|
19
|
+
from itp_interface.tools.isabelle_server import IsabelleServer
|
|
20
|
+
from itp_interface.rl.simple_proof_env import ProofEnvReRankStrategy
|
|
21
|
+
from itp_interface.tools.proof_exec_callback import ProofExecutorCallback
|
|
22
|
+
from itp_interface.tools.coq_local_data_generation_transform import LocalDataGenerationTransform as CoqLocalDataGenerationTransform
|
|
23
|
+
from itp_interface.tools.lean_local_data_generation_transform import LocalDataGenerationTransform as LeanLocalDataGenerationTransform
|
|
24
|
+
from itp_interface.tools.lean4_local_data_generation_transform import Local4DataGenerationTransform
|
|
25
|
+
from itp_interface.tools.isabelle_local_data_generation_transform import LocalDataGenerationTransform as IsabelleLocalDataGenerationTransform
|
|
26
|
+
from itp_interface.tools.run_data_generation_transforms import RunDataGenerationTransforms
|
|
27
|
+
from itp_interface.tools.log_utils import setup_logger
|
|
28
|
+
from itp_interface.main.config import Experiments, EvalRunCheckpointInfo, TransformType, parse_config
|
|
29
|
+
from itp_interface.tools.isabelle_executor import IsabelleExecutor
|
|
30
|
+
from itp_interface.tools.dynamic_coq_proof_exec import DynamicProofExecutor as DynamicCoqProofExecutor
|
|
31
|
+
from itp_interface.tools.dynamic_lean_proof_exec import DynamicProofExecutor as DynamicLeanProofExecutor
|
|
32
|
+
from itp_interface.tools.dynamic_lean4_proof_exec import DynamicProofExecutor as DynamicLean4ProofExecutor
|
|
33
|
+
from itp_interface.tools.dynamic_isabelle_proof_exec import DynamicProofExecutor as DynamicIsabelleProofExecutor
|
|
34
|
+
from itp_interface.tools.coq_executor import get_all_lemmas_in_file as get_all_lemmas_coq
|
|
35
|
+
from itp_interface.tools.lean4_sync_executor import get_all_theorems_in_file as get_all_lemmas_lean4, get_fully_qualified_theorem_name as get_fully_qualified_theorem_name_lean4, get_theorem_name_resembling as get_theorem_name_resembling_lean4
|
|
36
|
+
from itp_interface.tools.isabelle_executor import get_all_lemmas_in_file as get_all_lemmas_isabelle
|
|
37
|
+
from itp_interface.tools.bin_packing import best_fit_packing
|
|
38
|
+
|
|
39
|
+
ray_resource_pool = None
|
|
40
|
+
|
|
41
|
+
@ray.remote(num_cpus=0.5)
|
|
42
|
+
def get_all_lemmas(
|
|
43
|
+
project_folder,
|
|
44
|
+
file_path,
|
|
45
|
+
language,
|
|
46
|
+
use_hammer,
|
|
47
|
+
timeout_in_secs,
|
|
48
|
+
use_human_readable_proof_context,
|
|
49
|
+
suppress_error_log,
|
|
50
|
+
always_use_retrieval,
|
|
51
|
+
setup_cmds: typing.List[str],
|
|
52
|
+
log_file: str,
|
|
53
|
+
port: typing.Optional[int] = None):
|
|
54
|
+
global ray_resource_pool
|
|
55
|
+
log_id = str(uuid.uuid4())
|
|
56
|
+
logger = setup_logger(f'get_all_lemmas_{log_id}', log_file, logging.INFO, '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
57
|
+
port = None
|
|
58
|
+
port_pool = None
|
|
59
|
+
if language == ProofAction.Language.ISABELLE:
|
|
60
|
+
assert ray_resource_pool is not None, "ray_resource_pool is required for Isabelle"
|
|
61
|
+
port_pool = ray_resource_pool
|
|
62
|
+
port = ray.get(port_pool.wait_and_acquire.remote(1))[0]
|
|
63
|
+
logger.info(f"Using PISA server on port {port} for {file_path}")
|
|
64
|
+
proof_exec_callback = ProofExecutorCallback(
|
|
65
|
+
project_folder=project_folder,
|
|
66
|
+
file_path=file_path,
|
|
67
|
+
language=language,
|
|
68
|
+
use_hammer=use_hammer,
|
|
69
|
+
timeout_in_secs=timeout_in_secs,
|
|
70
|
+
use_human_readable_proof_context=use_human_readable_proof_context,
|
|
71
|
+
suppress_error_log=suppress_error_log,
|
|
72
|
+
always_use_retrieval=always_use_retrieval,
|
|
73
|
+
logger=logger,
|
|
74
|
+
setup_cmds=setup_cmds,
|
|
75
|
+
port=port
|
|
76
|
+
)
|
|
77
|
+
lemmas_to_prove = []
|
|
78
|
+
try:
|
|
79
|
+
with proof_exec_callback.get_proof_executor() as main_executor:
|
|
80
|
+
if language == ProofAction.Language.COQ:
|
|
81
|
+
assert isinstance(main_executor, DynamicCoqProofExecutor)
|
|
82
|
+
lemmas_to_prove = get_all_lemmas_coq(main_executor, logger)
|
|
83
|
+
elif language == ProofAction.Language.LEAN:
|
|
84
|
+
assert isinstance(main_executor, DynamicLeanProofExecutor)
|
|
85
|
+
main_executor.run_all_without_exec()
|
|
86
|
+
lemmas_to_prove = main_executor.find_all_theorems_names()
|
|
87
|
+
elif language == ProofAction.Language.LEAN4:
|
|
88
|
+
assert isinstance(main_executor, DynamicLean4ProofExecutor)
|
|
89
|
+
theorem_details = get_all_lemmas_lean4(file_path)
|
|
90
|
+
lemmas_to_prove = [get_fully_qualified_theorem_name_lean4(theorem) for theorem in theorem_details]
|
|
91
|
+
elif language == ProofAction.Language.ISABELLE:
|
|
92
|
+
assert port is not None, "Port is required for Isabelle"
|
|
93
|
+
assert port_pool is not None, "Port pool is required for Isabelle"
|
|
94
|
+
try:
|
|
95
|
+
lemmas_to_prove = get_all_lemmas_isabelle(main_executor, logger)
|
|
96
|
+
finally:
|
|
97
|
+
ray.get(port_pool.release.remote([port]))
|
|
98
|
+
logger.info(f"Released PISA server on port {port}")
|
|
99
|
+
else:
|
|
100
|
+
raise ValueError(f"Unexpected language: {language}")
|
|
101
|
+
except Exception as e:
|
|
102
|
+
logger.error(f"Error occurred while getting lemmas from {file_path}")
|
|
103
|
+
logger.exception(e)
|
|
104
|
+
logger.info(f"Discovered {len(lemmas_to_prove)} lemmas")
|
|
105
|
+
return lemmas_to_prove
|
|
106
|
+
|
|
107
|
+
def partition_data(project_to_theorems: typing.Dict[str, typing.Dict[str, typing.List[str]]], partition: typing.List[float], logger: logging.Logger, seed: int = 0xf00, random_split: bool = False):
|
|
108
|
+
train_project_to_theorems = {}
|
|
109
|
+
eval_project_to_theorems = {}
|
|
110
|
+
test_project_to_theorems = {}
|
|
111
|
+
prob_train = partition[0]
|
|
112
|
+
prob_eval = partition[1]
|
|
113
|
+
prob_test = partition[2]
|
|
114
|
+
assert prob_train + prob_eval + prob_test == 1.0, f"Invalid partition: {partition}"
|
|
115
|
+
# Go over each project and classify into three categories
|
|
116
|
+
proj_file_to_theorems_named_tuple = typing.NamedTuple("proj_file_to_theorems", [("project", str), ("file", str), ("theorems", typing.List[str])])
|
|
117
|
+
proj_file_thms = []
|
|
118
|
+
for project, file_to_theorems in project_to_theorems.items():
|
|
119
|
+
for file, theorems in file_to_theorems.items():
|
|
120
|
+
# Generate a random number between 0 and 1
|
|
121
|
+
proj_file_thms.append(proj_file_to_theorems_named_tuple(project, file, theorems))
|
|
122
|
+
total_thm_cnt = sum([len(p.theorems) for p in proj_file_thms])
|
|
123
|
+
max_train_cnt = int(total_thm_cnt * prob_train)
|
|
124
|
+
max_eval_cnt = int(total_thm_cnt * prob_eval)
|
|
125
|
+
max_test_cnt = int(total_thm_cnt * prob_test)
|
|
126
|
+
if max_train_cnt + max_eval_cnt + max_test_cnt == 0:
|
|
127
|
+
# Make the highest probability set non-empty
|
|
128
|
+
if prob_train > prob_eval and prob_train > prob_test:
|
|
129
|
+
max_train_cnt = 1
|
|
130
|
+
elif prob_eval > prob_train and prob_eval > prob_test:
|
|
131
|
+
max_eval_cnt = 1
|
|
132
|
+
else:
|
|
133
|
+
max_test_cnt = 1
|
|
134
|
+
item_sizes = [len(p.theorems) for p in proj_file_thms]
|
|
135
|
+
logger.info(f"Total number of files: {len(item_sizes)}")
|
|
136
|
+
logger.info(f"Total number of theorems: {sum(item_sizes)}")
|
|
137
|
+
logger.info(f"Distribution:\n {item_sizes}")
|
|
138
|
+
if not random_split:
|
|
139
|
+
logger.info("Will perform file based partitioning")
|
|
140
|
+
bins = best_fit_packing([max_train_cnt, max_eval_cnt, max_test_cnt], item_sizes)
|
|
141
|
+
bin_item_sizes = [[item_sizes[i] for i in b] for b in bins]
|
|
142
|
+
bin_sizes = [sum(b) for b in bin_item_sizes]
|
|
143
|
+
logger.info(f"Expected bin sizes: {max_train_cnt}, {max_eval_cnt}, {max_test_cnt}")
|
|
144
|
+
logger.info(f"Actual bin sizes: {bin_sizes}")
|
|
145
|
+
logger.info(f"Bin distribution:\n {bin_item_sizes}")
|
|
146
|
+
for idx, _bin in enumerate(bins):
|
|
147
|
+
if idx == 0:
|
|
148
|
+
partition_project_to_theorems = train_project_to_theorems
|
|
149
|
+
elif idx == 1:
|
|
150
|
+
partition_project_to_theorems = eval_project_to_theorems
|
|
151
|
+
else:
|
|
152
|
+
partition_project_to_theorems = test_project_to_theorems
|
|
153
|
+
for item_idx in _bin:
|
|
154
|
+
proj_file_thms_tuple = proj_file_thms[item_idx]
|
|
155
|
+
if proj_file_thms_tuple.project not in partition_project_to_theorems:
|
|
156
|
+
partition_project_to_theorems[proj_file_thms_tuple.project] = {}
|
|
157
|
+
if proj_file_thms_tuple.file not in partition_project_to_theorems[proj_file_thms_tuple.project]:
|
|
158
|
+
partition_project_to_theorems[proj_file_thms_tuple.project][proj_file_thms_tuple.file] = []
|
|
159
|
+
partition_project_to_theorems[proj_file_thms_tuple.project][proj_file_thms_tuple.file].extend(proj_file_thms_tuple.theorems)
|
|
160
|
+
else:
|
|
161
|
+
logger.info("Will perform random partitioning")
|
|
162
|
+
logger.info(f"Seed: {seed}")
|
|
163
|
+
logger.info(f"Total number of theorems: {total_thm_cnt}")
|
|
164
|
+
logger.info(f"Expected division Train: {max_train_cnt}, Eval: {max_eval_cnt}, Test: {max_test_cnt}")
|
|
165
|
+
# Convert proj_file_thms to a flat list with one theorem per entry
|
|
166
|
+
proj_file_thms_flat = [proj_file_to_theorems_named_tuple(p.project, p.file, [thm]) for p in proj_file_thms for thm in p.theorems]
|
|
167
|
+
np.random.seed(seed)
|
|
168
|
+
np.random.shuffle(proj_file_thms_flat)
|
|
169
|
+
train_cnt = 0
|
|
170
|
+
eval_cnt = 0
|
|
171
|
+
test_cnt = 0
|
|
172
|
+
for proj_file_thms_tuple in proj_file_thms_flat:
|
|
173
|
+
if train_cnt < max_train_cnt:
|
|
174
|
+
partition_project_to_theorems = train_project_to_theorems
|
|
175
|
+
train_cnt += 1
|
|
176
|
+
elif eval_cnt < max_eval_cnt:
|
|
177
|
+
partition_project_to_theorems = eval_project_to_theorems
|
|
178
|
+
eval_cnt += 1
|
|
179
|
+
else:
|
|
180
|
+
partition_project_to_theorems = test_project_to_theorems
|
|
181
|
+
test_cnt += 1
|
|
182
|
+
if proj_file_thms_tuple.project not in partition_project_to_theorems:
|
|
183
|
+
partition_project_to_theorems[proj_file_thms_tuple.project] = {}
|
|
184
|
+
if proj_file_thms_tuple.file not in partition_project_to_theorems[proj_file_thms_tuple.project]:
|
|
185
|
+
partition_project_to_theorems[proj_file_thms_tuple.project][proj_file_thms_tuple.file] = []
|
|
186
|
+
partition_project_to_theorems[proj_file_thms_tuple.project][proj_file_thms_tuple.file].extend(proj_file_thms_tuple.theorems)
|
|
187
|
+
logger.info(f"Actual division Train: {train_cnt}, Eval: {eval_cnt}, Test: {test_cnt}")
|
|
188
|
+
return train_project_to_theorems, eval_project_to_theorems, test_project_to_theorems
|
|
189
|
+
|
|
190
|
+
def create_yaml(project_to_theorems, name, language, output_file):
|
|
191
|
+
data = {
|
|
192
|
+
"name": name,
|
|
193
|
+
"num_files": 0,
|
|
194
|
+
"language": str(language),
|
|
195
|
+
"few_shot_data_path_for_retrieval": None,
|
|
196
|
+
"few_shot_metadata_filename_for_retrieval": None,
|
|
197
|
+
"dfs_data_path_for_retrieval": None,
|
|
198
|
+
"dfs_metadata_filename_for_retrieval": "local.meta.json",
|
|
199
|
+
"theorem_cnt": 0,
|
|
200
|
+
"datasets": []
|
|
201
|
+
}
|
|
202
|
+
for project_root, file_dict in project_to_theorems.items():
|
|
203
|
+
dataset = {"project": project_root, "files": []}
|
|
204
|
+
for file_path, theorems in file_dict.items():
|
|
205
|
+
data["num_files"] += 1
|
|
206
|
+
data["theorem_cnt"] += len(theorems)
|
|
207
|
+
dataset["files"].append({"path": file_path, "theorems": theorems})
|
|
208
|
+
data["datasets"].append(dataset)
|
|
209
|
+
|
|
210
|
+
with open(output_file, 'w') as yaml_file:
|
|
211
|
+
yaml.dump(data, yaml_file, sort_keys=False)
|
|
212
|
+
|
|
213
|
+
def run_data_generation_pipeline(experiment: Experiments, log_dir: str, checkpoint_info: EvalRunCheckpointInfo, logger: logging.Logger = None):
|
|
214
|
+
global ray_resource_pool
|
|
215
|
+
pisa_servers = []
|
|
216
|
+
resources = []
|
|
217
|
+
if experiment.benchmark.language == ProofAction.Language.ISABELLE:
|
|
218
|
+
# Only one server supported for now
|
|
219
|
+
assert experiment.run_settings.pool_size <= 8, "At most 8 servers are supported"
|
|
220
|
+
ports = [10000 + i * 1000 for i in range(experiment.run_settings.pool_size)]
|
|
221
|
+
# Check if environment variable PISA_PORT is set
|
|
222
|
+
# if "PISA_PORT" not in os.environ:
|
|
223
|
+
# os.environ["PISA_PORT"] = "13000"
|
|
224
|
+
# if IsabelleExecutor.check_server_running(logger):
|
|
225
|
+
# raise Exception(
|
|
226
|
+
# "PISA_PORT environment variable is not set but the PISA service is already running on default port 17000. " +
|
|
227
|
+
# "Please set the PISA_PORT environment variable to the port on which the PISA service is running.")
|
|
228
|
+
pisa_server_remotes = []
|
|
229
|
+
for port in ports:
|
|
230
|
+
logger.info(f"Starting PISA server on port {port}")
|
|
231
|
+
logfile = os.path.join(log_dir, f"PISA-{port}.log")
|
|
232
|
+
pisa_server_actor = IsabelleServer.remote(logfile, port)
|
|
233
|
+
pisa_servers.append(pisa_server_actor)
|
|
234
|
+
pisa_server_start_remote = pisa_server_actor.start_server.remote()
|
|
235
|
+
pisa_server_remotes.append(pisa_server_start_remote)
|
|
236
|
+
resources.append(port)
|
|
237
|
+
ray.get(pisa_server_remotes)
|
|
238
|
+
logger.info(f"Started PISA servers on ports\n {resources}")
|
|
239
|
+
try:
|
|
240
|
+
transforms = []
|
|
241
|
+
str_time = time.strftime("%Y%m%d-%H%M%S")
|
|
242
|
+
clone_dir = os.path.join(experiment.run_settings.output_dir, "clone{}".format(str_time))
|
|
243
|
+
if experiment.run_settings.transform_type == TransformType.LOCAL:
|
|
244
|
+
if experiment.benchmark.language == ProofAction.Language.LEAN:
|
|
245
|
+
transform = LeanLocalDataGenerationTransform(
|
|
246
|
+
experiment.run_settings.dep_depth,
|
|
247
|
+
max_search_results=experiment.run_settings.max_search_results,
|
|
248
|
+
buffer_size=experiment.run_settings.buffer_size,
|
|
249
|
+
logger=logger)
|
|
250
|
+
os.makedirs(clone_dir, exist_ok=True)
|
|
251
|
+
elif experiment.benchmark.language == ProofAction.Language.LEAN4:
|
|
252
|
+
transform = Local4DataGenerationTransform(
|
|
253
|
+
experiment.run_settings.dep_depth,
|
|
254
|
+
max_search_results=experiment.run_settings.max_search_results,
|
|
255
|
+
buffer_size=experiment.run_settings.buffer_size,
|
|
256
|
+
logger=logger)
|
|
257
|
+
clone_dir = None
|
|
258
|
+
elif experiment.benchmark.language == ProofAction.Language.COQ:
|
|
259
|
+
only_proof_state = experiment.env_settings.retrieval_strategy == ProofEnvReRankStrategy.NO_RE_RANK
|
|
260
|
+
transform = CoqLocalDataGenerationTransform(
|
|
261
|
+
experiment.run_settings.dep_depth,
|
|
262
|
+
max_search_results=experiment.run_settings.max_search_results,
|
|
263
|
+
buffer_size=experiment.run_settings.buffer_size,
|
|
264
|
+
logger=logger,
|
|
265
|
+
no_dfns=only_proof_state,
|
|
266
|
+
no_thms=only_proof_state)
|
|
267
|
+
clone_dir = None
|
|
268
|
+
elif experiment.benchmark.language == ProofAction.Language.ISABELLE:
|
|
269
|
+
ray_resource_pool = RayResourcePoolActor.remote(resources)
|
|
270
|
+
transform = IsabelleLocalDataGenerationTransform(
|
|
271
|
+
experiment.run_settings.dep_depth,
|
|
272
|
+
max_search_results=experiment.run_settings.max_search_results,
|
|
273
|
+
buffer_size=experiment.run_settings.buffer_size,
|
|
274
|
+
logger=logger,
|
|
275
|
+
resource_pool=ray_resource_pool
|
|
276
|
+
)
|
|
277
|
+
clone_dir = None
|
|
278
|
+
# os.makedirs(clone_dir, exist_ok=True)
|
|
279
|
+
else:
|
|
280
|
+
raise ValueError(f"Unexpected language: {experiment.benchmark.language}")
|
|
281
|
+
transforms.append(transform)
|
|
282
|
+
else:
|
|
283
|
+
raise ValueError(f"Unexpected transform_type: {experiment.run_settings.transform_type}")
|
|
284
|
+
# Find all the lemmas to prove
|
|
285
|
+
project_to_theorems = {}
|
|
286
|
+
other_args = {}
|
|
287
|
+
lemma_discovery_remotes = []
|
|
288
|
+
for idx, dataset in enumerate(experiment.benchmark.datasets):
|
|
289
|
+
if dataset.project not in project_to_theorems:
|
|
290
|
+
project_to_theorems[dataset.project] = {}
|
|
291
|
+
other_args[dataset.project] = {}
|
|
292
|
+
file_to_theorems = project_to_theorems[dataset.project]
|
|
293
|
+
file_args = other_args[dataset.project]
|
|
294
|
+
for file_idx, file in enumerate(dataset.files):
|
|
295
|
+
if file.path not in file_to_theorems:
|
|
296
|
+
file_to_theorems[file.path] = []
|
|
297
|
+
file_args[file.path] = {}
|
|
298
|
+
if isinstance(file.theorems, list):
|
|
299
|
+
# if language is Lean4 then change the theorem names to fully qualified names
|
|
300
|
+
if experiment.benchmark.language == ProofAction.Language.LEAN4:
|
|
301
|
+
full_file_path = os.path.join(dataset.project, file.path)
|
|
302
|
+
theorems_in_file = [get_theorem_name_resembling_lean4(full_file_path, theorem, use_cache=True) for theorem in file.theorems]
|
|
303
|
+
else:
|
|
304
|
+
theorems_in_file = file.theorems
|
|
305
|
+
file_to_theorems[file.path].extend(theorems_in_file)
|
|
306
|
+
else:
|
|
307
|
+
discover_log_file = os.path.join(log_dir, f"discover{idx}_{file_idx}.log")
|
|
308
|
+
timed_exec = TimedRayExec.remote(get_all_lemmas, kwargs=dict(
|
|
309
|
+
project_folder=dataset.project,
|
|
310
|
+
file_path=os.path.join(dataset.project, file.path),
|
|
311
|
+
language=experiment.benchmark.language,
|
|
312
|
+
use_hammer=False,
|
|
313
|
+
timeout_in_secs=experiment.run_settings.timeout_in_secs,
|
|
314
|
+
use_human_readable_proof_context=experiment.run_settings.use_human_readable,
|
|
315
|
+
suppress_error_log=True,
|
|
316
|
+
always_use_retrieval=False,
|
|
317
|
+
setup_cmds=experiment.benchmark.setup_cmds,
|
|
318
|
+
log_file=discover_log_file))
|
|
319
|
+
timeout_in_secs = experiment.run_settings.timeout_in_secs * 100
|
|
320
|
+
timed_exec_remote = timed_exec.execute_with_timeout.remote(timeout=timeout_in_secs)
|
|
321
|
+
lemma_discovery_remotes.append(timed_exec_remote)
|
|
322
|
+
pass
|
|
323
|
+
if len(lemma_discovery_remotes) > 0:
|
|
324
|
+
lemmas = ray.get(lemma_discovery_remotes)
|
|
325
|
+
_idx = 0
|
|
326
|
+
for idx, dataset in enumerate(experiment.benchmark.datasets):
|
|
327
|
+
for file_idx, file in enumerate(dataset.files):
|
|
328
|
+
if lemmas[_idx] is not None:
|
|
329
|
+
project_to_theorems[dataset.project][file.path].extend(lemmas[_idx])
|
|
330
|
+
else:
|
|
331
|
+
logger.error(f"Discovering lemmas failed because of timeout for {dataset.project}/{file.path}")
|
|
332
|
+
_idx += 1
|
|
333
|
+
data_transform = RunDataGenerationTransforms(transforms,
|
|
334
|
+
log_dir,
|
|
335
|
+
save_intermidiat_transforms=len(transforms) > 1 or \
|
|
336
|
+
experiment.run_settings.save_intermidiate_transforms,
|
|
337
|
+
logger=logger)
|
|
338
|
+
|
|
339
|
+
partition_map = partition_data(project_to_theorems, experiment.run_settings.train_eval_test_split, logger, experiment.run_settings.random_seed, experiment.run_settings.random_split)
|
|
340
|
+
for idx, dataset_partition in enumerate(['train', 'eval', 'test']):
|
|
341
|
+
new_output_dir = os.path.join(experiment.run_settings.output_dir, str_time, dataset_partition)
|
|
342
|
+
partition_project_to_theorems = partition_map[idx]
|
|
343
|
+
os.makedirs(new_output_dir, exist_ok=True)
|
|
344
|
+
logger.info(f"==============================>Running {dataset_partition} partition<==============================")
|
|
345
|
+
# dump a yaml file with the partition
|
|
346
|
+
partition_name = f"{experiment.benchmark.name}_{dataset_partition}"
|
|
347
|
+
yaml_file = os.path.join(new_output_dir, f"{partition_name}.yaml")
|
|
348
|
+
create_yaml(partition_project_to_theorems, partition_name, experiment.benchmark.language, yaml_file)
|
|
349
|
+
if len(partition_project_to_theorems) == 0:
|
|
350
|
+
logger.info(f"==============================>No projects to process for {dataset_partition}<==============================")
|
|
351
|
+
continue
|
|
352
|
+
projects = list(partition_project_to_theorems.keys())
|
|
353
|
+
if experiment.run_settings.transform_type == TransformType.LOCAL:
|
|
354
|
+
# clone the root directory
|
|
355
|
+
if clone_dir is not None:
|
|
356
|
+
for project in projects:
|
|
357
|
+
logger.info(f"==============================>Cloning root directory {project} to {clone_dir}<==============================")
|
|
358
|
+
temp_clone_dir = os.path.join(clone_dir, project)
|
|
359
|
+
shutil.copytree(project, temp_clone_dir, dirs_exist_ok=True)
|
|
360
|
+
# change the root_dir in files to clone_dir
|
|
361
|
+
partition_project_to_theorems[temp_clone_dir] = partition_project_to_theorems[project]
|
|
362
|
+
del partition_project_to_theorems[project]
|
|
363
|
+
logger.info(f"==============================>Cloned root directory {project} to {clone_dir}<==============================")
|
|
364
|
+
try:
|
|
365
|
+
data_transform.run_all_local_transforms(
|
|
366
|
+
experiment.run_settings.pool_size,
|
|
367
|
+
partition_project_to_theorems,
|
|
368
|
+
use_human_readable=experiment.run_settings.use_human_readable,
|
|
369
|
+
new_output_dir=new_output_dir,
|
|
370
|
+
log_error=True,
|
|
371
|
+
other_args=other_args)
|
|
372
|
+
finally:
|
|
373
|
+
if clone_dir is not None:
|
|
374
|
+
for project in projects:
|
|
375
|
+
temp_clone_dir = os.path.join(clone_dir, project)
|
|
376
|
+
logger.info(f"==============================>Removing cloned root directory {temp_clone_dir}<==============================")
|
|
377
|
+
shutil.rmtree(temp_clone_dir, ignore_errors=True)
|
|
378
|
+
logger.info(f"==============================>Removed cloned root directory {temp_clone_dir}<==============================")
|
|
379
|
+
shutil.rmtree(clone_dir, ignore_errors=True)
|
|
380
|
+
except Exception as e:
|
|
381
|
+
logger.exception(e)
|
|
382
|
+
raise e
|
|
383
|
+
finally:
|
|
384
|
+
if experiment.benchmark.language == ProofAction.Language.ISABELLE:
|
|
385
|
+
pisa_server_stop_remotes = []
|
|
386
|
+
for port, actor in zip(resources, pisa_servers):
|
|
387
|
+
logger.info(f"Stopping PISA server on port: {port}")
|
|
388
|
+
pisa_server_stop_remotes.append(actor.stop_server.remote())
|
|
389
|
+
ray.get(pisa_server_stop_remotes)
|
|
390
|
+
logger.info(f"Stopped PISA servers on ports\n {resources}")
|
|
391
|
+
|
|
392
|
+
def run_data_generation(experiment: Experiments, log_dir: str, logger: logging.Logger = None):
|
|
393
|
+
trial_cnt = 1
|
|
394
|
+
run_settings = experiment.run_settings
|
|
395
|
+
benchmark = experiment.benchmark
|
|
396
|
+
checkpoint_dir = experiment.run_settings.checkpoint_dir
|
|
397
|
+
run_settings.checkpoint_dir = os.path.join(checkpoint_dir, benchmark.name, run_settings.name)
|
|
398
|
+
os.makedirs(run_settings.checkpoint_dir, exist_ok=True)
|
|
399
|
+
# Load the checkpoint file if it exists
|
|
400
|
+
checkpoint_file = os.path.join(run_settings.checkpoint_dir, "checkpoint_info.json")
|
|
401
|
+
if os.path.exists(checkpoint_file):
|
|
402
|
+
with open(checkpoint_file, "r") as f:
|
|
403
|
+
checkpoint_info: EvalRunCheckpointInfo = EvalRunCheckpointInfo.from_json(f.read())
|
|
404
|
+
checkpoint_info.logging_dirs.append(log_dir)
|
|
405
|
+
else:
|
|
406
|
+
checkpoint_info = EvalRunCheckpointInfo(
|
|
407
|
+
checkpoint_file=checkpoint_file,
|
|
408
|
+
proof_dump_dir='',
|
|
409
|
+
logging_dirs=[log_dir],
|
|
410
|
+
theorem_maps={})
|
|
411
|
+
while trial_cnt > 0:
|
|
412
|
+
try:
|
|
413
|
+
logger = logger or logging.getLogger(__name__)
|
|
414
|
+
logger.info(f"Running experiment: \n{experiment.to_json(indent=4)}")
|
|
415
|
+
run_data_generation_pipeline(experiment, log_dir, checkpoint_info, logger=logger)
|
|
416
|
+
trial_cnt = 0
|
|
417
|
+
except:
|
|
418
|
+
trial_cnt -= 1
|
|
419
|
+
logger.exception(f"Exception occurred. Retrying {trial_cnt} more times.")
|
|
420
|
+
time.sleep(10)
|
|
421
|
+
logger.info(f"Finished running experiment: \n{experiment.to_json(indent=4)}")
|
|
422
|
+
|
|
423
|
+
@hydra.main(config_path="config", config_name="experiments", version_base="1.2")
|
|
424
|
+
def main(cfg):
|
|
425
|
+
os.environ["PYTHONPATH"] = f"{root_dir}:{os.environ.get('PYTHONPATH', '')}"
|
|
426
|
+
# RayUtils.init_ray(num_of_cpus=cfg.run_settings.pool_size, object_store_memory_in_gb=100)
|
|
427
|
+
experiment = parse_config(cfg)
|
|
428
|
+
os.chdir(root_dir)
|
|
429
|
+
# top_level_dir = os.path.dirname(root_dir)
|
|
430
|
+
# top_level_dir = os.path.dirname(top_level_dir)
|
|
431
|
+
# os.chdir(top_level_dir)
|
|
432
|
+
log_dir = ".log/data_generation/benchmark/{}/{}".format(experiment.benchmark.name, time.strftime("%Y%m%d-%H%M%S"))
|
|
433
|
+
os.makedirs(log_dir, exist_ok=True)
|
|
434
|
+
log_path = os.path.join(log_dir, "eval.log")
|
|
435
|
+
logger = setup_logger(__name__, log_path, logging.INFO, '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
436
|
+
logger.info(f"Pid: {os.getpid()}")
|
|
437
|
+
logger.info(f"Running Experiment: {experiment.to_json(indent=4)}")
|
|
438
|
+
run_data_generation(experiment, log_dir, logger=logger)
|
|
439
|
+
pass
|
|
440
|
+
|
|
441
|
+
if __name__ == "__main__":
|
|
442
|
+
# from itp_interface.tools.ray_utils import RayUtils
|
|
443
|
+
# RayUtils.init_ray(num_of_cpus=20, object_store_memory_in_gb=50, memory_in_gb=1, runtime_env={"working_dir": root_dir, "excludes": [".log", "data"]})
|
|
444
|
+
main()
|
itp_interface/pisa/.git
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gitdir: ../../../.git/modules/src/itp_interface/pisa
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
project/*
|
|
2
|
+
target/*
|
|
3
|
+
*.pyc
|
|
4
|
+
.bloop/*
|
|
5
|
+
.metals/*
|
|
6
|
+
.vscode/*
|
|
7
|
+
afp_extractions/
|
|
8
|
+
std_extractions/
|
|
9
|
+
|
|
10
|
+
*.ckpt
|
|
11
|
+
data
|
|
12
|
+
generated/
|
|
13
|
+
|
|
14
|
+
*.pyc
|
|
15
|
+
*.tar.gz
|
|
16
|
+
# JetBrains PyCharm IDE
|
|
17
|
+
.idea/
|
|
18
|
+
|
|
19
|
+
# Byte-compiled / optimized / DLL files
|
|
20
|
+
__pycache__/
|
|
21
|
+
*.py[cod]
|
|
22
|
+
*$py.class
|
|
23
|
+
|
|
24
|
+
# C extensions
|
|
25
|
+
*.so
|
|
26
|
+
|
|
27
|
+
# macOS dir files
|
|
28
|
+
.DS_Store
|
|
29
|
+
|
|
30
|
+
# Distribution / packaging
|
|
31
|
+
.Python
|
|
32
|
+
env/
|
|
33
|
+
build/
|
|
34
|
+
develop-eggs/
|
|
35
|
+
dist/
|
|
36
|
+
downloads/
|
|
37
|
+
eggs/
|
|
38
|
+
.eggs/
|
|
39
|
+
lib/
|
|
40
|
+
lib64/
|
|
41
|
+
parts/
|
|
42
|
+
sdist/
|
|
43
|
+
var/
|
|
44
|
+
wheels/
|
|
45
|
+
*.egg-info/
|
|
46
|
+
.installed.cfg
|
|
47
|
+
*.egg
|
|
48
|
+
|
|
49
|
+
# Checkpoints
|
|
50
|
+
checkpoints
|
|
51
|
+
|
|
52
|
+
# PyInstaller
|
|
53
|
+
# Usually these files are written by a python script from a template
|
|
54
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
55
|
+
*.manifest
|
|
56
|
+
*.spec
|
|
57
|
+
|
|
58
|
+
# Installer logs
|
|
59
|
+
pip-log.txt
|
|
60
|
+
pip-delete-this-directory.txt
|
|
61
|
+
|
|
62
|
+
# Unit test / coverage reports
|
|
63
|
+
htmlcov/
|
|
64
|
+
.tox/
|
|
65
|
+
.coverage
|
|
66
|
+
.coverage.*
|
|
67
|
+
.cache
|
|
68
|
+
nosetests.xml
|
|
69
|
+
coverage.xml
|
|
70
|
+
*.cover
|
|
71
|
+
.hypothesis/
|
|
72
|
+
|
|
73
|
+
# Translations
|
|
74
|
+
*.mo
|
|
75
|
+
*.pot
|
|
76
|
+
|
|
77
|
+
# Django stuff:
|
|
78
|
+
*.log
|
|
79
|
+
local_settings.py
|
|
80
|
+
|
|
81
|
+
# Flask stuff:
|
|
82
|
+
instance/
|
|
83
|
+
.webassets-cache
|
|
84
|
+
|
|
85
|
+
# Scrapy stuff:
|
|
86
|
+
.scrapy
|
|
87
|
+
|
|
88
|
+
# Sphinx documentation
|
|
89
|
+
docs/_build/
|
|
90
|
+
|
|
91
|
+
# PyBuilder
|
|
92
|
+
target/
|
|
93
|
+
|
|
94
|
+
# Jupyter Notebook
|
|
95
|
+
.ipynb_checkpoints
|
|
96
|
+
|
|
97
|
+
# pyenv
|
|
98
|
+
.python-version
|
|
99
|
+
|
|
100
|
+
# celery beat schedule file
|
|
101
|
+
celerybeat-schedule
|
|
102
|
+
|
|
103
|
+
# SageMath parsed files
|
|
104
|
+
*.sage.py
|
|
105
|
+
|
|
106
|
+
# dotenv
|
|
107
|
+
.env
|
|
108
|
+
|
|
109
|
+
# virtualenv
|
|
110
|
+
.venv
|
|
111
|
+
venv/
|
|
112
|
+
ENV/
|
|
113
|
+
|
|
114
|
+
# Spyder project settings
|
|
115
|
+
.spyderproject
|
|
116
|
+
.spyproject
|
|
117
|
+
|
|
118
|
+
# Rope project settings
|
|
119
|
+
.ropeproject
|
|
120
|
+
|
|
121
|
+
# mkdocs documentation
|
|
122
|
+
/site
|
|
123
|
+
|
|
124
|
+
# mypy
|
|
125
|
+
.mypy_cache/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
|
2
|
+
<profile version="1.0">
|
|
3
|
+
<option name="myName" value="Project Default" />
|
|
4
|
+
<inspection_tool class="JupyterPackageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
5
|
+
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
|
6
|
+
<option name="ourVersions">
|
|
7
|
+
<value>
|
|
8
|
+
<list size="2">
|
|
9
|
+
<item index="0" class="java.lang.String" itemvalue="2.7" />
|
|
10
|
+
<item index="1" class="java.lang.String" itemvalue="3.10" />
|
|
11
|
+
</list>
|
|
12
|
+
</value>
|
|
13
|
+
</option>
|
|
14
|
+
</inspection_tool>
|
|
15
|
+
</profile>
|
|
16
|
+
</component>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<component name="libraryTable">
|
|
2
|
+
<library name="sbt: com.google.android:annotations:4.1.1.4:jar">
|
|
3
|
+
<CLASSES>
|
|
4
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar!/" />
|
|
5
|
+
</CLASSES>
|
|
6
|
+
<JAVADOC>
|
|
7
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-javadoc.jar!/" />
|
|
8
|
+
</JAVADOC>
|
|
9
|
+
<SOURCES>
|
|
10
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4-sources.jar!/" />
|
|
11
|
+
</SOURCES>
|
|
12
|
+
</library>
|
|
13
|
+
</component>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<component name="libraryTable">
|
|
2
|
+
<library name="sbt: com.google.api.grpc:proto-google-common-protos:1.17.0:jar">
|
|
3
|
+
<CLASSES>
|
|
4
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/api/grpc/proto-google-common-protos/1.17.0/proto-google-common-protos-1.17.0.jar!/" />
|
|
5
|
+
</CLASSES>
|
|
6
|
+
<JAVADOC>
|
|
7
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/api/grpc/proto-google-common-protos/1.17.0/proto-google-common-protos-1.17.0-javadoc.jar!/" />
|
|
8
|
+
</JAVADOC>
|
|
9
|
+
<SOURCES>
|
|
10
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/api/grpc/proto-google-common-protos/1.17.0/proto-google-common-protos-1.17.0-sources.jar!/" />
|
|
11
|
+
</SOURCES>
|
|
12
|
+
</library>
|
|
13
|
+
</component>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<component name="libraryTable">
|
|
2
|
+
<library name="sbt: com.google.code.findbugs:jsr305:3.0.2:jar">
|
|
3
|
+
<CLASSES>
|
|
4
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar!/" />
|
|
5
|
+
</CLASSES>
|
|
6
|
+
<JAVADOC>
|
|
7
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-javadoc.jar!/" />
|
|
8
|
+
</JAVADOC>
|
|
9
|
+
<SOURCES>
|
|
10
|
+
<root url="jar://$USER_HOME$/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar!/" />
|
|
11
|
+
</SOURCES>
|
|
12
|
+
</library>
|
|
13
|
+
</component>
|