langfun 0.1.1.dev20240805__py3-none-any.whl → 0.1.1.dev20240807__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/__init__.py +1 -0
- langfun/core/eval/base.py +5 -43
- langfun/core/logging.py +8 -35
- langfun/core/logging_test.py +8 -2
- langfun/core/message.py +78 -2
- langfun/core/message_test.py +49 -0
- langfun/core/repr_utils.py +91 -1
- langfun/core/repr_utils_test.py +14 -0
- {langfun-0.1.1.dev20240805.dist-info → langfun-0.1.1.dev20240807.dist-info}/METADATA +1 -1
- {langfun-0.1.1.dev20240805.dist-info → langfun-0.1.1.dev20240807.dist-info}/RECORD +13 -13
- {langfun-0.1.1.dev20240805.dist-info → langfun-0.1.1.dev20240807.dist-info}/LICENSE +0 -0
- {langfun-0.1.1.dev20240805.dist-info → langfun-0.1.1.dev20240807.dist-info}/WHEEL +0 -0
- {langfun-0.1.1.dev20240805.dist-info → langfun-0.1.1.dev20240807.dist-info}/top_level.txt +0 -0
langfun/core/__init__.py
CHANGED
langfun/core/eval/base.py
CHANGED
@@ -18,7 +18,6 @@ import collections
|
|
18
18
|
import dataclasses
|
19
19
|
import functools
|
20
20
|
import hashlib
|
21
|
-
import html
|
22
21
|
import inspect
|
23
22
|
import io
|
24
23
|
import os
|
@@ -531,53 +530,16 @@ class Evaluable(lf.Component):
|
|
531
530
|
def _render_message(self, message: lf.Message, s: io.StringIO) -> None:
|
532
531
|
for m in message.trace():
|
533
532
|
if 'lm-input' in m.tags:
|
534
|
-
|
533
|
+
color = 'green'
|
535
534
|
elif 'lm-response' in m.tags:
|
536
|
-
|
535
|
+
color = 'blue'
|
537
536
|
else:
|
538
|
-
|
537
|
+
continue
|
539
538
|
|
540
539
|
s.write(
|
541
|
-
f'<div style="color: {
|
542
|
-
'padding: 10px; border: 1px solid; margin-top: 10px">'
|
540
|
+
f'<div style="color: {color}; border: 1px solid; margin-top: 10px">'
|
543
541
|
)
|
544
|
-
s.write(
|
545
|
-
|
546
|
-
# Write output.
|
547
|
-
if m.result is not None:
|
548
|
-
s.write(
|
549
|
-
'<div style="color: magenta; white-space: pre-wrap;'
|
550
|
-
'padding: 10px; border: 1px solid; margin: 10px">'
|
551
|
-
)
|
552
|
-
s.write(html.escape(pg.format(m.result)))
|
553
|
-
s.write('</div>')
|
554
|
-
|
555
|
-
# Write modality information.
|
556
|
-
if 'lm-input' in m.tags or 'lm-response' in m.tags:
|
557
|
-
modalities = m.referred_modalities()
|
558
|
-
if modalities:
|
559
|
-
s.write(f'<div style="color: {text_color}; white-space: pre-wrap;'
|
560
|
-
'padding: 10px; border: 1px solid; margin-top: 10px"><table>')
|
561
|
-
for name, modality in modalities.items():
|
562
|
-
s.write(f'<tr><td>{name}</td><td>')
|
563
|
-
if hasattr(modality, '_repr_html_'):
|
564
|
-
s.write(modality._repr_html_()) # pylint: disable=protected-access
|
565
|
-
else:
|
566
|
-
s.write(html.escape(pg.format(modality, max_bytes_len=32)))
|
567
|
-
s.write('</td></tr>')
|
568
|
-
s.write('</table></div>')
|
569
|
-
|
570
|
-
# Write usage information.
|
571
|
-
if m.metadata.get('usage', None):
|
572
|
-
s.write(
|
573
|
-
'<div style="background-color: #EEEEEE; color: black; '
|
574
|
-
'white-space: pre-wrap; padding: 10px; border: 0px solid; '
|
575
|
-
'margin: 10px">'
|
576
|
-
f'prompt: {m.usage.prompt_tokens} tokens, '
|
577
|
-
f'response: {m.usage.completion_tokens} tokens, '
|
578
|
-
f'total: {m.usage.total_tokens} tokens'
|
579
|
-
'</div>'
|
580
|
-
)
|
542
|
+
s.write(m._repr_html_()) # pylint: disable=protected-access
|
581
543
|
s.write('</div>')
|
582
544
|
|
583
545
|
@classmethod
|
langfun/core/logging.py
CHANGED
@@ -19,6 +19,7 @@ import typing
|
|
19
19
|
from typing import Any, Literal, ContextManager
|
20
20
|
|
21
21
|
from langfun.core import console
|
22
|
+
from langfun.core import repr_utils
|
22
23
|
import pyglove as pg
|
23
24
|
|
24
25
|
|
@@ -55,31 +56,19 @@ class LogEntry(pg.Object):
|
|
55
56
|
s.write(f'<div style="padding-left: {padding_left}px;">')
|
56
57
|
s.write(self._message_display)
|
57
58
|
if self.metadata:
|
58
|
-
s.write(
|
59
|
-
|
60
|
-
for k, v in self.metadata.items():
|
61
|
-
if hasattr(v, '_repr_html_'):
|
62
|
-
cs = v._repr_html_() # pylint: disable=protected-access
|
63
|
-
else:
|
64
|
-
cs = f'<span style="white-space: pre-wrap">{str(v)}</span>'
|
65
|
-
key_span = self._round_text(k, color='#F1C40F', margin_bottom='0px')
|
66
|
-
s.write(
|
67
|
-
'<tr>'
|
68
|
-
'<td style="padding: 5px; vertical-align: top; '
|
69
|
-
f'border-bottom: 1px solid #EEEEEE">{key_span}</td>'
|
70
|
-
'<td style="padding: 5px; vertical-align: top; '
|
71
|
-
f'border-bottom: 1px solid #EEEEEE">{cs}</td></tr>'
|
72
|
-
)
|
73
|
-
s.write('</table></div>')
|
59
|
+
s.write(repr_utils.html_repr(self.metadata))
|
60
|
+
s.write('</div>')
|
74
61
|
return s.getvalue()
|
75
62
|
|
76
63
|
@property
|
77
|
-
def
|
64
|
+
def _message_text_bgcolor(self) -> str:
|
78
65
|
match self.level:
|
79
66
|
case 'debug':
|
80
67
|
return '#EEEEEE'
|
81
68
|
case 'info':
|
82
69
|
return '#A3E4D7'
|
70
|
+
case 'warning':
|
71
|
+
return '#F8C471'
|
83
72
|
case 'error':
|
84
73
|
return '#F5C6CB'
|
85
74
|
case 'fatal':
|
@@ -99,25 +88,9 @@ class LogEntry(pg.Object):
|
|
99
88
|
|
100
89
|
@property
|
101
90
|
def _message_display(self) -> str:
|
102
|
-
return
|
91
|
+
return repr_utils.html_round_text(
|
103
92
|
self._time_display + ' ' + self.message,
|
104
|
-
|
105
|
-
)
|
106
|
-
|
107
|
-
def _round_text(
|
108
|
-
self,
|
109
|
-
text: str,
|
110
|
-
*,
|
111
|
-
color: str = '#EEEEEE',
|
112
|
-
display: str = 'inline-block',
|
113
|
-
margin_top: str = '5px',
|
114
|
-
margin_bottom: str = '5px',
|
115
|
-
whitespace: str = 'pre-wrap') -> str:
|
116
|
-
return (
|
117
|
-
f'<span style="background:{color}; display:{display};'
|
118
|
-
f'border-radius:10px; padding:5px; '
|
119
|
-
f'margin-top: {margin_top}; margin-bottom: {margin_bottom}; '
|
120
|
-
f'white-space: {whitespace}">{text}</span>'
|
93
|
+
background_color=self._message_text_bgcolor,
|
121
94
|
)
|
122
95
|
|
123
96
|
|
langfun/core/logging_test.py
CHANGED
@@ -43,8 +43,14 @@ class LoggingTest(unittest.TestCase):
|
|
43
43
|
self.assertEqual(logging.fatal('hi').level, 'fatal')
|
44
44
|
|
45
45
|
def test_repr_html(self):
|
46
|
-
|
47
|
-
|
46
|
+
def assert_color(entry, color):
|
47
|
+
self.assertIn(f'background-color: {color}', entry._repr_html_())
|
48
|
+
|
49
|
+
assert_color(logging.debug('hi', indent=0), '#EEEEEE')
|
50
|
+
assert_color(logging.info('hi', indent=1), '#A3E4D7')
|
51
|
+
assert_color(logging.warning('hi', x=1, y=2), '#F8C471')
|
52
|
+
assert_color(logging.error('hi', indent=2, x=1, y=2), '#F5C6CB')
|
53
|
+
assert_color(logging.fatal('hi', indent=2, x=1, y=2), '#F19CBB')
|
48
54
|
|
49
55
|
|
50
56
|
if __name__ == '__main__':
|
langfun/core/message.py
CHANGED
@@ -14,11 +14,13 @@
|
|
14
14
|
"""Messages that are exchanged between users and agents."""
|
15
15
|
|
16
16
|
import contextlib
|
17
|
+
import html
|
17
18
|
import io
|
18
19
|
from typing import Annotated, Any, Optional, Union
|
19
20
|
|
20
21
|
from langfun.core import modality
|
21
22
|
from langfun.core import natural_language
|
23
|
+
from langfun.core import repr_utils
|
22
24
|
import pyglove as pg
|
23
25
|
|
24
26
|
|
@@ -304,15 +306,16 @@ class Message(natural_language.NaturalLanguageFormattable, pg.Object):
|
|
304
306
|
m.referred_name: m for m in chunks if isinstance(m, modality.Modality)
|
305
307
|
}
|
306
308
|
|
307
|
-
def chunk(self) -> list[str | modality.Modality]:
|
309
|
+
def chunk(self, text: str | None = None) -> list[str | modality.Modality]:
|
308
310
|
"""Chunk a message into a list of str or modality objects."""
|
309
311
|
chunks = []
|
310
312
|
|
311
313
|
def add_text_chunk(text_piece: str) -> None:
|
312
314
|
if text_piece:
|
313
315
|
chunks.append(text_piece)
|
316
|
+
if text is None:
|
317
|
+
text = self.text
|
314
318
|
|
315
|
-
text = self.text
|
316
319
|
chunk_start = 0
|
317
320
|
ref_end = 0
|
318
321
|
while chunk_start < len(text):
|
@@ -490,6 +493,79 @@ class Message(natural_language.NaturalLanguageFormattable, pg.Object):
|
|
490
493
|
v = self.metadata[key]
|
491
494
|
return v.value if isinstance(v, pg.Ref) else v
|
492
495
|
|
496
|
+
def _repr_html_(self):
|
497
|
+
return self.to_html().content
|
498
|
+
|
499
|
+
def to_html(
|
500
|
+
self,
|
501
|
+
include_message_type: bool = True
|
502
|
+
) -> repr_utils.Html:
|
503
|
+
"""Returns the HTML representation of the message."""
|
504
|
+
s = io.StringIO()
|
505
|
+
s.write('<div style="padding:0px 10px 0px 10px;">')
|
506
|
+
# Title bar.
|
507
|
+
if include_message_type:
|
508
|
+
s.write(
|
509
|
+
repr_utils.html_round_text(
|
510
|
+
self.__class__.__name__,
|
511
|
+
text_color='white',
|
512
|
+
background_color=self._text_color(),
|
513
|
+
)
|
514
|
+
)
|
515
|
+
s.write('<hr>')
|
516
|
+
|
517
|
+
# Body.
|
518
|
+
s.write(
|
519
|
+
f'<span style="color: {self._text_color()}; white-space: pre-wrap;">'
|
520
|
+
)
|
521
|
+
|
522
|
+
# NOTE(daiyip): LLM may reformat the text from the input, therefore
|
523
|
+
# we proritize the formatted text if it's available.
|
524
|
+
maybe_reformatted = self.get('formatted_text')
|
525
|
+
referred_chunks = {}
|
526
|
+
for chunk in self.chunk(maybe_reformatted):
|
527
|
+
if isinstance(chunk, str):
|
528
|
+
s.write(html.escape(chunk))
|
529
|
+
else:
|
530
|
+
assert isinstance(chunk, modality.Modality), chunk
|
531
|
+
s.write(' ')
|
532
|
+
s.write(repr_utils.html_round_text(
|
533
|
+
chunk.referred_name,
|
534
|
+
text_color='black',
|
535
|
+
background_color='#f7dc6f'
|
536
|
+
))
|
537
|
+
s.write(' ')
|
538
|
+
referred_chunks[chunk.referred_name] = chunk
|
539
|
+
s.write('</span>')
|
540
|
+
|
541
|
+
def item_color(k, v):
|
542
|
+
if isinstance(v, modality.Modality):
|
543
|
+
return ('black', '#f7dc6f', None, None) # Light yellow
|
544
|
+
elif k == 'result':
|
545
|
+
return ('white', 'purple', 'purple', None) # Blue.
|
546
|
+
elif k in ('usage',):
|
547
|
+
return ('white', '#e74c3c', None, None) # Red.
|
548
|
+
else:
|
549
|
+
return ('white', '#17202a', None, None) # Dark gray
|
550
|
+
|
551
|
+
# TODO(daiyip): Revisit the logic in deciding what metadata keys to
|
552
|
+
# expose to the user.
|
553
|
+
if referred_chunks:
|
554
|
+
s.write(repr_utils.html_repr(referred_chunks, item_color))
|
555
|
+
|
556
|
+
if 'lm-response' in self.tags:
|
557
|
+
s.write(repr_utils.html_repr(self.metadata, item_color))
|
558
|
+
s.write('</div>')
|
559
|
+
return repr_utils.Html(s.getvalue())
|
560
|
+
|
561
|
+
def _text_color(self) -> str:
|
562
|
+
match self.__class__.__name__:
|
563
|
+
case 'UserMessage':
|
564
|
+
return 'green'
|
565
|
+
case 'AIMessage':
|
566
|
+
return 'blue'
|
567
|
+
case _:
|
568
|
+
return 'black'
|
493
569
|
|
494
570
|
#
|
495
571
|
# Messages of different roles.
|
langfun/core/message_test.py
CHANGED
@@ -26,6 +26,9 @@ class CustomModality(modality.Modality):
|
|
26
26
|
def to_bytes(self):
|
27
27
|
return self.content.encode()
|
28
28
|
|
29
|
+
def _repr_html_(self):
|
30
|
+
return f'<div>CustomModality: {self.content}</div>'
|
31
|
+
|
29
32
|
|
30
33
|
class MessageTest(unittest.TestCase):
|
31
34
|
|
@@ -315,6 +318,52 @@ class MessageTest(unittest.TestCase):
|
|
315
318
|
)
|
316
319
|
)
|
317
320
|
|
321
|
+
def test_html(self):
|
322
|
+
m = message.UserMessage(
|
323
|
+
'hi, this is a <<[[img1]]>> and <<[[x.img2]]>>',
|
324
|
+
img1=CustomModality('foo'),
|
325
|
+
x=dict(img2=CustomModality('bar')),
|
326
|
+
)
|
327
|
+
self.assertEqual(
|
328
|
+
m._repr_html_(),
|
329
|
+
(
|
330
|
+
'<div style="padding:0px 10px 0px 10px;"><span style="color: white;'
|
331
|
+
'background-color: green;display:inline-block; border-radius:10px; '
|
332
|
+
'padding:5px; margin-top: 5px; margin-bottom: 5px; white-space: '
|
333
|
+
'pre-wrap">UserMessage</span><hr><span style="color: green; '
|
334
|
+
'white-space: pre-wrap;">hi, this is a <span style="color: '
|
335
|
+
'black;background-color: #f7dc6f;display:inline-block; '
|
336
|
+
'border-radius:10px; padding:5px; margin-top: 5px; margin-bottom: '
|
337
|
+
'5px; white-space: pre-wrap">img1</span> and <span style'
|
338
|
+
'="color: black;background-color: #f7dc6f;display:inline-block; '
|
339
|
+
'border-radius:10px; padding:5px; margin-top: 5px; margin-bottom: '
|
340
|
+
'5px; white-space: pre-wrap">x.img2</span> </span><div style='
|
341
|
+
'"padding-left: 20px; margin-top: 10px"><table style="border-top: '
|
342
|
+
'1px solid #EEEEEE;"><tr><td style="padding: 5px; vertical-align: '
|
343
|
+
'top; border-bottom: 1px solid #EEEEEE"><span style="color: black;'
|
344
|
+
'background-color: #f7dc6f;display:inline-block; border-radius:'
|
345
|
+
'10px; padding:5px; margin-top: 5px; margin-bottom: 0px; '
|
346
|
+
'white-space: pre-wrap">img1</span></td><td style="padding: 15px '
|
347
|
+
'5px 5px 5px; vertical-align: top; border-bottom: 1px solid '
|
348
|
+
'#EEEEEE;"><div>CustomModality: foo</div></td></tr><tr><td style='
|
349
|
+
'"padding: 5px; vertical-align: top; border-bottom: 1px solid '
|
350
|
+
'#EEEEEE"><span style="color: black;background-color: #f7dc6f;'
|
351
|
+
'display:inline-block; border-radius:10px; padding:5px; margin-top:'
|
352
|
+
' 5px; margin-bottom: 0px; white-space: pre-wrap">x.img2</span>'
|
353
|
+
'</td><td style="padding: 15px 5px 5px 5px; vertical-align: top; '
|
354
|
+
'border-bottom: 1px solid #EEEEEE;"><div>CustomModality: bar</div>'
|
355
|
+
'</td></tr></table></div></div>'
|
356
|
+
)
|
357
|
+
)
|
358
|
+
self.assertIn(
|
359
|
+
'background-color: blue',
|
360
|
+
message.AIMessage('hi').to_html().content,
|
361
|
+
)
|
362
|
+
self.assertIn(
|
363
|
+
'background-color: black',
|
364
|
+
message.SystemMessage('hi').to_html().content,
|
365
|
+
)
|
366
|
+
|
318
367
|
|
319
368
|
if __name__ == '__main__':
|
320
369
|
unittest.main()
|
langfun/core/repr_utils.py
CHANGED
@@ -16,9 +16,18 @@
|
|
16
16
|
import collections
|
17
17
|
import contextlib
|
18
18
|
import io
|
19
|
-
from typing import Iterator
|
19
|
+
from typing import Any, Callable, Iterator
|
20
20
|
|
21
21
|
from langfun.core import component
|
22
|
+
import pyglove as pg
|
23
|
+
|
24
|
+
|
25
|
+
class Html(pg.Object):
|
26
|
+
"""A HTML adapter for rendering."""
|
27
|
+
content: str
|
28
|
+
|
29
|
+
def _repr_html_(self) -> str:
|
30
|
+
return self.content
|
22
31
|
|
23
32
|
|
24
33
|
@contextlib.contextmanager
|
@@ -81,3 +90,84 @@ def write_maybe_shared(s: io.StringIO, content: str) -> bool:
|
|
81
90
|
s.write(content)
|
82
91
|
context[content] += 1
|
83
92
|
return not written
|
93
|
+
|
94
|
+
|
95
|
+
def html_repr(
|
96
|
+
value: Any,
|
97
|
+
item_color: Callable[
|
98
|
+
[str, str],
|
99
|
+
tuple[
|
100
|
+
str | None, # Label text color
|
101
|
+
str | None, # Label background color
|
102
|
+
str | None, # Value text color
|
103
|
+
str | None, # Value background color
|
104
|
+
]
|
105
|
+
] | None = None # pylint: disable=bad-whitespace
|
106
|
+
) -> str:
|
107
|
+
"""Writes a list of key-value pairs to an string stream.
|
108
|
+
|
109
|
+
Args:
|
110
|
+
value: A value to be rendered in HTML.
|
111
|
+
item_color: A function that takes the key and value and returns a tuple
|
112
|
+
of four strings, the text color and background color of the label and
|
113
|
+
value respectively. If None, a default color scheme will be used.
|
114
|
+
|
115
|
+
Returns:
|
116
|
+
The HTML representation of the value.
|
117
|
+
"""
|
118
|
+
s = io.StringIO()
|
119
|
+
s.write('<div style="padding-left: 20px; margin-top: 10px">')
|
120
|
+
s.write('<table style="border-top: 1px solid #EEEEEE;">')
|
121
|
+
item_color = item_color or (lambda k, v: (None, '#F1C40F', None, None))
|
122
|
+
|
123
|
+
for k, v in pg.object_utils.flatten(value).items():
|
124
|
+
if isinstance(v, pg.Ref):
|
125
|
+
v = v.value
|
126
|
+
if hasattr(v, '_repr_html_'):
|
127
|
+
cs = v._repr_html_() # pylint: disable=protected-access
|
128
|
+
else:
|
129
|
+
cs = f'<span style="white-space: pre-wrap">{str(v)}</span>'
|
130
|
+
|
131
|
+
key_color, key_bg_color, value_color, value_bg_color = item_color(k, v)
|
132
|
+
key_span = html_round_text(
|
133
|
+
k,
|
134
|
+
text_color=key_color,
|
135
|
+
background_color=key_bg_color,
|
136
|
+
margin_bottom='0px'
|
137
|
+
)
|
138
|
+
value_color_style = f'color: {value_color};' if value_color else ''
|
139
|
+
value_bg_color_style = (
|
140
|
+
f'background-color: {value_bg_color};' if value_bg_color else ''
|
141
|
+
)
|
142
|
+
s.write(
|
143
|
+
'<tr>'
|
144
|
+
'<td style="padding: 5px; vertical-align: top; '
|
145
|
+
f'border-bottom: 1px solid #EEEEEE">{key_span}</td>'
|
146
|
+
'<td style="padding: 15px 5px 5px 5px; vertical-align: top; '
|
147
|
+
'border-bottom: 1px solid #EEEEEE;'
|
148
|
+
f'{value_color_style}{value_bg_color_style}">{cs}</td></tr>'
|
149
|
+
)
|
150
|
+
s.write('</table></div>')
|
151
|
+
return s.getvalue()
|
152
|
+
|
153
|
+
|
154
|
+
def html_round_text(
|
155
|
+
text: str,
|
156
|
+
*,
|
157
|
+
text_color: str = 'black',
|
158
|
+
background_color: str = '#EEEEEE',
|
159
|
+
display: str = 'inline-block',
|
160
|
+
margin_top: str = '5px',
|
161
|
+
margin_bottom: str = '5px',
|
162
|
+
whitespace: str = 'pre-wrap') -> str:
|
163
|
+
"""Renders a HTML span with rounded corners."""
|
164
|
+
color_style = f'color: {text_color};' if text_color else ''
|
165
|
+
bg_color_style = (
|
166
|
+
f'background-color: {background_color};' if background_color else ''
|
167
|
+
)
|
168
|
+
return (
|
169
|
+
f'<span style="{color_style}{bg_color_style}'
|
170
|
+
f'display:{display}; border-radius:10px; padding:5px; '
|
171
|
+
f'margin-top: {margin_top}; margin-bottom: {margin_bottom}; '
|
172
|
+
f'white-space: {whitespace}">{text}</span>'
|
173
|
+
)
|
langfun/core/repr_utils_test.py
CHANGED
@@ -17,6 +17,7 @@ import io
|
|
17
17
|
import unittest
|
18
18
|
|
19
19
|
from langfun.core import repr_utils
|
20
|
+
import pyglove as pg
|
20
21
|
|
21
22
|
|
22
23
|
class SharingContentTest(unittest.TestCase):
|
@@ -53,6 +54,19 @@ class SharingContentTest(unittest.TestCase):
|
|
53
54
|
self.assertEqual(ctx1['<style>b</style>'], 2)
|
54
55
|
self.assertEqual(ctx1['<style>a</style>'], 4)
|
55
56
|
|
57
|
+
def test_html(self):
|
58
|
+
html = repr_utils.Html('<div>foo</div>')
|
59
|
+
self.assertEqual(html.content, '<div>foo</div>')
|
60
|
+
self.assertEqual(html._repr_html_(), '<div>foo</div>')
|
61
|
+
|
62
|
+
def test_html_repr(self):
|
63
|
+
class Foo(pg.Object):
|
64
|
+
x: int
|
65
|
+
|
66
|
+
html = repr_utils.html_repr({'foo': pg.Ref(Foo(1))})
|
67
|
+
self.assertIn('foo</span>', html)
|
68
|
+
self.assertNotIn('Ref', html)
|
69
|
+
|
56
70
|
|
57
71
|
if __name__ == '__main__':
|
58
72
|
unittest.main()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
langfun/__init__.py,sha256=ZqERg4fvvtFwr5L41Lfev9FSuCBm8PbQrZmcKvvloxE,2274
|
2
|
-
langfun/core/__init__.py,sha256=
|
2
|
+
langfun/core/__init__.py,sha256=r86kuy-BiJIveqnXx5OklUUXtMG3q79nWRBum6zFOCQ,4835
|
3
3
|
langfun/core/component.py,sha256=Icyoj9ICoJoK2r2PHbrFXbxnseOr9QZZOvKWklLWNo8,10276
|
4
4
|
langfun/core/component_test.py,sha256=q15Xn51cVTu2RKxZ9U5VQgT3bm6RQ4638bKhWBtvW5o,8220
|
5
5
|
langfun/core/concurrent.py,sha256=TRc49pJ3HQro2kb5FtcWkHjhBm8UcgE8RJybU5cU3-0,24537
|
@@ -10,17 +10,17 @@ langfun/core/langfunc.py,sha256=RvIcRjIq0jWYRu1xim-FYe4HSrt97r3GMBO_PuagUmw,1106
|
|
10
10
|
langfun/core/langfunc_test.py,sha256=lyt-UzkD8972cxZwzCkps0_RMLeSsOBrcUFIW-fB6us,8653
|
11
11
|
langfun/core/language_model.py,sha256=ihcLy7WWrUByZ4Yfikb2OBppM6QGwMyjTYecBzelNCs,24028
|
12
12
|
langfun/core/language_model_test.py,sha256=TlNmVUfBfDQZzIiiBqCBTrxgcoyj2qNp3kONvmr2pX4,21273
|
13
|
-
langfun/core/logging.py,sha256=
|
14
|
-
langfun/core/logging_test.py,sha256=
|
13
|
+
langfun/core/logging.py,sha256=oDSeqGIQogZJ6xuPTcr9mkmLC2YnLP67UHtTdWbbiVY,4250
|
14
|
+
langfun/core/logging_test.py,sha256=poSsNGKi6G9LWOcWnTY0BQjj0BtaQknH-NK6FcQrVT4,2152
|
15
15
|
langfun/core/memory.py,sha256=f-asN1F7Vehgdn_fK84v73GrEUOxRtaW934keutTKjk,2416
|
16
|
-
langfun/core/message.py,sha256=
|
17
|
-
langfun/core/message_test.py,sha256=
|
16
|
+
langfun/core/message.py,sha256=XmVIuj4g9t2P3pdpisDfvxQnmVReBaIj4iU4MBeWskI,18255
|
17
|
+
langfun/core/message_test.py,sha256=7l3gSVqzVl4bUGwPU-L0gMPbjFODW0MVjWHzW4JlaaQ,12085
|
18
18
|
langfun/core/modality.py,sha256=Tla4t86DUYHpbZ2G7dy1r19fTj_Ga5XOvlYp6lbWa-Q,3512
|
19
19
|
langfun/core/modality_test.py,sha256=HyZ5xONKQ0Fw18SzoWAq-Ob9njOXIIjBo1hNtw-rudw,2400
|
20
20
|
langfun/core/natural_language.py,sha256=3ynSnaYQnjE60LIPK5fyMgdIjubnPYZwzGq4rWPeloE,1177
|
21
21
|
langfun/core/natural_language_test.py,sha256=LHGU_1ytbkGuSZQFIFP7vP3dBlcY4-A12fT6dbjUA0E,1424
|
22
|
-
langfun/core/repr_utils.py,sha256=
|
23
|
-
langfun/core/repr_utils_test.py,sha256
|
22
|
+
langfun/core/repr_utils.py,sha256=nKB9U4-8NE8qjx7Zl2g1yXLCbpM6Niq38ReMSyPtfJQ,5512
|
23
|
+
langfun/core/repr_utils_test.py,sha256=Z018ULMZ8cgmygAH4dNnKBEKduBC7bl1-tZClD1pv9g,2606
|
24
24
|
langfun/core/sampling.py,sha256=vygWvgC8MFw0_AKNSmz-ywMXJYWf8cl0tI8QycvAmyI,5795
|
25
25
|
langfun/core/sampling_test.py,sha256=U7PANpMsl9E_pa4_Y4FzesSjcwg-u-LKHGCWSgv-8FY,3663
|
26
26
|
langfun/core/subscription.py,sha256=euawEuSZP-BHydaT-AQpfYFL0m5pWPGcW0upFhrojqc,10930
|
@@ -44,7 +44,7 @@ langfun/core/coding/python/parsing_test.py,sha256=9vAWF484kWIm6JZq8NFiMgKUDhXV-d
|
|
44
44
|
langfun/core/coding/python/permissions.py,sha256=1QWGHvzL8MM0Ok_auQ9tURqZHtdOfJaDpBzZ29GUE-c,2544
|
45
45
|
langfun/core/coding/python/permissions_test.py,sha256=w5EDb8QxpxgJyZkojyzVWQvDfg366zn99-g__6TbPQ0,2699
|
46
46
|
langfun/core/eval/__init__.py,sha256=Evt-E4FEhZF2tXL6-byh_AyA7Cc_ZoGmvnN7vkAZedk,1898
|
47
|
-
langfun/core/eval/base.py,sha256=
|
47
|
+
langfun/core/eval/base.py,sha256=D9l1qkg1hS7zxpXKIecmYZf_2CZaDt16TfMl3t7f7Pw,73660
|
48
48
|
langfun/core/eval/base_test.py,sha256=cHOTIWVW4Dp8gKKIKcZrAcJ-w84j2GIozTzJoiAX7p4,26743
|
49
49
|
langfun/core/eval/matching.py,sha256=9GX8HfO9jKxgNLAivgy5K88Xhoh6Z7Pptq65pe7vht8,9762
|
50
50
|
langfun/core/eval/matching_test.py,sha256=f7iVyXH5KGJBWt4Wp14Bt9J3X59A6Ayfog9MbuFvPew,5532
|
@@ -117,8 +117,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
|
|
117
117
|
langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
|
118
118
|
langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
|
119
119
|
langfun/core/templates/selfplay_test.py,sha256=rBW2Qr8yi-aWYwoTwRR-n1peKyMX9QXPZXURjLgoiRs,2264
|
120
|
-
langfun-0.1.1.
|
121
|
-
langfun-0.1.1.
|
122
|
-
langfun-0.1.1.
|
123
|
-
langfun-0.1.1.
|
124
|
-
langfun-0.1.1.
|
120
|
+
langfun-0.1.1.dev20240807.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
121
|
+
langfun-0.1.1.dev20240807.dist-info/METADATA,sha256=5kw0M-Bwa124E0zuO_XSQyXbTra-ztMOmMEvx1p8ntU,5234
|
122
|
+
langfun-0.1.1.dev20240807.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
123
|
+
langfun-0.1.1.dev20240807.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
|
124
|
+
langfun-0.1.1.dev20240807.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|