langfun 0.0.2.dev20240404__py3-none-any.whl → 0.0.2.dev20240405__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.
- langfun/core/eval/base.py +0 -5
- langfun/core/structured/schema.py +4 -2
- langfun/core/structured/schema_test.py +1 -3
- {langfun-0.0.2.dev20240404.dist-info → langfun-0.0.2.dev20240405.dist-info}/METADATA +1 -1
- {langfun-0.0.2.dev20240404.dist-info → langfun-0.0.2.dev20240405.dist-info}/RECORD +8 -8
- {langfun-0.0.2.dev20240404.dist-info → langfun-0.0.2.dev20240405.dist-info}/LICENSE +0 -0
- {langfun-0.0.2.dev20240404.dist-info → langfun-0.0.2.dev20240405.dist-info}/WHEEL +0 -0
- {langfun-0.0.2.dev20240404.dist-info → langfun-0.0.2.dev20240405.dist-info}/top_level.txt +0 -0
langfun/core/eval/base.py
CHANGED
@@ -816,11 +816,6 @@ class Evaluation(Evaluable):
|
|
816
816
|
if self.schema_fn is None:
|
817
817
|
return None
|
818
818
|
|
819
|
-
kwargs = {}
|
820
|
-
# Allow schema to be a function based on current evaluation.
|
821
|
-
if 'evaluation' in self.schema_fn.__signature__.arg_names:
|
822
|
-
kwargs['evaluation'] = self
|
823
|
-
|
824
819
|
schema = self._call_schema_fn()
|
825
820
|
fewshot_examples = None
|
826
821
|
if isinstance(schema, tuple):
|
@@ -386,10 +386,12 @@ def class_definition(
|
|
386
386
|
if schema.fields:
|
387
387
|
for key, field in schema.items():
|
388
388
|
if not isinstance(key, pg.typing.ConstStrKey):
|
389
|
-
|
389
|
+
pg.logging.warning(
|
390
390
|
'Variable-length keyword arguments is not supported in '
|
391
|
-
f'structured parsing or query. Encountered: {
|
391
|
+
f'structured parsing or query. Encountered: {cls}, Schema: {schema}'
|
392
392
|
)
|
393
|
+
continue
|
394
|
+
|
393
395
|
# Write field doc string as comments before the field definition.
|
394
396
|
if field.description:
|
395
397
|
for line in field.description.split('\n'):
|
@@ -459,9 +459,7 @@ class SchemaPythonReprTest(unittest.TestCase):
|
|
459
459
|
x: str
|
460
460
|
__kwargs__: typing.Any
|
461
461
|
|
462
|
-
|
463
|
-
TypeError, 'Variable-length keyword arguments is not supported'):
|
464
|
-
schema_lib.class_definition(C)
|
462
|
+
self.assertEqual(schema_lib.class_definition(C), 'class C:\n x: str\n')
|
465
463
|
|
466
464
|
def test_repr(self):
|
467
465
|
class Foo(pg.Object):
|
@@ -40,7 +40,7 @@ langfun/core/coding/python/parsing_test.py,sha256=9vAWF484kWIm6JZq8NFiMgKUDhXV-d
|
|
40
40
|
langfun/core/coding/python/permissions.py,sha256=1QWGHvzL8MM0Ok_auQ9tURqZHtdOfJaDpBzZ29GUE-c,2544
|
41
41
|
langfun/core/coding/python/permissions_test.py,sha256=w5EDb8QxpxgJyZkojyzVWQvDfg366zn99-g__6TbPQ0,2699
|
42
42
|
langfun/core/eval/__init__.py,sha256=iDA2OcJ3kR6ixZizXIY3N9LsjkaVrfTbSClTiSP8ekY,1291
|
43
|
-
langfun/core/eval/base.py,sha256=
|
43
|
+
langfun/core/eval/base.py,sha256=YpAPtWLeh3OpJuuPk7913xkB2OTCaGls1uWMohDA8SI,54551
|
44
44
|
langfun/core/eval/base_test.py,sha256=8MOum0DWMEm2-NpwmFgcqmlqEmuWYF5MesrCXTySylg,21083
|
45
45
|
langfun/core/eval/matching.py,sha256=g2yuBb4FeOlAlB10hqdWvaIg4QVQlJbiViRDcD2Y8go,9567
|
46
46
|
langfun/core/eval/matching_test.py,sha256=jFrNOaHteNo7wxCwc6w_mGylM0VHwezAcvfaZANKKmA,4898
|
@@ -80,10 +80,10 @@ langfun/core/structured/parsing.py,sha256=keoVqEfzAbdULh6GawWFsTQzU91MzJXYFZjXGX
|
|
80
80
|
langfun/core/structured/parsing_test.py,sha256=2_Uf3LYNRON1-5ysEr75xiG_cAxR3ZiixSfvUQu6mOQ,20846
|
81
81
|
langfun/core/structured/prompting.py,sha256=OAejcd7E-GTRI86i71Uel66te5zcTqyhsNtxe_Nt46U,7407
|
82
82
|
langfun/core/structured/prompting_test.py,sha256=FdEQ0Sy0zGSFXsaOYkWLjyso37-ckIBZE74hmD7QaAA,19610
|
83
|
-
langfun/core/structured/schema.py,sha256=
|
83
|
+
langfun/core/structured/schema.py,sha256=mJXirgqx3N7SA9zBO_ISHrzcV-ZRshLhnMJyCcSjGjY,25057
|
84
84
|
langfun/core/structured/schema_generation.py,sha256=U3nRQsqmMZg_qIVDh2fiY3K4JLfsAL1LcKzIFP1iXFg,5316
|
85
85
|
langfun/core/structured/schema_generation_test.py,sha256=cfZyP0gHno2fXy_c9vsVdvHmqKQSfuyUsCtfO3JFmYQ,2945
|
86
|
-
langfun/core/structured/schema_test.py,sha256=
|
86
|
+
langfun/core/structured/schema_test.py,sha256=XsTACSWwFmqlj4pCKsKWcVJbOaeu2DP0jMMCR4EZ_Js,22405
|
87
87
|
langfun/core/structured/scoring.py,sha256=a3vfGnqf-DOWjD07MF54GCZTO_R1RTxTDVPzerXnU0s,2325
|
88
88
|
langfun/core/structured/scoring_test.py,sha256=TznLMl0x9QxzmhHz_3Vr44VOXuvFnUSeRQVhu33W5cA,1437
|
89
89
|
langfun/core/templates/__init__.py,sha256=bO0eMsVJbi7sxEB2YlInKRQ2EVP-RyyKUwcD-8msuN4,927
|
@@ -95,8 +95,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
|
|
95
95
|
langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
|
96
96
|
langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
|
97
97
|
langfun/core/templates/selfplay_test.py,sha256=IB5rWbjK_9CTkqEo1BclQPzFAKcIiusJckH8J19HFgI,2096
|
98
|
-
langfun-0.0.2.
|
99
|
-
langfun-0.0.2.
|
100
|
-
langfun-0.0.2.
|
101
|
-
langfun-0.0.2.
|
102
|
-
langfun-0.0.2.
|
98
|
+
langfun-0.0.2.dev20240405.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
99
|
+
langfun-0.0.2.dev20240405.dist-info/METADATA,sha256=ESTl0jgK2m6lo5WhR2kLY4hnrexpvIeOVNRzZanVR8I,3405
|
100
|
+
langfun-0.0.2.dev20240405.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
101
|
+
langfun-0.0.2.dev20240405.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
102
|
+
langfun-0.0.2.dev20240405.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|