langfun 0.1.2.dev202508050805__tar.gz → 0.1.2.dev202508070805__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.

Potentially problematic release.


This version of langfun might be problematic. Click here for more details.

Files changed (177) hide show
  1. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/PKG-INFO +1 -1
  2. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/checkpointing.py +1 -5
  3. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/checkpointing_test.py +13 -7
  4. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/evaluation.py +20 -5
  5. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/evaluation_test.py +21 -1
  6. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/experiment.py +13 -0
  7. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/runners.py +1 -0
  8. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/template.py +1 -1
  9. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun.egg-info/PKG-INFO +1 -1
  10. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/LICENSE +0 -0
  11. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/README.md +0 -0
  12. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/__init__.py +0 -0
  13. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/__init__.py +0 -0
  14. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/bounding_box_parser.py +0 -0
  15. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/bounding_box_parser_test.py +0 -0
  16. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/drawing.py +0 -0
  17. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/drawing_test.py +0 -0
  18. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/location.py +0 -0
  19. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/assistant/capabilities/gui/location_test.py +0 -0
  20. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/__init__.py +0 -0
  21. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/agentic/__init__.py +0 -0
  22. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/agentic/action.py +0 -0
  23. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/agentic/action_eval.py +0 -0
  24. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/agentic/action_eval_test.py +0 -0
  25. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/agentic/action_test.py +0 -0
  26. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/async_support.py +0 -0
  27. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/async_support_test.py +0 -0
  28. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/__init__.py +0 -0
  29. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/__init__.py +0 -0
  30. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/correction.py +0 -0
  31. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/correction_test.py +0 -0
  32. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/execution.py +0 -0
  33. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/execution_test.py +0 -0
  34. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/generation.py +0 -0
  35. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/generation_test.py +0 -0
  36. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/parsing.py +0 -0
  37. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/parsing_test.py +0 -0
  38. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/sandboxing.py +0 -0
  39. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/coding/python/sandboxing_test.py +0 -0
  40. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/component.py +0 -0
  41. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/component_test.py +0 -0
  42. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/concurrent.py +0 -0
  43. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/concurrent_test.py +0 -0
  44. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/console.py +0 -0
  45. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/console_test.py +0 -0
  46. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/__init__.py +0 -0
  47. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/__init__.py +0 -0
  48. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/anthropic.py +0 -0
  49. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/anthropic_test.py +0 -0
  50. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/gemini.py +0 -0
  51. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/gemini_test.py +0 -0
  52. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/openai.py +0 -0
  53. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/data/conversion/openai_test.py +0 -0
  54. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/__init__.py +0 -0
  55. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/base.py +0 -0
  56. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/base_test.py +0 -0
  57. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/matching.py +0 -0
  58. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/matching_test.py +0 -0
  59. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/patching.py +0 -0
  60. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/patching_test.py +0 -0
  61. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/scoring.py +0 -0
  62. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/scoring_test.py +0 -0
  63. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/__init__.py +0 -0
  64. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/eval_test_helper.py +0 -0
  65. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/example.py +0 -0
  66. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/example_test.py +0 -0
  67. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/experiment_test.py +0 -0
  68. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/metric_values.py +0 -0
  69. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/metric_values_test.py +0 -0
  70. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/metrics.py +0 -0
  71. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/metrics_test.py +0 -0
  72. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/progress.py +0 -0
  73. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/progress_test.py +0 -0
  74. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/progress_tracking.py +0 -0
  75. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/progress_tracking_test.py +0 -0
  76. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/reporting.py +0 -0
  77. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/reporting_test.py +0 -0
  78. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/eval/v2/runners_test.py +0 -0
  79. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/langfunc.py +0 -0
  80. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/langfunc_test.py +0 -0
  81. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/language_model.py +0 -0
  82. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/language_model_test.py +0 -0
  83. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/__init__.py +0 -0
  84. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/anthropic.py +0 -0
  85. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/anthropic_test.py +0 -0
  86. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/azure_openai.py +0 -0
  87. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/azure_openai_test.py +0 -0
  88. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/cache/__init__.py +0 -0
  89. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/cache/base.py +0 -0
  90. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/cache/in_memory.py +0 -0
  91. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/cache/in_memory_test.py +0 -0
  92. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/compositional.py +0 -0
  93. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/compositional_test.py +0 -0
  94. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/deepseek.py +0 -0
  95. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/deepseek_test.py +0 -0
  96. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/fake.py +0 -0
  97. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/fake_test.py +0 -0
  98. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/gemini.py +0 -0
  99. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/gemini_test.py +0 -0
  100. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/google_genai.py +0 -0
  101. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/google_genai_test.py +0 -0
  102. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/groq.py +0 -0
  103. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/groq_test.py +0 -0
  104. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/llama_cpp.py +0 -0
  105. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/llama_cpp_test.py +0 -0
  106. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/openai.py +0 -0
  107. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/openai_compatible.py +0 -0
  108. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/openai_compatible_test.py +0 -0
  109. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/openai_test.py +0 -0
  110. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/rest.py +0 -0
  111. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/rest_test.py +0 -0
  112. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/vertexai.py +0 -0
  113. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/llms/vertexai_test.py +0 -0
  114. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/logging.py +0 -0
  115. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/logging_test.py +0 -0
  116. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/memories/__init__.py +0 -0
  117. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/memories/conversation_history.py +0 -0
  118. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/memories/conversation_history_test.py +0 -0
  119. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/memory.py +0 -0
  120. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/message.py +0 -0
  121. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/message_test.py +0 -0
  122. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/__init__.py +0 -0
  123. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/audio.py +0 -0
  124. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/audio_test.py +0 -0
  125. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/image.py +0 -0
  126. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/image_test.py +0 -0
  127. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/mime.py +0 -0
  128. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/mime_test.py +0 -0
  129. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/pdf.py +0 -0
  130. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/pdf_test.py +0 -0
  131. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/video.py +0 -0
  132. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modalities/video_test.py +0 -0
  133. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modality.py +0 -0
  134. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/modality_test.py +0 -0
  135. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/natural_language.py +0 -0
  136. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/natural_language_test.py +0 -0
  137. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/sampling.py +0 -0
  138. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/sampling_test.py +0 -0
  139. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/__init__.py +0 -0
  140. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/completion.py +0 -0
  141. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/completion_test.py +0 -0
  142. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/description.py +0 -0
  143. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/description_test.py +0 -0
  144. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/function_generation.py +0 -0
  145. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/function_generation_test.py +0 -0
  146. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/mapping.py +0 -0
  147. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/mapping_test.py +0 -0
  148. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/parsing.py +0 -0
  149. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/parsing_test.py +0 -0
  150. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/querying.py +0 -0
  151. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/querying_test.py +0 -0
  152. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/schema.py +0 -0
  153. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/schema_generation.py +0 -0
  154. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/schema_generation_test.py +0 -0
  155. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/schema_test.py +0 -0
  156. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/scoring.py +0 -0
  157. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/scoring_test.py +0 -0
  158. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/tokenization.py +0 -0
  159. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/structured/tokenization_test.py +0 -0
  160. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/subscription.py +0 -0
  161. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/subscription_test.py +0 -0
  162. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/template_test.py +0 -0
  163. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/__init__.py +0 -0
  164. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/completion.py +0 -0
  165. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/completion_test.py +0 -0
  166. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/conversation.py +0 -0
  167. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/conversation_test.py +0 -0
  168. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/demonstration.py +0 -0
  169. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/demonstration_test.py +0 -0
  170. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/selfplay.py +0 -0
  171. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun/core/templates/selfplay_test.py +0 -0
  172. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun.egg-info/SOURCES.txt +0 -0
  173. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun.egg-info/dependency_links.txt +0 -0
  174. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun.egg-info/requires.txt +0 -0
  175. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/langfun.egg-info/top_level.txt +0 -0
  176. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/setup.cfg +0 -0
  177. {langfun-0.1.2.dev202508050805 → langfun-0.1.2.dev202508070805}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langfun
3
- Version: 0.1.2.dev202508050805
3
+ Version: 0.1.2.dev202508070805
4
4
  Summary: Langfun: Language as Functions.
5
5
  Home-page: https://github.com/google/langfun
6
6
  Author: Langfun Authors
@@ -82,11 +82,7 @@ class Checkpointer(experiment_lib.Plugin):
82
82
  example: Example,
83
83
  ) -> None:
84
84
  """Saves the example to the checkpoint file."""
85
- if example.has_error:
86
- experiment.warning(
87
- f'Example {example.id} has error. Skipping checkpointing.'
88
- )
89
- elif example.newly_processed:
85
+ if example.newly_processed:
90
86
  self._save_example(runner, experiment, example)
91
87
 
92
88
  def _load_experiment(
@@ -101,12 +101,15 @@ class PerExampleCheckpointerTest(CheckpointerTest):
101
101
  self.assertIn(i + 1, collector.examples)
102
102
  example = collector.examples[i + 1]
103
103
  ckpt = run.output_path_for(leaf, f'checkpoint_{example.id}.jsonl')
104
- if example.has_error:
105
- self.assertFalse(pg.io.path_exists(ckpt))
106
- else:
107
- self.assertTrue(pg.io.path_exists(ckpt))
108
- with pg.io.open_sequence(ckpt) as f:
109
- self.assertEqual(len(list(iter(f))), 1)
104
+ self.assertTrue(pg.io.path_exists(ckpt))
105
+ with pg.io.open_sequence(ckpt) as f:
106
+ examples_from_ckpt = list(iter(f))
107
+ # `eval_test_helper.test_experiment` has two TestEvaluation with
108
+ # llm offset 0, which makes that evaluation run twice.
109
+ if example.has_error and leaf.lm.offset == 0:
110
+ self.assertEqual(len(examples_from_ckpt), 2)
111
+ else:
112
+ self.assertEqual(len(examples_from_ckpt), 1)
110
113
  if leaf.id not in num_processed:
111
114
  self.assertEqual(leaf.progress.num_skipped, 0)
112
115
  num_processed[leaf.id] = leaf.progress.num_processed
@@ -222,7 +225,10 @@ class BulkCheckpointerTest(CheckpointerTest):
222
225
  with pg.io.open_sequence(ckpt) as f:
223
226
  self.assertEqual(
224
227
  len(list(iter(f))),
225
- leaf.progress.num_completed - leaf.progress.num_failed
228
+ # `eval_test_helper.test_experiment` has two TestEvaluation with
229
+ # llm offset 0, which makes that evaluation run twice.
230
+ leaf.progress.num_completed
231
+ + (leaf.progress.num_failed if leaf.lm.offset == 0 else 0)
226
232
  )
227
233
  if leaf.id not in num_processed:
228
234
  self.assertEqual(leaf.progress.num_skipped, 0)
@@ -149,12 +149,15 @@ class Evaluation(experiment_lib.Experiment):
149
149
  self,
150
150
  example: example_lib.Example | int,
151
151
  raise_if_has_error: bool = False,
152
+ reevaluate_upon_previous_errors: bool = True,
152
153
  ) -> example_lib.Example:
153
154
  """Evaluates a single example input.
154
155
 
155
156
  Args:
156
157
  example: An example ID or an example object with ID.
157
158
  raise_if_has_error: Whether to raise an error if the example has error.
159
+ reevaluate_upon_previous_errors: Whether to reevaluate the example if
160
+ the previous checkpointed run has error.
158
161
 
159
162
  Returns:
160
163
  The evaluated example with the output and metric metadata populated.
@@ -169,7 +172,9 @@ class Evaluation(experiment_lib.Experiment):
169
172
  checkpointed = self._state.ckpt_example(example.id)
170
173
 
171
174
  with pg.timeit('evaluate') as timeit, lf.track_usages() as usage_summary:
172
- if checkpointed is None or checkpointed.has_error:
175
+ if checkpointed is None or (
176
+ reevaluate_upon_previous_errors and checkpointed.has_error
177
+ ):
173
178
  if checkpointed is None:
174
179
  self.info(
175
180
  f'Example {example.id} is being processed for the first time '
@@ -184,17 +189,27 @@ class Evaluation(experiment_lib.Experiment):
184
189
  self._state.update(example, in_progress=True)
185
190
  self._process(example, raise_if_has_error=raise_if_has_error)
186
191
  else:
187
- self.info(
188
- f'Example {example.id} skipped processing as prior run '
189
- 'is available and error free.'
190
- )
192
+ if checkpointed.has_error:
193
+ self.warning(
194
+ f'Example {example.id} skipped processing despite its checkpoint '
195
+ f'has error: {checkpointed.error}, as '
196
+ '`reevaluate_upon_previous_errors` is set to False.'
197
+ )
198
+ else:
199
+ self.info(
200
+ f'Example {example.id} skipped processing as prior run '
201
+ 'is available and error free.'
202
+ )
191
203
  example.start_time = checkpointed.start_time
192
204
  self._state.update(example, in_progress=True)
193
205
 
194
206
  # Use the output and metadata obtained from the previous processing.
195
207
  example.output = checkpointed.output
196
208
  example.metadata = checkpointed.metadata
209
+ example.error = checkpointed.error
197
210
  example.newly_processed = False
211
+ example.execution_status = checkpointed.execution_status
212
+ example.end_time = checkpointed.end_time
198
213
 
199
214
  # For previously processed examples, we merge previous usages as
200
215
  # cached, so the usage summary will account previous usages, but as
@@ -128,10 +128,17 @@ class EvaluationTest(unittest.TestCase):
128
128
  self.assertEqual(len(exp.state.evaluation_status), 1)
129
129
  f.add(pg.to_json_str(example))
130
130
 
131
+ example2 = exp.evaluate(6)
132
+ self.assertTrue(example2.newly_processed)
133
+ self.assertEqual(example2.input, pg.Dict(x=5, y=25, groundtruth=30))
134
+ self.assertTrue(example2.has_error)
135
+ self.assertEqual(len(exp.state.evaluation_status), 2)
136
+ f.add(pg.to_json_str(example2))
137
+
131
138
  exp.reset()
132
139
  self.assertEqual(len(exp.state.ckpt_examples), 0)
133
140
  exp.load_state(state_file)
134
- self.assertEqual(len(exp.state.ckpt_examples), 1)
141
+ self.assertEqual(len(exp.state.ckpt_examples), 2)
135
142
  self.assertEqual(len(exp.state.evaluation_status), 0)
136
143
  example = exp.evaluate(3)
137
144
  self.assertFalse(example.newly_processed)
@@ -142,6 +149,19 @@ class EvaluationTest(unittest.TestCase):
142
149
  self.assertEqual(example.usage_summary.cached.total.num_requests, 1)
143
150
  self.assertEqual(example.usage_summary.uncached.total.total_tokens, 0)
144
151
  self.assertEqual(example.usage_summary.uncached.total.num_requests, 0)
152
+ self.assertIsNotNone(example.start_time)
153
+ self.assertIsNotNone(example.end_time)
154
+ self.assertIn('evaluate.process', example.execution_status)
155
+ self.assertIn('evaluate.metric', example.execution_status)
156
+
157
+ example2 = exp.evaluate(6, reevaluate_upon_previous_errors=False)
158
+ self.assertFalse(example2.newly_processed)
159
+ self.assertEqual(example2.input, pg.Dict(x=5, y=25, groundtruth=30))
160
+ self.assertTrue(example2.has_error)
161
+ self.assertIsNotNone(example2.start_time)
162
+ self.assertIsNotNone(example2.end_time)
163
+ self.assertIn('evaluate.process', example2.execution_status)
164
+ self.assertIn('evaluate.metric', example2.execution_status)
145
165
 
146
166
  # Test load_state with filter.
147
167
  exp.reset()
@@ -384,6 +384,7 @@ class Experiment(lf.Component, pg.views.HtmlTreeView.Extension):
384
384
  example_ids: list[int] | None = None,
385
385
  shuffle_inputs: bool = False,
386
386
  raise_if_has_error: bool = False,
387
+ reevaluate_upon_previous_errors: bool = True,
387
388
  reprocess: bool | list[int] = False,
388
389
  generate_example_html: Literal['new', 'all', 'no'] | list[int] = 'new',
389
390
  process_timeout: int | None = None,
@@ -436,6 +437,9 @@ class Experiment(lf.Component, pg.views.HtmlTreeView.Extension):
436
437
  Neverthless, the example ID remains unchanged for each example.
437
438
  raise_if_has_error: If True, it will raise an error if any example fails.
438
439
  Otherwise, it will continue and report the error in the output.
440
+ reevaluate_upon_previous_errors: If True, it will reevaluate the example
441
+ if the previous checkpointed run has error when experiment runs with
442
+ existing checkpoints.
439
443
  reprocess: A boolean or a list of example IDs. If boolean, it indicates
440
444
  that whether all the examples to be evaluated will be reprocessed,
441
445
  meaning that existing checkpoints will be ignored. If a list of
@@ -475,6 +479,7 @@ class Experiment(lf.Component, pg.views.HtmlTreeView.Extension):
475
479
  example_ids=example_ids,
476
480
  shuffle_inputs=shuffle_inputs,
477
481
  raise_if_has_error=raise_if_has_error,
482
+ reevaluate_upon_previous_errors=reevaluate_upon_previous_errors,
478
483
  reprocess=reprocess,
479
484
  generate_example_html=generate_example_html,
480
485
  use_cache=use_cache,
@@ -835,6 +840,14 @@ class Run(pg.Object, pg.views.html.HtmlTreeView.Extension):
835
840
  )
836
841
  ] = False
837
842
 
843
+ reevaluate_upon_previous_errors: Annotated[
844
+ bool,
845
+ (
846
+ 'If True, it will reevaluate the example if the previously '
847
+ 'checkpointed run has error. Otherwise, it will skip the example.'
848
+ )
849
+ ] = True
850
+
838
851
  note: Annotated[
839
852
  str | None,
840
853
  'The user note for the current run.'
@@ -384,6 +384,7 @@ class RunnerBase(Runner):
384
384
  item = evaluation.evaluate(
385
385
  item,
386
386
  raise_if_has_error=self.current_run.raise_if_has_error,
387
+ reevaluate_upon_previous_errors=self.current_run.reevaluate_upon_previous_errors,
387
388
  )
388
389
  self.on_example_complete(evaluation, item)
389
390
  return item
@@ -307,7 +307,7 @@ class Template(
307
307
  else:
308
308
  raise ValueError(
309
309
  f'The value for template variable {var_name!r} is not '
310
- 'provided.'
310
+ f'provided. Template: {self.template_str!r}'
311
311
  )
312
312
  inputs[var_name] = var_value
313
313
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langfun
3
- Version: 0.1.2.dev202508050805
3
+ Version: 0.1.2.dev202508070805
4
4
  Summary: Langfun: Language as Functions.
5
5
  Home-page: https://github.com/google/langfun
6
6
  Author: Langfun Authors