Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- llmeval-env/lib/python3.10/site-packages/_yaml/__init__.py +33 -0
- llmeval-env/lib/python3.10/site-packages/_yaml/__pycache__/__init__.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/async_timeout/__init__.py +239 -0
- llmeval-env/lib/python3.10/site-packages/async_timeout/__pycache__/__init__.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/async_timeout/py.typed +1 -0
- llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/INSTALLER +1 -0
- llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/METADATA +56 -0
- llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/RECORD +22 -0
- llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/WHEEL +4 -0
- llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/licenses/LICENSE +24 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__init__.py +13 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/__init__.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/__version__.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/_binary_ext_checker.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/_func.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/_mbstrdecoder.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__version__.py +6 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/_binary_ext_checker.py +264 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/_func.py +56 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/_mbstrdecoder.py +291 -0
- llmeval-env/lib/python3.10/site-packages/mbstrdecoder/py.typed +0 -0
- llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/INSTALLER +1 -0
- llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/METADATA +35 -0
- llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/RECORD +16 -0
- llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/WHEEL +5 -0
- llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/top_level.txt +1 -0
- llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/INSTALLER +1 -0
- llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/LICENSE +175 -0
- llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/METADATA +122 -0
- llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/RECORD +42 -0
- llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/WHEEL +5 -0
- llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/top_level.txt +1 -0
- llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/INSTALLER +1 -0
- llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/METADATA +127 -0
- llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/RECORD +21 -0
- llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/WHEEL +4 -0
- llmeval-env/lib/python3.10/site-packages/setuptools-59.6.0.dist-info/WHEEL +5 -0
- llmeval-env/lib/python3.10/site-packages/setuptools-59.6.0.dist-info/entry_points.txt +56 -0
- llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/INSTALLER +1 -0
- llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/LICENSE +21 -0
- llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/METADATA +102 -0
- llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/RECORD +29 -0
- llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/WHEEL +5 -0
- llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/top_level.txt +1 -0
- llmeval-env/lib/python3.10/site-packages/torch/_refs/__init__.py +0 -0
- llmeval-env/lib/python3.10/site-packages/torch/_refs/__pycache__/__init__.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/torch/_refs/__pycache__/_conversions.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/torch/_refs/__pycache__/fft.cpython-310.pyc +0 -0
- llmeval-env/lib/python3.10/site-packages/torch/_refs/_conversions.py +118 -0
- llmeval-env/lib/python3.10/site-packages/torch/_refs/linalg/__init__.py +308 -0
llmeval-env/lib/python3.10/site-packages/_yaml/__init__.py
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This is a stub package designed to roughly emulate the _yaml
|
2 |
+
# extension module, which previously existed as a standalone module
|
3 |
+
# and has been moved into the `yaml` package namespace.
|
4 |
+
# It does not perfectly mimic its old counterpart, but should get
|
5 |
+
# close enough for anyone who's relying on it even when they shouldn't.
|
6 |
+
import yaml
|
7 |
+
|
8 |
+
# in some circumstances, the yaml module we imoprted may be from a different version, so we need
|
9 |
+
# to tread carefully when poking at it here (it may not have the attributes we expect)
|
10 |
+
if not getattr(yaml, '__with_libyaml__', False):
|
11 |
+
from sys import version_info
|
12 |
+
|
13 |
+
exc = ModuleNotFoundError if version_info >= (3, 6) else ImportError
|
14 |
+
raise exc("No module named '_yaml'")
|
15 |
+
else:
|
16 |
+
from yaml._yaml import *
|
17 |
+
import warnings
|
18 |
+
warnings.warn(
|
19 |
+
'The _yaml extension module is now located at yaml._yaml'
|
20 |
+
' and its location is subject to change. To use the'
|
21 |
+
' LibYAML-based parser and emitter, import from `yaml`:'
|
22 |
+
' `from yaml import CLoader as Loader, CDumper as Dumper`.',
|
23 |
+
DeprecationWarning
|
24 |
+
)
|
25 |
+
del warnings
|
26 |
+
# Don't `del yaml` here because yaml is actually an existing
|
27 |
+
# namespace member of _yaml.
|
28 |
+
|
29 |
+
__name__ = '_yaml'
|
30 |
+
# If the module is top-level (i.e. not a part of any specific package)
|
31 |
+
# then the attribute should be set to ''.
|
32 |
+
# https://docs.python.org/3.8/library/types.html
|
33 |
+
__package__ = ''
|
llmeval-env/lib/python3.10/site-packages/_yaml/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (740 Bytes). View file
|
|
llmeval-env/lib/python3.10/site-packages/async_timeout/__init__.py
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import asyncio
|
2 |
+
import enum
|
3 |
+
import sys
|
4 |
+
import warnings
|
5 |
+
from types import TracebackType
|
6 |
+
from typing import Optional, Type
|
7 |
+
|
8 |
+
|
9 |
+
if sys.version_info >= (3, 8):
|
10 |
+
from typing import final
|
11 |
+
else:
|
12 |
+
from typing_extensions import final
|
13 |
+
|
14 |
+
|
15 |
+
if sys.version_info >= (3, 11):
|
16 |
+
|
17 |
+
def _uncancel_task(task: "asyncio.Task[object]") -> None:
|
18 |
+
task.uncancel()
|
19 |
+
|
20 |
+
else:
|
21 |
+
|
22 |
+
def _uncancel_task(task: "asyncio.Task[object]") -> None:
|
23 |
+
pass
|
24 |
+
|
25 |
+
|
26 |
+
__version__ = "4.0.3"
|
27 |
+
|
28 |
+
|
29 |
+
__all__ = ("timeout", "timeout_at", "Timeout")
|
30 |
+
|
31 |
+
|
32 |
+
def timeout(delay: Optional[float]) -> "Timeout":
|
33 |
+
"""timeout context manager.
|
34 |
+
|
35 |
+
Useful in cases when you want to apply timeout logic around block
|
36 |
+
of code or in cases when asyncio.wait_for is not suitable. For example:
|
37 |
+
|
38 |
+
>>> async with timeout(0.001):
|
39 |
+
... async with aiohttp.get('https://github.com') as r:
|
40 |
+
... await r.text()
|
41 |
+
|
42 |
+
|
43 |
+
delay - value in seconds or None to disable timeout logic
|
44 |
+
"""
|
45 |
+
loop = asyncio.get_running_loop()
|
46 |
+
if delay is not None:
|
47 |
+
deadline = loop.time() + delay # type: Optional[float]
|
48 |
+
else:
|
49 |
+
deadline = None
|
50 |
+
return Timeout(deadline, loop)
|
51 |
+
|
52 |
+
|
53 |
+
def timeout_at(deadline: Optional[float]) -> "Timeout":
|
54 |
+
"""Schedule the timeout at absolute time.
|
55 |
+
|
56 |
+
deadline argument points on the time in the same clock system
|
57 |
+
as loop.time().
|
58 |
+
|
59 |
+
Please note: it is not POSIX time but a time with
|
60 |
+
undefined starting base, e.g. the time of the system power on.
|
61 |
+
|
62 |
+
>>> async with timeout_at(loop.time() + 10):
|
63 |
+
... async with aiohttp.get('https://github.com') as r:
|
64 |
+
... await r.text()
|
65 |
+
|
66 |
+
|
67 |
+
"""
|
68 |
+
loop = asyncio.get_running_loop()
|
69 |
+
return Timeout(deadline, loop)
|
70 |
+
|
71 |
+
|
72 |
+
class _State(enum.Enum):
|
73 |
+
INIT = "INIT"
|
74 |
+
ENTER = "ENTER"
|
75 |
+
TIMEOUT = "TIMEOUT"
|
76 |
+
EXIT = "EXIT"
|
77 |
+
|
78 |
+
|
79 |
+
@final
|
80 |
+
class Timeout:
|
81 |
+
# Internal class, please don't instantiate it directly
|
82 |
+
# Use timeout() and timeout_at() public factories instead.
|
83 |
+
#
|
84 |
+
# Implementation note: `async with timeout()` is preferred
|
85 |
+
# over `with timeout()`.
|
86 |
+
# While technically the Timeout class implementation
|
87 |
+
# doesn't need to be async at all,
|
88 |
+
# the `async with` statement explicitly points that
|
89 |
+
# the context manager should be used from async function context.
|
90 |
+
#
|
91 |
+
# This design allows to avoid many silly misusages.
|
92 |
+
#
|
93 |
+
# TimeoutError is raised immediately when scheduled
|
94 |
+
# if the deadline is passed.
|
95 |
+
# The purpose is to time out as soon as possible
|
96 |
+
# without waiting for the next await expression.
|
97 |
+
|
98 |
+
__slots__ = ("_deadline", "_loop", "_state", "_timeout_handler", "_task")
|
99 |
+
|
100 |
+
def __init__(
|
101 |
+
self, deadline: Optional[float], loop: asyncio.AbstractEventLoop
|
102 |
+
) -> None:
|
103 |
+
self._loop = loop
|
104 |
+
self._state = _State.INIT
|
105 |
+
|
106 |
+
self._task: Optional["asyncio.Task[object]"] = None
|
107 |
+
self._timeout_handler = None # type: Optional[asyncio.Handle]
|
108 |
+
if deadline is None:
|
109 |
+
self._deadline = None # type: Optional[float]
|
110 |
+
else:
|
111 |
+
self.update(deadline)
|
112 |
+
|
113 |
+
def __enter__(self) -> "Timeout":
|
114 |
+
warnings.warn(
|
115 |
+
"with timeout() is deprecated, use async with timeout() instead",
|
116 |
+
DeprecationWarning,
|
117 |
+
stacklevel=2,
|
118 |
+
)
|
119 |
+
self._do_enter()
|
120 |
+
return self
|
121 |
+
|
122 |
+
def __exit__(
|
123 |
+
self,
|
124 |
+
exc_type: Optional[Type[BaseException]],
|
125 |
+
exc_val: Optional[BaseException],
|
126 |
+
exc_tb: Optional[TracebackType],
|
127 |
+
) -> Optional[bool]:
|
128 |
+
self._do_exit(exc_type)
|
129 |
+
return None
|
130 |
+
|
131 |
+
async def __aenter__(self) -> "Timeout":
|
132 |
+
self._do_enter()
|
133 |
+
return self
|
134 |
+
|
135 |
+
async def __aexit__(
|
136 |
+
self,
|
137 |
+
exc_type: Optional[Type[BaseException]],
|
138 |
+
exc_val: Optional[BaseException],
|
139 |
+
exc_tb: Optional[TracebackType],
|
140 |
+
) -> Optional[bool]:
|
141 |
+
self._do_exit(exc_type)
|
142 |
+
return None
|
143 |
+
|
144 |
+
@property
|
145 |
+
def expired(self) -> bool:
|
146 |
+
"""Is timeout expired during execution?"""
|
147 |
+
return self._state == _State.TIMEOUT
|
148 |
+
|
149 |
+
@property
|
150 |
+
def deadline(self) -> Optional[float]:
|
151 |
+
return self._deadline
|
152 |
+
|
153 |
+
def reject(self) -> None:
|
154 |
+
"""Reject scheduled timeout if any."""
|
155 |
+
# cancel is maybe better name but
|
156 |
+
# task.cancel() raises CancelledError in asyncio world.
|
157 |
+
if self._state not in (_State.INIT, _State.ENTER):
|
158 |
+
raise RuntimeError(f"invalid state {self._state.value}")
|
159 |
+
self._reject()
|
160 |
+
|
161 |
+
def _reject(self) -> None:
|
162 |
+
self._task = None
|
163 |
+
if self._timeout_handler is not None:
|
164 |
+
self._timeout_handler.cancel()
|
165 |
+
self._timeout_handler = None
|
166 |
+
|
167 |
+
def shift(self, delay: float) -> None:
|
168 |
+
"""Advance timeout on delay seconds.
|
169 |
+
|
170 |
+
The delay can be negative.
|
171 |
+
|
172 |
+
Raise RuntimeError if shift is called when deadline is not scheduled
|
173 |
+
"""
|
174 |
+
deadline = self._deadline
|
175 |
+
if deadline is None:
|
176 |
+
raise RuntimeError("cannot shift timeout if deadline is not scheduled")
|
177 |
+
self.update(deadline + delay)
|
178 |
+
|
179 |
+
def update(self, deadline: float) -> None:
|
180 |
+
"""Set deadline to absolute value.
|
181 |
+
|
182 |
+
deadline argument points on the time in the same clock system
|
183 |
+
as loop.time().
|
184 |
+
|
185 |
+
If new deadline is in the past the timeout is raised immediately.
|
186 |
+
|
187 |
+
Please note: it is not POSIX time but a time with
|
188 |
+
undefined starting base, e.g. the time of the system power on.
|
189 |
+
"""
|
190 |
+
if self._state == _State.EXIT:
|
191 |
+
raise RuntimeError("cannot reschedule after exit from context manager")
|
192 |
+
if self._state == _State.TIMEOUT:
|
193 |
+
raise RuntimeError("cannot reschedule expired timeout")
|
194 |
+
if self._timeout_handler is not None:
|
195 |
+
self._timeout_handler.cancel()
|
196 |
+
self._deadline = deadline
|
197 |
+
if self._state != _State.INIT:
|
198 |
+
self._reschedule()
|
199 |
+
|
200 |
+
def _reschedule(self) -> None:
|
201 |
+
assert self._state == _State.ENTER
|
202 |
+
deadline = self._deadline
|
203 |
+
if deadline is None:
|
204 |
+
return
|
205 |
+
|
206 |
+
now = self._loop.time()
|
207 |
+
if self._timeout_handler is not None:
|
208 |
+
self._timeout_handler.cancel()
|
209 |
+
|
210 |
+
self._task = asyncio.current_task()
|
211 |
+
if deadline <= now:
|
212 |
+
self._timeout_handler = self._loop.call_soon(self._on_timeout)
|
213 |
+
else:
|
214 |
+
self._timeout_handler = self._loop.call_at(deadline, self._on_timeout)
|
215 |
+
|
216 |
+
def _do_enter(self) -> None:
|
217 |
+
if self._state != _State.INIT:
|
218 |
+
raise RuntimeError(f"invalid state {self._state.value}")
|
219 |
+
self._state = _State.ENTER
|
220 |
+
self._reschedule()
|
221 |
+
|
222 |
+
def _do_exit(self, exc_type: Optional[Type[BaseException]]) -> None:
|
223 |
+
if exc_type is asyncio.CancelledError and self._state == _State.TIMEOUT:
|
224 |
+
assert self._task is not None
|
225 |
+
_uncancel_task(self._task)
|
226 |
+
self._timeout_handler = None
|
227 |
+
self._task = None
|
228 |
+
raise asyncio.TimeoutError
|
229 |
+
# timeout has not expired
|
230 |
+
self._state = _State.EXIT
|
231 |
+
self._reject()
|
232 |
+
return None
|
233 |
+
|
234 |
+
def _on_timeout(self) -> None:
|
235 |
+
assert self._task is not None
|
236 |
+
self._task.cancel()
|
237 |
+
self._state = _State.TIMEOUT
|
238 |
+
# drop the reference early
|
239 |
+
self._timeout_handler = None
|
llmeval-env/lib/python3.10/site-packages/async_timeout/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (6.57 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/async_timeout/py.typed
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Placeholder
|
llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip
|
llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/METADATA
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.3
|
2 |
+
Name: filelock
|
3 |
+
Version: 3.14.0
|
4 |
+
Summary: A platform independent file lock.
|
5 |
+
Project-URL: Documentation, https://py-filelock.readthedocs.io
|
6 |
+
Project-URL: Homepage, https://github.com/tox-dev/py-filelock
|
7 |
+
Project-URL: Source, https://github.com/tox-dev/py-filelock
|
8 |
+
Project-URL: Tracker, https://github.com/tox-dev/py-filelock/issues
|
9 |
+
Maintainer-email: Bernát Gábor <[email protected]>
|
10 |
+
License-Expression: Unlicense
|
11 |
+
License-File: LICENSE
|
12 |
+
Keywords: application,cache,directory,log,user
|
13 |
+
Classifier: Development Status :: 5 - Production/Stable
|
14 |
+
Classifier: Intended Audience :: Developers
|
15 |
+
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
|
16 |
+
Classifier: Operating System :: OS Independent
|
17 |
+
Classifier: Programming Language :: Python
|
18 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
19 |
+
Classifier: Programming Language :: Python :: 3.8
|
20 |
+
Classifier: Programming Language :: Python :: 3.9
|
21 |
+
Classifier: Programming Language :: Python :: 3.10
|
22 |
+
Classifier: Programming Language :: Python :: 3.11
|
23 |
+
Classifier: Programming Language :: Python :: 3.12
|
24 |
+
Classifier: Topic :: Internet
|
25 |
+
Classifier: Topic :: Software Development :: Libraries
|
26 |
+
Classifier: Topic :: System
|
27 |
+
Requires-Python: >=3.8
|
28 |
+
Provides-Extra: docs
|
29 |
+
Requires-Dist: furo>=2023.9.10; extra == 'docs'
|
30 |
+
Requires-Dist: sphinx-autodoc-typehints!=1.23.4,>=1.25.2; extra == 'docs'
|
31 |
+
Requires-Dist: sphinx>=7.2.6; extra == 'docs'
|
32 |
+
Provides-Extra: testing
|
33 |
+
Requires-Dist: covdefaults>=2.3; extra == 'testing'
|
34 |
+
Requires-Dist: coverage>=7.3.2; extra == 'testing'
|
35 |
+
Requires-Dist: diff-cover>=8.0.1; extra == 'testing'
|
36 |
+
Requires-Dist: pytest-cov>=4.1; extra == 'testing'
|
37 |
+
Requires-Dist: pytest-mock>=3.12; extra == 'testing'
|
38 |
+
Requires-Dist: pytest-timeout>=2.2; extra == 'testing'
|
39 |
+
Requires-Dist: pytest>=7.4.3; extra == 'testing'
|
40 |
+
Provides-Extra: typing
|
41 |
+
Requires-Dist: typing-extensions>=4.8; (python_version < '3.11') and extra == 'typing'
|
42 |
+
Description-Content-Type: text/markdown
|
43 |
+
|
44 |
+
# filelock
|
45 |
+
|
46 |
+
[](https://pypi.org/project/filelock/)
|
47 |
+
[](https://pypi.org/project/filelock/)
|
49 |
+
[](https://py-filelock.readthedocs.io/en/latest/?badge=latest)
|
51 |
+
[](https://github.com/psf/black)
|
53 |
+
[](https://pepy.tech/project/filelock)
|
54 |
+
[](https://github.com/tox-dev/py-filelock/actions/workflows/check.yml)
|
55 |
+
|
56 |
+
For more information checkout the [official documentation](https://py-filelock.readthedocs.io/en/latest/index.html).
|
llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/RECORD
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
filelock-3.14.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
2 |
+
filelock-3.14.0.dist-info/METADATA,sha256=nSDS4Bqd1Rtvf-PB_bDjn0Dgu2kuL2GGCE1vM33KrlA,2792
|
3 |
+
filelock-3.14.0.dist-info/RECORD,,
|
4 |
+
filelock-3.14.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
5 |
+
filelock-3.14.0.dist-info/licenses/LICENSE,sha256=iNm062BXnBkew5HKBMFhMFctfu3EqG2qWL8oxuFMm80,1210
|
6 |
+
filelock/__init__.py,sha256=c_wPy9Fo0fmqE4V448Q2A2dDYnMTZeAVHX-kUoN3KCY,1214
|
7 |
+
filelock/__pycache__/__init__.cpython-310.pyc,,
|
8 |
+
filelock/__pycache__/_api.cpython-310.pyc,,
|
9 |
+
filelock/__pycache__/_error.cpython-310.pyc,,
|
10 |
+
filelock/__pycache__/_soft.cpython-310.pyc,,
|
11 |
+
filelock/__pycache__/_unix.cpython-310.pyc,,
|
12 |
+
filelock/__pycache__/_util.cpython-310.pyc,,
|
13 |
+
filelock/__pycache__/_windows.cpython-310.pyc,,
|
14 |
+
filelock/__pycache__/version.cpython-310.pyc,,
|
15 |
+
filelock/_api.py,sha256=YrQpa5D3mB5VTEUZ8DHO1REvVu-WWmFRYgNaV3e6jOg,13028
|
16 |
+
filelock/_error.py,sha256=-5jMcjTu60YAvAO1UbqDD1GIEjVkwr8xCFwDBtMeYDg,787
|
17 |
+
filelock/_soft.py,sha256=haqtc_TB_KJbYv2a8iuEAclKuM4fMG1vTcp28sK919c,1711
|
18 |
+
filelock/_unix.py,sha256=-FXP0tjInBHUYygOlMpp4taUmD87QOkrD_4ybg_iT7Q,2259
|
19 |
+
filelock/_util.py,sha256=QHBoNFIYfbAThhotH3Q8E2acFc84wpG49-T-uu017ZE,1715
|
20 |
+
filelock/_windows.py,sha256=eMKL8dZKrgekf5VYVGR14an29JGEInRtUO8ui9ABywg,2177
|
21 |
+
filelock/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22 |
+
filelock/version.py,sha256=Ipjekae6alpGZC2b94mJAE2S2ZyJybTBe3oNCWsIFS4,413
|
llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/WHEEL
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: hatchling 1.24.2
|
3 |
+
Root-Is-Purelib: true
|
4 |
+
Tag: py3-none-any
|
llmeval-env/lib/python3.10/site-packages/filelock-3.14.0.dist-info/licenses/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This is free and unencumbered software released into the public domain.
|
2 |
+
|
3 |
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
4 |
+
distribute this software, either in source code form or as a compiled
|
5 |
+
binary, for any purpose, commercial or non-commercial, and by any
|
6 |
+
means.
|
7 |
+
|
8 |
+
In jurisdictions that recognize copyright laws, the author or authors
|
9 |
+
of this software dedicate any and all copyright interest in the
|
10 |
+
software to the public domain. We make this dedication for the benefit
|
11 |
+
of the public at large and to the detriment of our heirs and
|
12 |
+
successors. We intend this dedication to be an overt act of
|
13 |
+
relinquishment in perpetuity of all present and future rights to this
|
14 |
+
software under copyright law.
|
15 |
+
|
16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19 |
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
20 |
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21 |
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
23 |
+
|
24 |
+
For more information, please refer to <http://unlicense.org>
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__init__.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
|
3 |
+
"""
|
4 |
+
|
5 |
+
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
|
6 |
+
from ._func import detect_file_encoding
|
7 |
+
from ._mbstrdecoder import MultiByteStrDecoder
|
8 |
+
|
9 |
+
|
10 |
+
__all__ = (
|
11 |
+
"detect_file_encoding",
|
12 |
+
"MultiByteStrDecoder",
|
13 |
+
)
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (522 Bytes). View file
|
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/__version__.cpython-310.pyc
ADDED
Binary file (391 Bytes). View file
|
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/_binary_ext_checker.cpython-310.pyc
ADDED
Binary file (1.86 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/_func.cpython-310.pyc
ADDED
Binary file (1.6 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__pycache__/_mbstrdecoder.cpython-310.pyc
ADDED
Binary file (6.04 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/__version__.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
__author__ = "Tsuyoshi Hombashi"
|
2 |
+
__copyright__ = f"Copyright 2016, {__author__}"
|
3 |
+
__license__ = "MIT License"
|
4 |
+
__version__ = "1.1.3"
|
5 |
+
__maintainer__ = __author__
|
6 |
+
__email__ = "[email protected]"
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/_binary_ext_checker.py
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
|
3 |
+
"""
|
4 |
+
|
5 |
+
import os.path
|
6 |
+
|
7 |
+
|
8 |
+
# list from https://github.com/sindresorhus/binary-extensions
|
9 |
+
binary_exts = (
|
10 |
+
"3dm",
|
11 |
+
"3ds",
|
12 |
+
"3g2",
|
13 |
+
"3gp",
|
14 |
+
"7z",
|
15 |
+
"a",
|
16 |
+
"aac",
|
17 |
+
"adp",
|
18 |
+
"ai",
|
19 |
+
"aif",
|
20 |
+
"aiff",
|
21 |
+
"alz",
|
22 |
+
"ape",
|
23 |
+
"apk",
|
24 |
+
"ar",
|
25 |
+
"arj",
|
26 |
+
"asf",
|
27 |
+
"au",
|
28 |
+
"avi",
|
29 |
+
"bak",
|
30 |
+
"baml",
|
31 |
+
"bh",
|
32 |
+
"bin",
|
33 |
+
"bk",
|
34 |
+
"bmp",
|
35 |
+
"btif",
|
36 |
+
"bz2",
|
37 |
+
"bzip2",
|
38 |
+
"cab",
|
39 |
+
"caf",
|
40 |
+
"cgm",
|
41 |
+
"class",
|
42 |
+
"cmx",
|
43 |
+
"cpio",
|
44 |
+
"cr2",
|
45 |
+
"cur",
|
46 |
+
"dat",
|
47 |
+
"dcm",
|
48 |
+
"deb",
|
49 |
+
"dex",
|
50 |
+
"djvu",
|
51 |
+
"dll",
|
52 |
+
"dmg",
|
53 |
+
"dng",
|
54 |
+
"doc",
|
55 |
+
"docm",
|
56 |
+
"docx",
|
57 |
+
"dot",
|
58 |
+
"dotm",
|
59 |
+
"dra",
|
60 |
+
"DS_Store",
|
61 |
+
"dsk",
|
62 |
+
"dts",
|
63 |
+
"dtshd",
|
64 |
+
"dvb",
|
65 |
+
"dwg",
|
66 |
+
"dxf",
|
67 |
+
"ecelp4800",
|
68 |
+
"ecelp7470",
|
69 |
+
"ecelp9600",
|
70 |
+
"egg",
|
71 |
+
"eol",
|
72 |
+
"eot",
|
73 |
+
"epub",
|
74 |
+
"exe",
|
75 |
+
"f4v",
|
76 |
+
"fbs",
|
77 |
+
"fh",
|
78 |
+
"fla",
|
79 |
+
"flac",
|
80 |
+
"fli",
|
81 |
+
"flv",
|
82 |
+
"fpx",
|
83 |
+
"fst",
|
84 |
+
"fvt",
|
85 |
+
"g3",
|
86 |
+
"gh",
|
87 |
+
"gif",
|
88 |
+
"graffle",
|
89 |
+
"gz",
|
90 |
+
"gzip",
|
91 |
+
"h261",
|
92 |
+
"h263",
|
93 |
+
"h264",
|
94 |
+
"icns",
|
95 |
+
"ico",
|
96 |
+
"ief",
|
97 |
+
"img",
|
98 |
+
"ipa",
|
99 |
+
"iso",
|
100 |
+
"jar",
|
101 |
+
"jpeg",
|
102 |
+
"jpg",
|
103 |
+
"jpgv",
|
104 |
+
"jpm",
|
105 |
+
"jxr",
|
106 |
+
"key",
|
107 |
+
"ktx",
|
108 |
+
"lha",
|
109 |
+
"lib",
|
110 |
+
"lvp",
|
111 |
+
"lz",
|
112 |
+
"lzh",
|
113 |
+
"lzma",
|
114 |
+
"lzo",
|
115 |
+
"m3u",
|
116 |
+
"m4a",
|
117 |
+
"m4v",
|
118 |
+
"mar",
|
119 |
+
"mdi",
|
120 |
+
"mht",
|
121 |
+
"mid",
|
122 |
+
"midi",
|
123 |
+
"mj2",
|
124 |
+
"mka",
|
125 |
+
"mkv",
|
126 |
+
"mmr",
|
127 |
+
"mng",
|
128 |
+
"mobi",
|
129 |
+
"mov",
|
130 |
+
"movie",
|
131 |
+
"mp3",
|
132 |
+
"mp4",
|
133 |
+
"mp4a",
|
134 |
+
"mpeg",
|
135 |
+
"mpg",
|
136 |
+
"mpga",
|
137 |
+
"mxu",
|
138 |
+
"nef",
|
139 |
+
"npx",
|
140 |
+
"numbers",
|
141 |
+
"nupkg",
|
142 |
+
"o",
|
143 |
+
"oga",
|
144 |
+
"ogg",
|
145 |
+
"ogv",
|
146 |
+
"otf",
|
147 |
+
"pages",
|
148 |
+
"pbm",
|
149 |
+
"pcx",
|
150 |
+
"pdb",
|
151 |
+
"pdf",
|
152 |
+
"pea",
|
153 |
+
"pgm",
|
154 |
+
"pic",
|
155 |
+
"png",
|
156 |
+
"pnm",
|
157 |
+
"pot",
|
158 |
+
"potm",
|
159 |
+
"potx",
|
160 |
+
"ppa",
|
161 |
+
"ppam",
|
162 |
+
"ppm",
|
163 |
+
"pps",
|
164 |
+
"ppsm",
|
165 |
+
"ppsx",
|
166 |
+
"ppt",
|
167 |
+
"pptm",
|
168 |
+
"pptx",
|
169 |
+
"psd",
|
170 |
+
"pya",
|
171 |
+
"pyc",
|
172 |
+
"pyo",
|
173 |
+
"pyv",
|
174 |
+
"qt",
|
175 |
+
"rar",
|
176 |
+
"ras",
|
177 |
+
"raw",
|
178 |
+
"resources",
|
179 |
+
"rgb",
|
180 |
+
"rip",
|
181 |
+
"rlc",
|
182 |
+
"rmf",
|
183 |
+
"rmvb",
|
184 |
+
"rtf",
|
185 |
+
"rz",
|
186 |
+
"s3m",
|
187 |
+
"s7z",
|
188 |
+
"scpt",
|
189 |
+
"sgi",
|
190 |
+
"shar",
|
191 |
+
"sil",
|
192 |
+
"sketch",
|
193 |
+
"slk",
|
194 |
+
"smv",
|
195 |
+
"snk",
|
196 |
+
"so",
|
197 |
+
"stl",
|
198 |
+
"suo",
|
199 |
+
"sub",
|
200 |
+
"swf",
|
201 |
+
"tar",
|
202 |
+
"tbz",
|
203 |
+
"tbz2",
|
204 |
+
"tga",
|
205 |
+
"tgz",
|
206 |
+
"thmx",
|
207 |
+
"tif",
|
208 |
+
"tiff",
|
209 |
+
"tlz",
|
210 |
+
"ttc",
|
211 |
+
"ttf",
|
212 |
+
"txz",
|
213 |
+
"udf",
|
214 |
+
"uvh",
|
215 |
+
"uvi",
|
216 |
+
"uvm",
|
217 |
+
"uvp",
|
218 |
+
"uvs",
|
219 |
+
"uvu",
|
220 |
+
"viv",
|
221 |
+
"vob",
|
222 |
+
"war",
|
223 |
+
"wav",
|
224 |
+
"wax",
|
225 |
+
"wbmp",
|
226 |
+
"wdp",
|
227 |
+
"weba",
|
228 |
+
"webm",
|
229 |
+
"webp",
|
230 |
+
"whl",
|
231 |
+
"wim",
|
232 |
+
"wm",
|
233 |
+
"wma",
|
234 |
+
"wmv",
|
235 |
+
"wmx",
|
236 |
+
"woff",
|
237 |
+
"woff2",
|
238 |
+
"wrm",
|
239 |
+
"wvx",
|
240 |
+
"xbm",
|
241 |
+
"xif",
|
242 |
+
"xla",
|
243 |
+
"xlam",
|
244 |
+
"xls",
|
245 |
+
"xlsb",
|
246 |
+
"xlsm",
|
247 |
+
"xlsx",
|
248 |
+
"xlt",
|
249 |
+
"xltm",
|
250 |
+
"xltx",
|
251 |
+
"xm",
|
252 |
+
"xmind",
|
253 |
+
"xpi",
|
254 |
+
"xpm",
|
255 |
+
"xwd",
|
256 |
+
"xz",
|
257 |
+
"z",
|
258 |
+
"zip",
|
259 |
+
"zipx",
|
260 |
+
)
|
261 |
+
|
262 |
+
|
263 |
+
def is_binary_ext_path(filepath) -> bool:
|
264 |
+
return os.path.splitext(filepath)[1].lstrip(".") in binary_exts
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/_func.py
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
|
3 |
+
"""
|
4 |
+
|
5 |
+
import os
|
6 |
+
import stat
|
7 |
+
from errno import EBADF, ENOENT, ENOTDIR
|
8 |
+
from typing import Optional, Union
|
9 |
+
|
10 |
+
from ._binary_ext_checker import is_binary_ext_path
|
11 |
+
|
12 |
+
|
13 |
+
def is_fifo(file_path: Union[int, bytes, str]) -> bool:
|
14 |
+
try:
|
15 |
+
return stat.S_ISFIFO(os.stat(file_path).st_mode)
|
16 |
+
except OSError as e:
|
17 |
+
if e.errno not in (ENOENT, ENOTDIR, EBADF):
|
18 |
+
raise
|
19 |
+
|
20 |
+
return False
|
21 |
+
except ValueError:
|
22 |
+
return False
|
23 |
+
|
24 |
+
|
25 |
+
def to_codec_name(name: Optional[str]) -> Optional[str]:
|
26 |
+
if not name:
|
27 |
+
return None
|
28 |
+
|
29 |
+
return name.lower().replace("-", "_")
|
30 |
+
|
31 |
+
|
32 |
+
def detect_file_encoding(file_path) -> Optional[str]:
|
33 |
+
from chardet.universaldetector import UniversalDetector
|
34 |
+
|
35 |
+
if not os.path.isfile(file_path) or is_binary_ext_path(file_path) or is_fifo(file_path):
|
36 |
+
return None
|
37 |
+
|
38 |
+
detector = UniversalDetector()
|
39 |
+
READ_SIZE = 4 * 1024
|
40 |
+
|
41 |
+
try:
|
42 |
+
with open(file_path, mode="rb") as f:
|
43 |
+
while True:
|
44 |
+
binary = f.read(READ_SIZE)
|
45 |
+
if not binary:
|
46 |
+
break
|
47 |
+
|
48 |
+
detector.feed(binary)
|
49 |
+
if detector.done:
|
50 |
+
break
|
51 |
+
except OSError:
|
52 |
+
return None
|
53 |
+
finally:
|
54 |
+
detector.close()
|
55 |
+
|
56 |
+
return to_codec_name(detector.result.get("encoding"))
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/_mbstrdecoder.py
ADDED
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
.. codeauthor:: Tsuyoshi Hombashi <[email protected]>
|
3 |
+
"""
|
4 |
+
|
5 |
+
import copy
|
6 |
+
import re
|
7 |
+
from typing import List, Optional, Sequence
|
8 |
+
|
9 |
+
from ._func import to_codec_name
|
10 |
+
|
11 |
+
|
12 |
+
def b(s: str) -> bytes:
|
13 |
+
return s.encode("latin-1")
|
14 |
+
|
15 |
+
|
16 |
+
class MultiByteStrDecoder:
|
17 |
+
"""
|
18 |
+
Reference:
|
19 |
+
https://docs.python.org/3/library/codecs.html
|
20 |
+
"""
|
21 |
+
|
22 |
+
__CODECS = [
|
23 |
+
"utf_7",
|
24 |
+
"utf_8",
|
25 |
+
"utf_8_sig",
|
26 |
+
"utf_16",
|
27 |
+
"utf_16_be",
|
28 |
+
"utf_16_le",
|
29 |
+
"utf_32",
|
30 |
+
"utf_32_be",
|
31 |
+
"utf_32_le",
|
32 |
+
"big5",
|
33 |
+
"big5hkscs",
|
34 |
+
"cp037",
|
35 |
+
"cp424",
|
36 |
+
"cp437",
|
37 |
+
"cp500",
|
38 |
+
"cp720",
|
39 |
+
"cp737",
|
40 |
+
"cp775",
|
41 |
+
"cp850",
|
42 |
+
"cp852",
|
43 |
+
"cp855",
|
44 |
+
"cp856",
|
45 |
+
"cp857",
|
46 |
+
"cp858",
|
47 |
+
"cp860",
|
48 |
+
"cp861",
|
49 |
+
"cp862",
|
50 |
+
"cp863",
|
51 |
+
"cp864",
|
52 |
+
"cp865",
|
53 |
+
"cp866",
|
54 |
+
"cp869",
|
55 |
+
"cp874",
|
56 |
+
"cp875",
|
57 |
+
"cp932",
|
58 |
+
"cp949",
|
59 |
+
"cp950",
|
60 |
+
"cp1006",
|
61 |
+
"cp1026",
|
62 |
+
"cp1140",
|
63 |
+
"cp1250",
|
64 |
+
"cp1251",
|
65 |
+
"cp1252",
|
66 |
+
"cp1253",
|
67 |
+
"cp1254",
|
68 |
+
"cp1255",
|
69 |
+
"cp1256",
|
70 |
+
"cp1257",
|
71 |
+
"cp1258",
|
72 |
+
"euc_jp",
|
73 |
+
"euc_jis_2004",
|
74 |
+
"euc_jisx0213",
|
75 |
+
"euc_kr",
|
76 |
+
"gb2312",
|
77 |
+
"gbk",
|
78 |
+
"gb18030",
|
79 |
+
"hz",
|
80 |
+
"iso2022_jp",
|
81 |
+
"iso2022_jp_1",
|
82 |
+
"iso2022_jp_2",
|
83 |
+
"iso2022_jp_2004",
|
84 |
+
"iso2022_jp_3",
|
85 |
+
"iso2022_jp_ext",
|
86 |
+
"iso2022_kr",
|
87 |
+
"latin_1",
|
88 |
+
"iso8859_2",
|
89 |
+
"iso8859_3",
|
90 |
+
"iso8859_4",
|
91 |
+
"iso8859_5",
|
92 |
+
"iso8859_6",
|
93 |
+
"iso8859_7",
|
94 |
+
"iso8859_8",
|
95 |
+
"iso8859_9",
|
96 |
+
"iso8859_10",
|
97 |
+
"iso8859_11",
|
98 |
+
"iso8859_13",
|
99 |
+
"iso8859_14",
|
100 |
+
"iso8859_15",
|
101 |
+
"iso8859_16",
|
102 |
+
"johab",
|
103 |
+
"koi8_r",
|
104 |
+
"koi8_u",
|
105 |
+
"mac_cyrillic",
|
106 |
+
"mac_greek",
|
107 |
+
"mac_iceland",
|
108 |
+
"mac_latin2",
|
109 |
+
"mac_roman",
|
110 |
+
"mac_turkish",
|
111 |
+
"ptcp154",
|
112 |
+
"shift_jis",
|
113 |
+
"shift_jis_2004",
|
114 |
+
"shift_jisx0213",
|
115 |
+
"base64_codec",
|
116 |
+
"bz2_codec",
|
117 |
+
"hex_codec",
|
118 |
+
"idna",
|
119 |
+
"mbcs",
|
120 |
+
"palmos",
|
121 |
+
"punycode",
|
122 |
+
"quopri_codec",
|
123 |
+
"raw_unicode_escape",
|
124 |
+
"rot_13",
|
125 |
+
"string_escape",
|
126 |
+
"unicode_escape",
|
127 |
+
"unicode_internal",
|
128 |
+
"uu_codec",
|
129 |
+
"zlib_codec",
|
130 |
+
]
|
131 |
+
__RE_UTF7 = re.compile(b("[+].*?[-]"))
|
132 |
+
|
133 |
+
@property
|
134 |
+
def unicode_str(self) -> str:
|
135 |
+
return self.__unicode_str
|
136 |
+
|
137 |
+
@property
|
138 |
+
def codec(self) -> Optional[str]:
|
139 |
+
return self.__codec
|
140 |
+
|
141 |
+
def __init__(self, value, codec_candidates: Optional[Sequence[str]] = None) -> None:
|
142 |
+
self.__encoded_str = value
|
143 |
+
self.__codec: Optional[str] = None
|
144 |
+
if codec_candidates is None:
|
145 |
+
self.__codec_candidate_list: List[str] = []
|
146 |
+
else:
|
147 |
+
self.__codec_candidate_list = list(codec_candidates)
|
148 |
+
|
149 |
+
self.__validate_str()
|
150 |
+
|
151 |
+
self.__unicode_str = self.__to_unicode()
|
152 |
+
|
153 |
+
def __repr__(self) -> str:
|
154 |
+
return f"codec={self.codec:s}, unicode={self.unicode_str:s}"
|
155 |
+
|
156 |
+
def __validate_str(self) -> None:
|
157 |
+
if isinstance(self.__encoded_str, (str, bytes)):
|
158 |
+
return
|
159 |
+
|
160 |
+
raise ValueError(f"value must be a string: actual={type(self.__encoded_str)}")
|
161 |
+
|
162 |
+
def __is_buffer(self) -> bool:
|
163 |
+
return isinstance(self.__encoded_str, memoryview)
|
164 |
+
|
165 |
+
def __is_multibyte_utf7(self, encoded_str) -> bool:
|
166 |
+
if self.__codec != "utf_7":
|
167 |
+
return False
|
168 |
+
|
169 |
+
utf7_symbol_count = encoded_str.count(b("+"))
|
170 |
+
if utf7_symbol_count <= 0:
|
171 |
+
return False
|
172 |
+
|
173 |
+
if utf7_symbol_count != encoded_str.count(b("-")):
|
174 |
+
return False
|
175 |
+
|
176 |
+
return utf7_symbol_count == len(self.__RE_UTF7.findall(encoded_str))
|
177 |
+
|
178 |
+
def __get_encoded_str(self) -> str:
|
179 |
+
if self.__is_buffer():
|
180 |
+
return str(self.__encoded_str)
|
181 |
+
|
182 |
+
return self.__encoded_str
|
183 |
+
|
184 |
+
@staticmethod
|
185 |
+
def __detect_encoding_helper(encoded_str) -> Optional[str]:
|
186 |
+
import chardet
|
187 |
+
|
188 |
+
try:
|
189 |
+
detect = chardet.detect(encoded_str)
|
190 |
+
except TypeError:
|
191 |
+
detect = {} # type: ignore
|
192 |
+
|
193 |
+
detect_encoding = detect.get("encoding")
|
194 |
+
confidence = detect.get("confidence")
|
195 |
+
|
196 |
+
if detect_encoding not in ["ascii", "utf-8"] and confidence and confidence > 0.7:
|
197 |
+
# utf7 tend to be misrecognized as ascii
|
198 |
+
return detect_encoding
|
199 |
+
|
200 |
+
return None
|
201 |
+
|
202 |
+
def __get_codec_candidate_list(self, encoded_str) -> List[str]:
|
203 |
+
codec_candidate_list = copy.deepcopy(self.__CODECS)
|
204 |
+
detect_encoding = self.__detect_encoding_helper(encoded_str)
|
205 |
+
|
206 |
+
if detect_encoding:
|
207 |
+
try:
|
208 |
+
codec_candidate_list.remove(detect_encoding)
|
209 |
+
except ValueError:
|
210 |
+
pass
|
211 |
+
|
212 |
+
codec_candidate_list.insert(0, detect_encoding)
|
213 |
+
|
214 |
+
for codec_candidate in self.__codec_candidate_list:
|
215 |
+
try:
|
216 |
+
codec_candidate_list.remove(codec_candidate)
|
217 |
+
except ValueError:
|
218 |
+
pass
|
219 |
+
|
220 |
+
return self.__codec_candidate_list + codec_candidate_list
|
221 |
+
|
222 |
+
def __to_unicode(self):
|
223 |
+
encoded_str = self.__get_encoded_str()
|
224 |
+
|
225 |
+
if encoded_str == b"":
|
226 |
+
self.__codec = "unicode"
|
227 |
+
return ""
|
228 |
+
|
229 |
+
for codec in self.__get_codec_candidate_list(encoded_str):
|
230 |
+
if not codec:
|
231 |
+
continue
|
232 |
+
|
233 |
+
try:
|
234 |
+
self.__codec = to_codec_name(codec)
|
235 |
+
decoded_str = encoded_str.decode(codec)
|
236 |
+
break
|
237 |
+
except UnicodeDecodeError:
|
238 |
+
self.__codec = None
|
239 |
+
continue
|
240 |
+
except AttributeError:
|
241 |
+
if isinstance(encoded_str, str):
|
242 |
+
# already a unicode string (python 3)
|
243 |
+
self.__codec = "unicode"
|
244 |
+
|
245 |
+
if not encoded_str:
|
246 |
+
return encoded_str
|
247 |
+
|
248 |
+
return encoded_str
|
249 |
+
|
250 |
+
self.__codec = None
|
251 |
+
|
252 |
+
try:
|
253 |
+
return f"{encoded_str}"
|
254 |
+
except UnicodeDecodeError:
|
255 |
+
# some of the objects that cannot convertible to a string
|
256 |
+
# may reach this line
|
257 |
+
raise TypeError("argument must be a string")
|
258 |
+
else:
|
259 |
+
self.__codec = None
|
260 |
+
|
261 |
+
try:
|
262 |
+
message = f"unknown codec: encoded_str={encoded_str}"
|
263 |
+
except UnicodeDecodeError:
|
264 |
+
message = f"unknown codec: value-type={type(encoded_str)}"
|
265 |
+
|
266 |
+
raise UnicodeDecodeError(message)
|
267 |
+
|
268 |
+
if self.codec == "utf_7":
|
269 |
+
return self.__process_utf7(encoded_str, decoded_str)
|
270 |
+
|
271 |
+
return decoded_str
|
272 |
+
|
273 |
+
def __process_utf7(self, encoded_str, decoded_str) -> str:
|
274 |
+
if not encoded_str:
|
275 |
+
self.__codec = "unicode"
|
276 |
+
|
277 |
+
return encoded_str
|
278 |
+
|
279 |
+
if self.__is_multibyte_utf7(encoded_str):
|
280 |
+
try:
|
281 |
+
decoded_str.encode("ascii")
|
282 |
+
|
283 |
+
self.__codec = "ascii"
|
284 |
+
|
285 |
+
return encoded_str.decode("ascii")
|
286 |
+
except UnicodeEncodeError:
|
287 |
+
return decoded_str
|
288 |
+
|
289 |
+
self.__codec = "ascii"
|
290 |
+
|
291 |
+
return encoded_str.decode("ascii")
|
llmeval-env/lib/python3.10/site-packages/mbstrdecoder/py.typed
ADDED
File without changes
|
llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip
|
llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/METADATA
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: nvidia-nvjitlink-cu12
|
3 |
+
Version: 12.4.127
|
4 |
+
Summary: Nvidia JIT LTO Library
|
5 |
+
Home-page: https://developer.nvidia.com/cuda-zone
|
6 |
+
Author: Nvidia CUDA Installer Team
|
7 |
+
Author-email: [email protected]
|
8 |
+
License: NVIDIA Proprietary Software
|
9 |
+
Keywords: cuda,nvidia,runtime,machine learning,deep learning
|
10 |
+
Classifier: Development Status :: 4 - Beta
|
11 |
+
Classifier: Intended Audience :: Developers
|
12 |
+
Classifier: Intended Audience :: Education
|
13 |
+
Classifier: Intended Audience :: Science/Research
|
14 |
+
Classifier: License :: Other/Proprietary License
|
15 |
+
Classifier: Natural Language :: English
|
16 |
+
Classifier: Programming Language :: Python :: 3
|
17 |
+
Classifier: Programming Language :: Python :: 3.5
|
18 |
+
Classifier: Programming Language :: Python :: 3.6
|
19 |
+
Classifier: Programming Language :: Python :: 3.7
|
20 |
+
Classifier: Programming Language :: Python :: 3.8
|
21 |
+
Classifier: Programming Language :: Python :: 3.9
|
22 |
+
Classifier: Programming Language :: Python :: 3.10
|
23 |
+
Classifier: Programming Language :: Python :: 3.11
|
24 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
25 |
+
Classifier: Topic :: Scientific/Engineering
|
26 |
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
27 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
28 |
+
Classifier: Topic :: Software Development
|
29 |
+
Classifier: Topic :: Software Development :: Libraries
|
30 |
+
Classifier: Operating System :: Microsoft :: Windows
|
31 |
+
Classifier: Operating System :: POSIX :: Linux
|
32 |
+
Requires-Python: >=3
|
33 |
+
License-File: License.txt
|
34 |
+
|
35 |
+
NVIDIA compiler library for JIT LTO functionality.
|
llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/RECORD
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
nvidia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2 |
+
nvidia/__pycache__/__init__.cpython-310.pyc,,
|
3 |
+
nvidia/nvjitlink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4 |
+
nvidia/nvjitlink/__pycache__/__init__.cpython-310.pyc,,
|
5 |
+
nvidia/nvjitlink/include/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6 |
+
nvidia/nvjitlink/include/__pycache__/__init__.cpython-310.pyc,,
|
7 |
+
nvidia/nvjitlink/include/nvJitLink.h,sha256=6P2KtTBXDDOsbxIi0Nr9Ot8_fh9XvsSAaDhaElJwLQU,16496
|
8 |
+
nvidia/nvjitlink/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9 |
+
nvidia/nvjitlink/lib/__pycache__/__init__.cpython-310.pyc,,
|
10 |
+
nvidia/nvjitlink/lib/libnvJitLink.so.12,sha256=y9FIi774K41kwt1Rqbau8_awvDp6gKmCG-SNHAf3AOc,53594512
|
11 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
12 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/License.txt,sha256=rW9YU_ugyg0VnQ9Y1JrkmDDC-Mk_epJki5zpCttMbM0,59262
|
13 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/METADATA,sha256=Tkm9zx69iT4wHTNBYxiPi30271awlBpcUiAg1itXbn0,1518
|
14 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/RECORD,,
|
15 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/WHEEL,sha256=XDTs3wIbcE-BcRO08VJlZpA6z9OaC1mOKPCGGGwuM2g,109
|
16 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/top_level.txt,sha256=fTkAtiFuL16nUrB9ytDDtpytz2t0B4NvYTnRzwAhO14,7
|
llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/WHEEL
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: bdist_wheel (0.42.0)
|
3 |
+
Root-Is-Purelib: true
|
4 |
+
Tag: py3-none-manylinux2014_x86_64
|
5 |
+
|
llmeval-env/lib/python3.10/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/top_level.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
nvidia
|
llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip
|
llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/LICENSE
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Apache License
|
3 |
+
Version 2.0, January 2004
|
4 |
+
http://www.apache.org/licenses/
|
5 |
+
|
6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7 |
+
|
8 |
+
1. Definitions.
|
9 |
+
|
10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
12 |
+
|
13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14 |
+
the copyright owner that is granting the License.
|
15 |
+
|
16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
17 |
+
other entities that control, are controlled by, or are under common
|
18 |
+
control with that entity. For the purposes of this definition,
|
19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
20 |
+
direction or management of such entity, whether by contract or
|
21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23 |
+
|
24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25 |
+
exercising permissions granted by this License.
|
26 |
+
|
27 |
+
"Source" form shall mean the preferred form for making modifications,
|
28 |
+
including but not limited to software source code, documentation
|
29 |
+
source, and configuration files.
|
30 |
+
|
31 |
+
"Object" form shall mean any form resulting from mechanical
|
32 |
+
transformation or translation of a Source form, including but
|
33 |
+
not limited to compiled object code, generated documentation,
|
34 |
+
and conversions to other media types.
|
35 |
+
|
36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
37 |
+
Object form, made available under the License, as indicated by a
|
38 |
+
copyright notice that is included in or attached to the work
|
39 |
+
(an example is provided in the Appendix below).
|
40 |
+
|
41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42 |
+
form, that is based on (or derived from) the Work and for which the
|
43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
45 |
+
of this License, Derivative Works shall not include works that remain
|
46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47 |
+
the Work and Derivative Works thereof.
|
48 |
+
|
49 |
+
"Contribution" shall mean any work of authorship, including
|
50 |
+
the original version of the Work and any modifications or additions
|
51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
55 |
+
means any form of electronic, verbal, or written communication sent
|
56 |
+
to the Licensor or its representatives, including but not limited to
|
57 |
+
communication on electronic mailing lists, source code control systems,
|
58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
60 |
+
excluding communication that is conspicuously marked or otherwise
|
61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
62 |
+
|
63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
65 |
+
subsequently incorporated within the Work.
|
66 |
+
|
67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
72 |
+
Work and such Derivative Works in Source or Object form.
|
73 |
+
|
74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77 |
+
(except as stated in this section) patent license to make, have made,
|
78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79 |
+
where such license applies only to those patent claims licensable
|
80 |
+
by such Contributor that are necessarily infringed by their
|
81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
83 |
+
institute patent litigation against any entity (including a
|
84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85 |
+
or a Contribution incorporated within the Work constitutes direct
|
86 |
+
or contributory patent infringement, then any patent licenses
|
87 |
+
granted to You under this License for that Work shall terminate
|
88 |
+
as of the date such litigation is filed.
|
89 |
+
|
90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
91 |
+
Work or Derivative Works thereof in any medium, with or without
|
92 |
+
modifications, and in Source or Object form, provided that You
|
93 |
+
meet the following conditions:
|
94 |
+
|
95 |
+
(a) You must give any other recipients of the Work or
|
96 |
+
Derivative Works a copy of this License; and
|
97 |
+
|
98 |
+
(b) You must cause any modified files to carry prominent notices
|
99 |
+
stating that You changed the files; and
|
100 |
+
|
101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
102 |
+
that You distribute, all copyright, patent, trademark, and
|
103 |
+
attribution notices from the Source form of the Work,
|
104 |
+
excluding those notices that do not pertain to any part of
|
105 |
+
the Derivative Works; and
|
106 |
+
|
107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108 |
+
distribution, then any Derivative Works that You distribute must
|
109 |
+
include a readable copy of the attribution notices contained
|
110 |
+
within such NOTICE file, excluding those notices that do not
|
111 |
+
pertain to any part of the Derivative Works, in at least one
|
112 |
+
of the following places: within a NOTICE text file distributed
|
113 |
+
as part of the Derivative Works; within the Source form or
|
114 |
+
documentation, if provided along with the Derivative Works; or,
|
115 |
+
within a display generated by the Derivative Works, if and
|
116 |
+
wherever such third-party notices normally appear. The contents
|
117 |
+
of the NOTICE file are for informational purposes only and
|
118 |
+
do not modify the License. You may add Your own attribution
|
119 |
+
notices within Derivative Works that You distribute, alongside
|
120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
121 |
+
that such additional attribution notices cannot be construed
|
122 |
+
as modifying the License.
|
123 |
+
|
124 |
+
You may add Your own copyright statement to Your modifications and
|
125 |
+
may provide additional or different license terms and conditions
|
126 |
+
for use, reproduction, or distribution of Your modifications, or
|
127 |
+
for any such Derivative Works as a whole, provided Your use,
|
128 |
+
reproduction, and distribution of the Work otherwise complies with
|
129 |
+
the conditions stated in this License.
|
130 |
+
|
131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
133 |
+
by You to the Licensor shall be under the terms and conditions of
|
134 |
+
this License, without any additional terms or conditions.
|
135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136 |
+
the terms of any separate license agreement you may have executed
|
137 |
+
with Licensor regarding such Contributions.
|
138 |
+
|
139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
141 |
+
except as required for reasonable and customary use in describing the
|
142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
143 |
+
|
144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145 |
+
agreed to in writing, Licensor provides the Work (and each
|
146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148 |
+
implied, including, without limitation, any warranties or conditions
|
149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151 |
+
appropriateness of using or redistributing the Work and assume any
|
152 |
+
risks associated with Your exercise of permissions under this License.
|
153 |
+
|
154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
155 |
+
whether in tort (including negligence), contract, or otherwise,
|
156 |
+
unless required by applicable law (such as deliberate and grossly
|
157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158 |
+
liable to You for damages, including any direct, indirect, special,
|
159 |
+
incidental, or consequential damages of any character arising as a
|
160 |
+
result of this License or out of the use or inability to use the
|
161 |
+
Work (including but not limited to damages for loss of goodwill,
|
162 |
+
work stoppage, computer failure or malfunction, or any and all
|
163 |
+
other commercial damages or losses), even if such Contributor
|
164 |
+
has been advised of the possibility of such damages.
|
165 |
+
|
166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169 |
+
or other liability obligations and/or rights consistent with this
|
170 |
+
License. However, in accepting such obligations, You may act only
|
171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172 |
+
of any other Contributor, and only if You agree to indemnify,
|
173 |
+
defend, and hold each Contributor harmless for any liability
|
174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
175 |
+
of your accepting any such warranty or additional liability.
|
llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/METADATA
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: requests
|
3 |
+
Version: 2.31.0
|
4 |
+
Summary: Python HTTP for Humans.
|
5 |
+
Home-page: https://requests.readthedocs.io
|
6 |
+
Author: Kenneth Reitz
|
7 |
+
Author-email: [email protected]
|
8 |
+
License: Apache 2.0
|
9 |
+
Project-URL: Documentation, https://requests.readthedocs.io
|
10 |
+
Project-URL: Source, https://github.com/psf/requests
|
11 |
+
Platform: UNKNOWN
|
12 |
+
Classifier: Development Status :: 5 - Production/Stable
|
13 |
+
Classifier: Environment :: Web Environment
|
14 |
+
Classifier: Intended Audience :: Developers
|
15 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
16 |
+
Classifier: Natural Language :: English
|
17 |
+
Classifier: Operating System :: OS Independent
|
18 |
+
Classifier: Programming Language :: Python
|
19 |
+
Classifier: Programming Language :: Python :: 3
|
20 |
+
Classifier: Programming Language :: Python :: 3.7
|
21 |
+
Classifier: Programming Language :: Python :: 3.8
|
22 |
+
Classifier: Programming Language :: Python :: 3.9
|
23 |
+
Classifier: Programming Language :: Python :: 3.10
|
24 |
+
Classifier: Programming Language :: Python :: 3.11
|
25 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
26 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
27 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
28 |
+
Classifier: Topic :: Internet :: WWW/HTTP
|
29 |
+
Classifier: Topic :: Software Development :: Libraries
|
30 |
+
Requires-Python: >=3.7
|
31 |
+
Description-Content-Type: text/markdown
|
32 |
+
License-File: LICENSE
|
33 |
+
Requires-Dist: charset-normalizer (<4,>=2)
|
34 |
+
Requires-Dist: idna (<4,>=2.5)
|
35 |
+
Requires-Dist: urllib3 (<3,>=1.21.1)
|
36 |
+
Requires-Dist: certifi (>=2017.4.17)
|
37 |
+
Provides-Extra: security
|
38 |
+
Provides-Extra: socks
|
39 |
+
Requires-Dist: PySocks (!=1.5.7,>=1.5.6) ; extra == 'socks'
|
40 |
+
Provides-Extra: use_chardet_on_py3
|
41 |
+
Requires-Dist: chardet (<6,>=3.0.2) ; extra == 'use_chardet_on_py3'
|
42 |
+
|
43 |
+
# Requests
|
44 |
+
|
45 |
+
**Requests** is a simple, yet elegant, HTTP library.
|
46 |
+
|
47 |
+
```python
|
48 |
+
>>> import requests
|
49 |
+
>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))
|
50 |
+
>>> r.status_code
|
51 |
+
200
|
52 |
+
>>> r.headers['content-type']
|
53 |
+
'application/json; charset=utf8'
|
54 |
+
>>> r.encoding
|
55 |
+
'utf-8'
|
56 |
+
>>> r.text
|
57 |
+
'{"authenticated": true, ...'
|
58 |
+
>>> r.json()
|
59 |
+
{'authenticated': True, ...}
|
60 |
+
```
|
61 |
+
|
62 |
+
Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs, or to form-encode your `PUT` & `POST` data — but nowadays, just use the `json` method!
|
63 |
+
|
64 |
+
Requests is one of the most downloaded Python packages today, pulling in around `30M downloads / week`— according to GitHub, Requests is currently [depended upon](https://github.com/psf/requests/network/dependents?package_id=UGFja2FnZS01NzA4OTExNg%3D%3D) by `1,000,000+` repositories. You may certainly put your trust in this code.
|
65 |
+
|
66 |
+
[](https://pepy.tech/project/requests)
|
67 |
+
[](https://pypi.org/project/requests)
|
68 |
+
[](https://github.com/psf/requests/graphs/contributors)
|
69 |
+
|
70 |
+
## Installing Requests and Supported Versions
|
71 |
+
|
72 |
+
Requests is available on PyPI:
|
73 |
+
|
74 |
+
```console
|
75 |
+
$ python -m pip install requests
|
76 |
+
```
|
77 |
+
|
78 |
+
Requests officially supports Python 3.7+.
|
79 |
+
|
80 |
+
## Supported Features & Best–Practices
|
81 |
+
|
82 |
+
Requests is ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today.
|
83 |
+
|
84 |
+
- Keep-Alive & Connection Pooling
|
85 |
+
- International Domains and URLs
|
86 |
+
- Sessions with Cookie Persistence
|
87 |
+
- Browser-style TLS/SSL Verification
|
88 |
+
- Basic & Digest Authentication
|
89 |
+
- Familiar `dict`–like Cookies
|
90 |
+
- Automatic Content Decompression and Decoding
|
91 |
+
- Multi-part File Uploads
|
92 |
+
- SOCKS Proxy Support
|
93 |
+
- Connection Timeouts
|
94 |
+
- Streaming Downloads
|
95 |
+
- Automatic honoring of `.netrc`
|
96 |
+
- Chunked HTTP Requests
|
97 |
+
|
98 |
+
## API Reference and User Guide available on [Read the Docs](https://requests.readthedocs.io)
|
99 |
+
|
100 |
+
[](https://requests.readthedocs.io)
|
101 |
+
|
102 |
+
## Cloning the repository
|
103 |
+
|
104 |
+
When cloning the Requests repository, you may need to add the `-c
|
105 |
+
fetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (see
|
106 |
+
[this issue](https://github.com/psf/requests/issues/2690) for more background):
|
107 |
+
|
108 |
+
```shell
|
109 |
+
git clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git
|
110 |
+
```
|
111 |
+
|
112 |
+
You can also apply this setting to your global Git config:
|
113 |
+
|
114 |
+
```shell
|
115 |
+
git config --global fetch.fsck.badTimezone ignore
|
116 |
+
```
|
117 |
+
|
118 |
+
---
|
119 |
+
|
120 |
+
[](https://kennethreitz.org) [](https://www.python.org/psf)
|
121 |
+
|
122 |
+
|
llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/RECORD
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
requests-2.31.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
2 |
+
requests-2.31.0.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
3 |
+
requests-2.31.0.dist-info/METADATA,sha256=eCPokOnbb0FROLrfl0R5EpDvdufsb9CaN4noJH__54I,4634
|
4 |
+
requests-2.31.0.dist-info/RECORD,,
|
5 |
+
requests-2.31.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
6 |
+
requests-2.31.0.dist-info/top_level.txt,sha256=fMSVmHfb5rbGOo6xv-O_tUX6j-WyixssE-SnwcDRxNQ,9
|
7 |
+
requests/__init__.py,sha256=LvmKhjIz8mHaKXthC2Mv5ykZ1d92voyf3oJpd-VuAig,4963
|
8 |
+
requests/__pycache__/__init__.cpython-310.pyc,,
|
9 |
+
requests/__pycache__/__version__.cpython-310.pyc,,
|
10 |
+
requests/__pycache__/_internal_utils.cpython-310.pyc,,
|
11 |
+
requests/__pycache__/adapters.cpython-310.pyc,,
|
12 |
+
requests/__pycache__/api.cpython-310.pyc,,
|
13 |
+
requests/__pycache__/auth.cpython-310.pyc,,
|
14 |
+
requests/__pycache__/certs.cpython-310.pyc,,
|
15 |
+
requests/__pycache__/compat.cpython-310.pyc,,
|
16 |
+
requests/__pycache__/cookies.cpython-310.pyc,,
|
17 |
+
requests/__pycache__/exceptions.cpython-310.pyc,,
|
18 |
+
requests/__pycache__/help.cpython-310.pyc,,
|
19 |
+
requests/__pycache__/hooks.cpython-310.pyc,,
|
20 |
+
requests/__pycache__/models.cpython-310.pyc,,
|
21 |
+
requests/__pycache__/packages.cpython-310.pyc,,
|
22 |
+
requests/__pycache__/sessions.cpython-310.pyc,,
|
23 |
+
requests/__pycache__/status_codes.cpython-310.pyc,,
|
24 |
+
requests/__pycache__/structures.cpython-310.pyc,,
|
25 |
+
requests/__pycache__/utils.cpython-310.pyc,,
|
26 |
+
requests/__version__.py,sha256=ssI3Ezt7PaxgkOW45GhtwPUclo_SO_ygtIm4A74IOfw,435
|
27 |
+
requests/_internal_utils.py,sha256=nMQymr4hs32TqVo5AbCrmcJEhvPUh7xXlluyqwslLiQ,1495
|
28 |
+
requests/adapters.py,sha256=v_FmjU5KZ76k-YttShZYB5RprIzhhL8Y3zgW9p4eBQ8,19553
|
29 |
+
requests/api.py,sha256=q61xcXq4tmiImrvcSVLTbFyCiD2F-L_-hWKGbz4y8vg,6449
|
30 |
+
requests/auth.py,sha256=h-HLlVx9j8rKV5hfSAycP2ApOSglTz77R0tz7qCbbEE,10187
|
31 |
+
requests/certs.py,sha256=Z9Sb410Anv6jUFTyss0jFFhU6xst8ctELqfy8Ev23gw,429
|
32 |
+
requests/compat.py,sha256=yxntVOSEHGMrn7FNr_32EEam1ZNAdPRdSE13_yaHzTk,1451
|
33 |
+
requests/cookies.py,sha256=kD3kNEcCj-mxbtf5fJsSaT86eGoEYpD3X0CSgpzl7BM,18560
|
34 |
+
requests/exceptions.py,sha256=DhveFBclVjTRxhRduVpO-GbMYMID2gmjdLfNEqNpI_U,3811
|
35 |
+
requests/help.py,sha256=gPX5d_H7Xd88aDABejhqGgl9B1VFRTt5BmiYvL3PzIQ,3875
|
36 |
+
requests/hooks.py,sha256=CiuysiHA39V5UfcCBXFIx83IrDpuwfN9RcTUgv28ftQ,733
|
37 |
+
requests/models.py,sha256=-DlKi0or8gFAM6VzutobXvvBW_2wrJuOF5NfndTIddA,35223
|
38 |
+
requests/packages.py,sha256=DXgv-FJIczZITmv0vEBAhWj4W-5CGCIN_ksvgR17Dvs,957
|
39 |
+
requests/sessions.py,sha256=-LvTzrPtetSTrR3buxu4XhdgMrJFLB1q5D7P--L2Xhw,30373
|
40 |
+
requests/status_codes.py,sha256=FvHmT5uH-_uimtRz5hH9VCbt7VV-Nei2J9upbej6j8g,4235
|
41 |
+
requests/structures.py,sha256=-IbmhVz06S-5aPSZuUthZ6-6D9XOjRuTXHOabY041XM,2912
|
42 |
+
requests/utils.py,sha256=6sx2X3cIVA8BgWOg8odxFy-_lbWDFETU8HI4fU4Rmqw,33448
|
llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/WHEEL
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: bdist_wheel (0.40.0)
|
3 |
+
Root-Is-Purelib: true
|
4 |
+
Tag: py3-none-any
|
5 |
+
|
llmeval-env/lib/python3.10/site-packages/requests-2.31.0.dist-info/top_level.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
requests
|
llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip
|
llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/METADATA
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.3
|
2 |
+
Name: safetensors
|
3 |
+
Version: 0.4.3
|
4 |
+
Classifier: Development Status :: 5 - Production/Stable
|
5 |
+
Classifier: Intended Audience :: Developers
|
6 |
+
Classifier: Intended Audience :: Education
|
7 |
+
Classifier: Intended Audience :: Science/Research
|
8 |
+
Classifier: License :: OSI Approved :: Apache Software License
|
9 |
+
Classifier: Operating System :: OS Independent
|
10 |
+
Classifier: Programming Language :: Python :: 3
|
11 |
+
Classifier: Programming Language :: Python :: 3.7
|
12 |
+
Classifier: Programming Language :: Python :: 3.8
|
13 |
+
Classifier: Programming Language :: Python :: 3.9
|
14 |
+
Classifier: Programming Language :: Python :: 3.10
|
15 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
16 |
+
Classifier: Typing :: Typed
|
17 |
+
Requires-Dist: numpy >=1.21.6 ; extra == 'numpy'
|
18 |
+
Requires-Dist: safetensors[numpy] ; extra == 'torch'
|
19 |
+
Requires-Dist: torch >=1.10 ; extra == 'torch'
|
20 |
+
Requires-Dist: safetensors[numpy] ; extra == 'tensorflow'
|
21 |
+
Requires-Dist: tensorflow >=2.11.0 ; extra == 'tensorflow'
|
22 |
+
Requires-Dist: safetensors[numpy] ; extra == 'pinned-tf'
|
23 |
+
Requires-Dist: tensorflow ==2.11.0 ; extra == 'pinned-tf'
|
24 |
+
Requires-Dist: safetensors[numpy] ; extra == 'jax'
|
25 |
+
Requires-Dist: flax >=0.6.3 ; extra == 'jax'
|
26 |
+
Requires-Dist: jax >=0.3.25 ; extra == 'jax'
|
27 |
+
Requires-Dist: jaxlib >=0.3.25 ; extra == 'jax'
|
28 |
+
Requires-Dist: mlx >=0.0.9 ; extra == 'mlx'
|
29 |
+
Requires-Dist: safetensors[numpy] ; extra == 'paddlepaddle'
|
30 |
+
Requires-Dist: paddlepaddle >=2.4.1 ; extra == 'paddlepaddle'
|
31 |
+
Requires-Dist: black ==22.3 ; extra == 'quality'
|
32 |
+
Requires-Dist: click ==8.0.4 ; extra == 'quality'
|
33 |
+
Requires-Dist: isort >=5.5.4 ; extra == 'quality'
|
34 |
+
Requires-Dist: flake8 >=3.8.3 ; extra == 'quality'
|
35 |
+
Requires-Dist: safetensors[numpy] ; extra == 'testing'
|
36 |
+
Requires-Dist: h5py >=3.7.0 ; extra == 'testing'
|
37 |
+
Requires-Dist: huggingface-hub >=0.12.1 ; extra == 'testing'
|
38 |
+
Requires-Dist: setuptools-rust >=1.5.2 ; extra == 'testing'
|
39 |
+
Requires-Dist: pytest >=7.2.0 ; extra == 'testing'
|
40 |
+
Requires-Dist: pytest-benchmark >=4.0.0 ; extra == 'testing'
|
41 |
+
Requires-Dist: hypothesis >=6.70.2 ; extra == 'testing'
|
42 |
+
Requires-Dist: safetensors[torch] ; extra == 'all'
|
43 |
+
Requires-Dist: safetensors[numpy] ; extra == 'all'
|
44 |
+
Requires-Dist: safetensors[pinned-tf] ; extra == 'all'
|
45 |
+
Requires-Dist: safetensors[jax] ; extra == 'all'
|
46 |
+
Requires-Dist: safetensors[paddlepaddle] ; extra == 'all'
|
47 |
+
Requires-Dist: safetensors[quality] ; extra == 'all'
|
48 |
+
Requires-Dist: safetensors[testing] ; extra == 'all'
|
49 |
+
Requires-Dist: safetensors[all] ; extra == 'dev'
|
50 |
+
Provides-Extra: numpy
|
51 |
+
Provides-Extra: torch
|
52 |
+
Provides-Extra: tensorflow
|
53 |
+
Provides-Extra: pinned-tf
|
54 |
+
Provides-Extra: jax
|
55 |
+
Provides-Extra: mlx
|
56 |
+
Provides-Extra: paddlepaddle
|
57 |
+
Provides-Extra: quality
|
58 |
+
Provides-Extra: testing
|
59 |
+
Provides-Extra: all
|
60 |
+
Provides-Extra: dev
|
61 |
+
Author-email: Nicolas Patry <[email protected]>
|
62 |
+
Requires-Python: >=3.7
|
63 |
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
64 |
+
Project-URL: Homepage, https://github.com/huggingface/safetensors
|
65 |
+
Project-URL: Source, https://github.com/huggingface/safetensors
|
66 |
+
|
67 |
+
## Installation
|
68 |
+
|
69 |
+
```
|
70 |
+
pip install safetensors
|
71 |
+
```
|
72 |
+
|
73 |
+
|
74 |
+
## Usage
|
75 |
+
|
76 |
+
### Numpy
|
77 |
+
|
78 |
+
```python
|
79 |
+
from safetensors.numpy import save_file, load_file
|
80 |
+
import numpy as np
|
81 |
+
|
82 |
+
tensors = {
|
83 |
+
"a": np.zeros((2, 2)),
|
84 |
+
"b": np.zeros((2, 3), dtype=np.uint8)
|
85 |
+
}
|
86 |
+
|
87 |
+
save_file(tensors, "./model.safetensors")
|
88 |
+
|
89 |
+
|
90 |
+
# Now loading
|
91 |
+
loaded = load_file("./model.safetensors")
|
92 |
+
```
|
93 |
+
|
94 |
+
### Torch
|
95 |
+
|
96 |
+
```python
|
97 |
+
from safetensors.torch import save_file, load_file
|
98 |
+
import torch
|
99 |
+
|
100 |
+
tensors = {
|
101 |
+
"a": torch.zeros((2, 2)),
|
102 |
+
"b": torch.zeros((2, 3), dtype=torch.uint8)
|
103 |
+
}
|
104 |
+
|
105 |
+
save_file(tensors, "./model.safetensors")
|
106 |
+
|
107 |
+
|
108 |
+
# Now loading
|
109 |
+
loaded = load_file("./model.safetensors")
|
110 |
+
```
|
111 |
+
|
112 |
+
### Developing
|
113 |
+
|
114 |
+
```
|
115 |
+
# inside ./safetensors/bindings/python
|
116 |
+
pip install .[dev]
|
117 |
+
```
|
118 |
+
Should be enough to install this library locally.
|
119 |
+
|
120 |
+
### Testing
|
121 |
+
|
122 |
+
```
|
123 |
+
# inside ./safetensors/bindings/python
|
124 |
+
pip install .[dev]
|
125 |
+
pytest -sv tests/
|
126 |
+
```
|
127 |
+
|
llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/RECORD
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
safetensors-0.4.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
2 |
+
safetensors-0.4.3.dist-info/METADATA,sha256=xyYOydMNNt9ejapL8t76ASs9iTE5oS7IrZOQl8e4wK0,3842
|
3 |
+
safetensors-0.4.3.dist-info/RECORD,,
|
4 |
+
safetensors-0.4.3.dist-info/WHEEL,sha256=JL8sd1C0RQ2f7cmwbAn1Jp257v_vSS2r0VvTBpJeZwA,129
|
5 |
+
safetensors/__init__.py,sha256=rFhZV2HBVDIijU2xKjg-0viTLETa-yMLMgFC9-47hdc,171
|
6 |
+
safetensors/__init__.pyi,sha256=z6kNUzegHpyQAtFLtHu7ixUYWK9-Kwb6GqvV__6qMew,1970
|
7 |
+
safetensors/__pycache__/__init__.cpython-310.pyc,,
|
8 |
+
safetensors/__pycache__/flax.cpython-310.pyc,,
|
9 |
+
safetensors/__pycache__/mlx.cpython-310.pyc,,
|
10 |
+
safetensors/__pycache__/numpy.cpython-310.pyc,,
|
11 |
+
safetensors/__pycache__/paddle.cpython-310.pyc,,
|
12 |
+
safetensors/__pycache__/tensorflow.cpython-310.pyc,,
|
13 |
+
safetensors/__pycache__/torch.cpython-310.pyc,,
|
14 |
+
safetensors/_safetensors_rust.cpython-310-x86_64-linux-gnu.so,sha256=tjRccWtdZ62y0_JHfAfAsaIUpwqny3EQHZkyeroL-qA,4438576
|
15 |
+
safetensors/flax.py,sha256=AuyY2YHxTBy4xeQLxhAyMledHykpz0Qsys13eKiHNYg,3846
|
16 |
+
safetensors/mlx.py,sha256=7OTFtbdmGIqLnrjo_36RJRJ7zq1aI6HasvRPLB3d_Gw,3837
|
17 |
+
safetensors/numpy.py,sha256=5Z_wSFRxVbsAXpnej2zuqtdYK9K-nqZs1EE_G14C6Ck,4937
|
18 |
+
safetensors/paddle.py,sha256=V_RCTXymi2PJAG_jA4-qnfzbYAUB_74VYYXFzhXTLYM,4175
|
19 |
+
safetensors/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20 |
+
safetensors/tensorflow.py,sha256=6XaUBcxm0xL4ulNcvVsllKZ_qJ_rBSlE50rNnECCNYQ,3890
|
21 |
+
safetensors/torch.py,sha256=_Tr2aFS0o5vmauTWKfJFo43N-UR_Ap8crx3O8XpryJI,17582
|
llmeval-env/lib/python3.10/site-packages/safetensors-0.4.3.dist-info/WHEEL
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: maturin (1.5.1)
|
3 |
+
Root-Is-Purelib: false
|
4 |
+
Tag: cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64
|
llmeval-env/lib/python3.10/site-packages/setuptools-59.6.0.dist-info/WHEEL
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: bdist_wheel (0.37.1)
|
3 |
+
Root-Is-Purelib: true
|
4 |
+
Tag: py3-none-any
|
5 |
+
|
llmeval-env/lib/python3.10/site-packages/setuptools-59.6.0.dist-info/entry_points.txt
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[distutils.commands]
|
2 |
+
alias = setuptools.command.alias:alias
|
3 |
+
bdist_egg = setuptools.command.bdist_egg:bdist_egg
|
4 |
+
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
|
5 |
+
build_clib = setuptools.command.build_clib:build_clib
|
6 |
+
build_ext = setuptools.command.build_ext:build_ext
|
7 |
+
build_py = setuptools.command.build_py:build_py
|
8 |
+
develop = setuptools.command.develop:develop
|
9 |
+
dist_info = setuptools.command.dist_info:dist_info
|
10 |
+
easy_install = setuptools.command.easy_install:easy_install
|
11 |
+
egg_info = setuptools.command.egg_info:egg_info
|
12 |
+
install = setuptools.command.install:install
|
13 |
+
install_egg_info = setuptools.command.install_egg_info:install_egg_info
|
14 |
+
install_lib = setuptools.command.install_lib:install_lib
|
15 |
+
install_scripts = setuptools.command.install_scripts:install_scripts
|
16 |
+
rotate = setuptools.command.rotate:rotate
|
17 |
+
saveopts = setuptools.command.saveopts:saveopts
|
18 |
+
sdist = setuptools.command.sdist:sdist
|
19 |
+
setopt = setuptools.command.setopt:setopt
|
20 |
+
test = setuptools.command.test:test
|
21 |
+
upload_docs = setuptools.command.upload_docs:upload_docs
|
22 |
+
|
23 |
+
[distutils.setup_keywords]
|
24 |
+
dependency_links = setuptools.dist:assert_string_list
|
25 |
+
eager_resources = setuptools.dist:assert_string_list
|
26 |
+
entry_points = setuptools.dist:check_entry_points
|
27 |
+
exclude_package_data = setuptools.dist:check_package_data
|
28 |
+
extras_require = setuptools.dist:check_extras
|
29 |
+
include_package_data = setuptools.dist:assert_bool
|
30 |
+
install_requires = setuptools.dist:check_requirements
|
31 |
+
namespace_packages = setuptools.dist:check_nsp
|
32 |
+
package_data = setuptools.dist:check_package_data
|
33 |
+
packages = setuptools.dist:check_packages
|
34 |
+
python_requires = setuptools.dist:check_specifier
|
35 |
+
setup_requires = setuptools.dist:check_requirements
|
36 |
+
test_loader = setuptools.dist:check_importable
|
37 |
+
test_runner = setuptools.dist:check_importable
|
38 |
+
test_suite = setuptools.dist:check_test_suite
|
39 |
+
tests_require = setuptools.dist:check_requirements
|
40 |
+
use_2to3 = setuptools.dist:invalid_unless_false
|
41 |
+
zip_safe = setuptools.dist:assert_bool
|
42 |
+
|
43 |
+
[egg_info.writers]
|
44 |
+
PKG-INFO = setuptools.command.egg_info:write_pkg_info
|
45 |
+
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
|
46 |
+
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
|
47 |
+
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
|
48 |
+
entry_points.txt = setuptools.command.egg_info:write_entries
|
49 |
+
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
|
50 |
+
requires.txt = setuptools.command.egg_info:write_requirements
|
51 |
+
top_level.txt = setuptools.command.egg_info:write_toplevel_names
|
52 |
+
|
53 |
+
[setuptools.finalize_distribution_options]
|
54 |
+
keywords = setuptools.dist:Distribution._finalize_setup_keywords
|
55 |
+
parent_finalize = setuptools.dist:_Distribution.finalize_options
|
56 |
+
|
llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/INSTALLER
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip
|
llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2017 Tsuyoshi Hombashi
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/METADATA
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Metadata-Version: 2.1
|
2 |
+
Name: tabledata
|
3 |
+
Version: 1.3.3
|
4 |
+
Summary: tabledata is a Python library to represent tabular data. Used for pytablewriter/pytablereader/SimpleSQLite/etc.
|
5 |
+
Home-page: https://github.com/thombashi/tabledata
|
6 |
+
Author: Tsuyoshi Hombashi
|
7 |
+
Author-email: [email protected]
|
8 |
+
License: MIT License
|
9 |
+
Project-URL: Changlog, https://github.com/thombashi/tabledata/releases
|
10 |
+
Project-URL: Documentation, https://tabledata.rtfd.io/
|
11 |
+
Project-URL: Source, https://github.com/thombashi/tabledata
|
12 |
+
Project-URL: Tracker, https://github.com/thombashi/tabledata/issues
|
13 |
+
Keywords: table
|
14 |
+
Classifier: Development Status :: 5 - Production/Stable
|
15 |
+
Classifier: Intended Audience :: Developers
|
16 |
+
Classifier: Intended Audience :: Information Technology
|
17 |
+
Classifier: License :: OSI Approved :: MIT License
|
18 |
+
Classifier: Operating System :: OS Independent
|
19 |
+
Classifier: Programming Language :: Python :: 3
|
20 |
+
Classifier: Programming Language :: Python :: 3.7
|
21 |
+
Classifier: Programming Language :: Python :: 3.8
|
22 |
+
Classifier: Programming Language :: Python :: 3.9
|
23 |
+
Classifier: Programming Language :: Python :: 3.10
|
24 |
+
Classifier: Programming Language :: Python :: 3.11
|
25 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
26 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
27 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
28 |
+
Classifier: Topic :: Software Development :: Libraries
|
29 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
30 |
+
Requires-Python: >=3.7
|
31 |
+
Description-Content-Type: text/x-rst
|
32 |
+
License-File: LICENSE
|
33 |
+
Requires-Dist: DataProperty <2,>=1.0.1
|
34 |
+
Requires-Dist: typepy <2,>=1.2.0
|
35 |
+
Provides-Extra: logging
|
36 |
+
Requires-Dist: loguru <1,>=0.4.1 ; extra == 'logging'
|
37 |
+
Provides-Extra: test
|
38 |
+
Requires-Dist: pytablewriter >=0.46 ; extra == 'test'
|
39 |
+
Requires-Dist: pytest ; extra == 'test'
|
40 |
+
|
41 |
+
.. contents:: **tabledata**
|
42 |
+
:backlinks: top
|
43 |
+
:depth: 2
|
44 |
+
|
45 |
+
Summary
|
46 |
+
---------
|
47 |
+
`tabledata <https://github.com/thombashi/tabledata>`__ is a Python library to represent tabular data. Used for pytablewriter/pytablereader/SimpleSQLite/etc.
|
48 |
+
|
49 |
+
.. image:: https://badge.fury.io/py/tabledata.svg
|
50 |
+
:target: https://badge.fury.io/py/tabledata
|
51 |
+
:alt: PyPI package version
|
52 |
+
|
53 |
+
.. image:: https://img.shields.io/pypi/pyversions/tabledata.svg
|
54 |
+
:target: https://pypi.org/project/tabledata
|
55 |
+
:alt: Supported Python versions
|
56 |
+
|
57 |
+
.. image:: https://img.shields.io/pypi/implementation/tabledata.svg
|
58 |
+
:target: https://pypi.org/project/tabledata
|
59 |
+
:alt: Supported Python implementations
|
60 |
+
|
61 |
+
.. image:: https://github.com/thombashi/tabledata/actions/workflows/ci.yml/badge.svg
|
62 |
+
:target: https://github.com/thombashi/tabledata/actions/workflows/ci.yml
|
63 |
+
:alt: Linux/macOS/Windows CI status
|
64 |
+
|
65 |
+
.. image:: https://coveralls.io/repos/github/thombashi/tabledata/badge.svg?branch=master
|
66 |
+
:target: https://coveralls.io/github/thombashi/tabledata?branch=master
|
67 |
+
:alt: Test coverage
|
68 |
+
|
69 |
+
Installation
|
70 |
+
============
|
71 |
+
|
72 |
+
Install from PyPI
|
73 |
+
------------------------------
|
74 |
+
::
|
75 |
+
|
76 |
+
pip install tabledata
|
77 |
+
|
78 |
+
Install from PPA (for Ubuntu)
|
79 |
+
------------------------------
|
80 |
+
::
|
81 |
+
|
82 |
+
sudo add-apt-repository ppa:thombashi/ppa
|
83 |
+
sudo apt update
|
84 |
+
sudo apt install python3-tabledata
|
85 |
+
|
86 |
+
|
87 |
+
Dependencies
|
88 |
+
============
|
89 |
+
- Python 3.7+
|
90 |
+
- `Mandatory Python package dependencies (automatically installed) <https://github.com/thombashi/tabledata/network/dependencies>`__
|
91 |
+
|
92 |
+
Optional Python packages
|
93 |
+
------------------------------------------------
|
94 |
+
- `loguru <https://github.com/Delgan/loguru>`__
|
95 |
+
- Used for logging if the package installed
|
96 |
+
- `pandas <https://pandas.pydata.org/>`__
|
97 |
+
- required to get table data as a pandas data frame
|
98 |
+
|
99 |
+
Documentation
|
100 |
+
===============
|
101 |
+
https://tabledata.rtfd.io/
|
102 |
+
|
llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/RECORD
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tabledata-1.3.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
2 |
+
tabledata-1.3.3.dist-info/LICENSE,sha256=vrvfBSShR_iaYV__U9eb3JDLx2MVUPtLclzT873NJPY,1074
|
3 |
+
tabledata-1.3.3.dist-info/METADATA,sha256=IKxSJeg1Qrr6dSTCJdvnBIiKl6IKCa4aAIC_B4Ngwfg,3657
|
4 |
+
tabledata-1.3.3.dist-info/RECORD,,
|
5 |
+
tabledata-1.3.3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
6 |
+
tabledata-1.3.3.dist-info/top_level.txt,sha256=wPYCjph2PxB5odPJWPADX_65iL1gAIjMQFlAyZi80iI,10
|
7 |
+
tabledata/__init__.py,sha256=OkkMA83NWJOKsmUru4qWiUXrwTxF5jDhHXl_dR2zQBQ,683
|
8 |
+
tabledata/__pycache__/__init__.cpython-310.pyc,,
|
9 |
+
tabledata/__pycache__/__version__.cpython-310.pyc,,
|
10 |
+
tabledata/__pycache__/_common.cpython-310.pyc,,
|
11 |
+
tabledata/__pycache__/_constant.cpython-310.pyc,,
|
12 |
+
tabledata/__pycache__/_converter.cpython-310.pyc,,
|
13 |
+
tabledata/__pycache__/_core.cpython-310.pyc,,
|
14 |
+
tabledata/__pycache__/error.cpython-310.pyc,,
|
15 |
+
tabledata/__pycache__/normalizer.cpython-310.pyc,,
|
16 |
+
tabledata/__version__.py,sha256=JC4TkyHfH-eP9nAvfI04H3gEbgfItYa1jLE09ARSNSc,201
|
17 |
+
tabledata/_common.py,sha256=eB3xHflvbF5p5hz1f5D9xNHQCujy6Uk91NLPTy5fFHY,274
|
18 |
+
tabledata/_constant.py,sha256=I763_Fx-9IT_ZQTTncxi04WsXd6tK78z2VBYZ3up5Aw,154
|
19 |
+
tabledata/_converter.py,sha256=0H61eirjQw_rs0h1N_APtCthRRFbYkKZVUHK-5-0GAE,895
|
20 |
+
tabledata/_core.py,sha256=4y0sLRCEcvjJvqi_pUlhz5qjIass_pZu5FcnK_kpr7U,14530
|
21 |
+
tabledata/_logger/__init__.py,sha256=7rkhAj6PGbUI3fouTa7GEzjRelUFj0_UPfzkZ_Yk71g,55
|
22 |
+
tabledata/_logger/__pycache__/__init__.cpython-310.pyc,,
|
23 |
+
tabledata/_logger/__pycache__/_logger.cpython-310.pyc,,
|
24 |
+
tabledata/_logger/__pycache__/_null_logger.cpython-310.pyc,,
|
25 |
+
tabledata/_logger/_logger.py,sha256=3HreG22mzHGZvexAGZpjkU4A995ZZmGJmiIkPcrkA4o,783
|
26 |
+
tabledata/_logger/_null_logger.py,sha256=QJuaErUIV_x6NjQ9qNX9eNSi_GB_9CrO7lKeXYZnuaw,1088
|
27 |
+
tabledata/error.py,sha256=UGGJm3_9oLQi9GBWZz4cqp1dnzc5Kbu37c6CsiWozME,526
|
28 |
+
tabledata/normalizer.py,sha256=lVz4agT8Bm97rvKUUUhP3OT1pGDsMczB5rAlx316XoY,6465
|
29 |
+
tabledata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/WHEEL
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Wheel-Version: 1.0
|
2 |
+
Generator: bdist_wheel (0.41.2)
|
3 |
+
Root-Is-Purelib: true
|
4 |
+
Tag: py3-none-any
|
5 |
+
|
llmeval-env/lib/python3.10/site-packages/tabledata-1.3.3.dist-info/top_level.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
tabledata
|
llmeval-env/lib/python3.10/site-packages/torch/_refs/__init__.py
ADDED
The diff for this file is too large to render.
See raw diff
|
|
llmeval-env/lib/python3.10/site-packages/torch/_refs/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (141 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/torch/_refs/__pycache__/_conversions.cpython-310.pyc
ADDED
Binary file (2.58 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/torch/_refs/__pycache__/fft.cpython-310.pyc
ADDED
Binary file (16 kB). View file
|
|
llmeval-env/lib/python3.10/site-packages/torch/_refs/_conversions.py
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import torch
|
2 |
+
import torch._prims_common as utils
|
3 |
+
|
4 |
+
# Utilities should come BEFORE this import
|
5 |
+
from torch._decomp import register_decomposition
|
6 |
+
|
7 |
+
from torch._prims_common import TensorLikeType
|
8 |
+
from torch._prims_common.wrappers import out_wrapper
|
9 |
+
from torch._refs import _broadcast_shapes
|
10 |
+
|
11 |
+
# Data conversion references.
|
12 |
+
#
|
13 |
+
# Note: this module breaks the usual _refs to torch naming scheme where
|
14 |
+
# _refs.foo.bar is a ref for torch.foo.bar. The following definitions are not
|
15 |
+
# part of _refs/__init__.py to avoid name clashes with Python builtin types
|
16 |
+
# (like int).
|
17 |
+
|
18 |
+
__all__ = [
|
19 |
+
# dtypes
|
20 |
+
"bfloat16",
|
21 |
+
"bool",
|
22 |
+
"byte",
|
23 |
+
"cdouble",
|
24 |
+
"cfloat",
|
25 |
+
"chalf",
|
26 |
+
"char",
|
27 |
+
"double",
|
28 |
+
"float",
|
29 |
+
"half",
|
30 |
+
"int",
|
31 |
+
"long",
|
32 |
+
"short",
|
33 |
+
# misc
|
34 |
+
"complex",
|
35 |
+
"polar",
|
36 |
+
]
|
37 |
+
|
38 |
+
|
39 |
+
def _make_conversion_method(name: str, dtype: torch.dtype):
|
40 |
+
def fn(
|
41 |
+
self: TensorLikeType, memory_format: torch.memory_format = torch.preserve_format
|
42 |
+
) -> TensorLikeType:
|
43 |
+
return self.to(dtype, memory_format=memory_format) # type: ignore[call-overload]
|
44 |
+
|
45 |
+
fn.__name__ = name
|
46 |
+
return fn
|
47 |
+
|
48 |
+
|
49 |
+
bfloat16 = _make_conversion_method("bfloat16", torch.bfloat16)
|
50 |
+
|
51 |
+
bool = _make_conversion_method("bool", torch.bool)
|
52 |
+
|
53 |
+
byte = _make_conversion_method("byte", torch.uint8)
|
54 |
+
|
55 |
+
cdouble = _make_conversion_method("cdouble", torch.cdouble)
|
56 |
+
|
57 |
+
cfloat = _make_conversion_method("cfloat", torch.cfloat)
|
58 |
+
|
59 |
+
chalf = _make_conversion_method("chalf", torch.complex32)
|
60 |
+
|
61 |
+
char = _make_conversion_method("char", torch.int8)
|
62 |
+
|
63 |
+
double = _make_conversion_method("double", torch.double)
|
64 |
+
|
65 |
+
float = _make_conversion_method("float", torch.float)
|
66 |
+
|
67 |
+
half = _make_conversion_method("half", torch.half)
|
68 |
+
|
69 |
+
int = _make_conversion_method("int", torch.int)
|
70 |
+
|
71 |
+
long = _make_conversion_method("long", torch.long)
|
72 |
+
|
73 |
+
short = _make_conversion_method("short", torch.short)
|
74 |
+
|
75 |
+
|
76 |
+
@register_decomposition(torch._ops.ops.aten.complex)
|
77 |
+
# Note: complex has type promotion tests disabled due to different semantics.
|
78 |
+
# exact_dtype is for compat with complex_check_dtype from core.
|
79 |
+
@out_wrapper(exact_dtype=True)
|
80 |
+
def complex(real: TensorLikeType, imag: TensorLikeType) -> TensorLikeType:
|
81 |
+
allowed_dtypes = (torch.float32, torch.float64, torch.float16)
|
82 |
+
torch._check(
|
83 |
+
real.dtype in allowed_dtypes and imag.dtype in allowed_dtypes,
|
84 |
+
lambda: (
|
85 |
+
f"Expected both inputs to be Half, Float or Double tensors but got "
|
86 |
+
f"{real.dtype} and {imag.dtype}"
|
87 |
+
),
|
88 |
+
)
|
89 |
+
torch._check(
|
90 |
+
real.dtype == imag.dtype,
|
91 |
+
lambda: (
|
92 |
+
f"Expected object of scalar type {real.dtype} but got "
|
93 |
+
f"scalar type {imag.dtype} for second argument"
|
94 |
+
),
|
95 |
+
)
|
96 |
+
result_dtype = utils.corresponding_complex_dtype(real.dtype) # type: ignore[arg-type]
|
97 |
+
common_shape = _broadcast_shapes(real.shape, imag.shape)
|
98 |
+
result = real.new_empty(
|
99 |
+
common_shape,
|
100 |
+
dtype=result_dtype,
|
101 |
+
layout=real.layout,
|
102 |
+
device=real.device,
|
103 |
+
# pin_memory=real.is_pinned(), # NYI
|
104 |
+
)
|
105 |
+
result.real = real
|
106 |
+
result.imag = imag
|
107 |
+
return result
|
108 |
+
|
109 |
+
|
110 |
+
@register_decomposition(torch._ops.ops.aten.polar)
|
111 |
+
# Note: polar has type promotion tests disabled due to different semantics.
|
112 |
+
# exact_dtype is for compat with complex_check_dtype from core.
|
113 |
+
@out_wrapper(exact_dtype=True)
|
114 |
+
def polar(abs: TensorLikeType, angle: TensorLikeType) -> TensorLikeType:
|
115 |
+
result = torch.complex(abs, angle)
|
116 |
+
result.real = abs * torch.cos(angle)
|
117 |
+
result.imag = abs * torch.sin(angle)
|
118 |
+
return result
|
llmeval-env/lib/python3.10/site-packages/torch/_refs/linalg/__init__.py
ADDED
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from functools import partial
|
2 |
+
|
3 |
+
from typing import List, Optional, Tuple, Union
|
4 |
+
|
5 |
+
import torch
|
6 |
+
|
7 |
+
import torch._prims as prims
|
8 |
+
|
9 |
+
import torch._prims_common as utils
|
10 |
+
import torch._refs as refs
|
11 |
+
import torch._refs.linalg as linalg
|
12 |
+
from torch import Tensor
|
13 |
+
from torch._prims_common import (
|
14 |
+
check_fp_or_complex,
|
15 |
+
check_is_matrix,
|
16 |
+
Dim,
|
17 |
+
DimsType,
|
18 |
+
ELEMENTWISE_TYPE_PROMOTION_KIND,
|
19 |
+
IntLike,
|
20 |
+
NumberType,
|
21 |
+
TensorLikeType,
|
22 |
+
)
|
23 |
+
from torch._prims_common.wrappers import (
|
24 |
+
_maybe_convert_to_dtype,
|
25 |
+
elementwise_type_promotion_wrapper,
|
26 |
+
out_wrapper,
|
27 |
+
)
|
28 |
+
|
29 |
+
|
30 |
+
__all__ = [
|
31 |
+
"diagonal",
|
32 |
+
"matrix_norm",
|
33 |
+
"norm",
|
34 |
+
"svd",
|
35 |
+
"svdvals",
|
36 |
+
"vector_norm",
|
37 |
+
"vecdot",
|
38 |
+
"cross",
|
39 |
+
]
|
40 |
+
|
41 |
+
|
42 |
+
def _check_norm_dtype(dtype: Optional[torch.dtype], x_dtype: torch.dtype, fn_name: str):
|
43 |
+
"""
|
44 |
+
Checks related to the dtype kwarg in `linalg.*norm` functions
|
45 |
+
"""
|
46 |
+
if dtype is not None:
|
47 |
+
torch._check(
|
48 |
+
utils.is_float_dtype(dtype) or utils.is_complex_dtype(dtype),
|
49 |
+
lambda: f"{fn_name}: dtype should be floating point or complex. Got {dtype}",
|
50 |
+
)
|
51 |
+
torch._check(
|
52 |
+
utils.is_complex_dtype(dtype) == utils.is_complex_dtype(x_dtype),
|
53 |
+
lambda: "{fn_name}: dtype should be {d} for {d} inputs. Got {dtype}".format(
|
54 |
+
fn_name=fn_name,
|
55 |
+
d="complex" if utils.is_complex_dtype(x_dtype) else "real",
|
56 |
+
dtype=dtype,
|
57 |
+
),
|
58 |
+
)
|
59 |
+
torch._check(
|
60 |
+
utils.get_higher_dtype(dtype, x_dtype) == dtype,
|
61 |
+
lambda: f"{fn_name}: the dtype of the input ({x_dtype}) should be convertible "
|
62 |
+
"without narrowing to the specified dtype ({dtype})",
|
63 |
+
)
|
64 |
+
|
65 |
+
|
66 |
+
# Utilities should come BEFORE this import
|
67 |
+
from torch._decomp import register_decomposition
|
68 |
+
from torch._decomp.decompositions import pw_cast_for_opmath
|
69 |
+
|
70 |
+
|
71 |
+
@register_decomposition(torch._ops.ops.aten.linalg_cross)
|
72 |
+
@out_wrapper()
|
73 |
+
@pw_cast_for_opmath
|
74 |
+
def cross(a: Tensor, b: Tensor, dim: int = -1):
|
75 |
+
torch._check(
|
76 |
+
a.ndim == b.ndim,
|
77 |
+
lambda: "linalg.cross: inputs must have the same number of dimensions.",
|
78 |
+
)
|
79 |
+
torch._check(
|
80 |
+
a.size(dim) == 3 and b.size(dim) == 3,
|
81 |
+
lambda: f"linalg.cross: inputs dim {dim} must have length 3, got {a.size(dim)} and {b.size(dim)}",
|
82 |
+
)
|
83 |
+
a, b = torch.broadcast_tensors(a, b)
|
84 |
+
dim = utils.canonicalize_dim(a.ndim, dim)
|
85 |
+
idx = torch.arange(3, device=a.device)
|
86 |
+
return a.index_select(dim, (idx + 1) % 3) * b.index_select(
|
87 |
+
dim, (idx + 2) % 3
|
88 |
+
) - a.index_select(dim, (idx + 2) % 3) * b.index_select(dim, (idx + 1) % 3)
|
89 |
+
|
90 |
+
|
91 |
+
def diagonal(
|
92 |
+
input: TensorLikeType,
|
93 |
+
*,
|
94 |
+
offset: int = 0,
|
95 |
+
dim1: int = -2,
|
96 |
+
dim2: int = -1,
|
97 |
+
) -> TensorLikeType:
|
98 |
+
return torch.diagonal(input, offset=offset, dim1=dim1, dim2=dim2)
|
99 |
+
|
100 |
+
|
101 |
+
@register_decomposition(torch._ops.ops.aten.linalg_vector_norm)
|
102 |
+
@out_wrapper(exact_dtype=True)
|
103 |
+
def vector_norm(
|
104 |
+
x: TensorLikeType,
|
105 |
+
ord: Union[float, int] = 2,
|
106 |
+
dim: Optional[DimsType] = None,
|
107 |
+
keepdim: bool = False,
|
108 |
+
*,
|
109 |
+
dtype: Optional[torch.dtype] = None,
|
110 |
+
) -> Tensor:
|
111 |
+
# Checks
|
112 |
+
check_fp_or_complex(x.dtype, "linalg.vector_norm")
|
113 |
+
|
114 |
+
if isinstance(dim, Dim):
|
115 |
+
dim = [dim] # type: ignore[assignment]
|
116 |
+
|
117 |
+
if x.numel() == 0 and (ord < 0.0 or ord == float("inf")):
|
118 |
+
torch._check(
|
119 |
+
dim is not None and len(dim) != 0,
|
120 |
+
lambda: f"linalg.vector_norm cannot compute the {ord} norm on an empty tensor "
|
121 |
+
"because the operation does not have an identity",
|
122 |
+
)
|
123 |
+
shape = x.shape
|
124 |
+
assert dim is not None # mypy does not seem to be able to see through check?
|
125 |
+
for d in dim:
|
126 |
+
torch._check(
|
127 |
+
shape[d] != 0,
|
128 |
+
lambda: f"linalg.vector_norm cannot compute the {ord} norm on the "
|
129 |
+
f"dimension {d} because this dimension is empty and the "
|
130 |
+
"operation does not have an identity",
|
131 |
+
)
|
132 |
+
_check_norm_dtype(dtype, x.dtype, "linalg.vector_norm")
|
133 |
+
|
134 |
+
computation_dtype, result_dtype = utils.reduction_dtypes(
|
135 |
+
x, utils.REDUCTION_OUTPUT_TYPE_KIND.COMPLEX_TO_FLOAT, dtype
|
136 |
+
)
|
137 |
+
|
138 |
+
to_result_dtype = partial(_maybe_convert_to_dtype, dtype=result_dtype)
|
139 |
+
|
140 |
+
# Implementation
|
141 |
+
if ord == 0.0:
|
142 |
+
return torch.sum(torch.ne(x, 0.0), dim=dim, keepdim=keepdim, dtype=result_dtype)
|
143 |
+
elif ord == float("inf"):
|
144 |
+
return to_result_dtype(torch.amax(torch.abs(x), dim=dim, keepdim=keepdim)) # type: ignore[return-value,arg-type]
|
145 |
+
elif ord == float("-inf"):
|
146 |
+
return to_result_dtype(torch.amin(torch.abs(x), dim=dim, keepdim=keepdim)) # type: ignore[return-value,arg-type]
|
147 |
+
else:
|
148 |
+
# From here on the computation dtype is important as the reduction is non-trivial
|
149 |
+
x = _maybe_convert_to_dtype(x, computation_dtype) # type: ignore[assignment]
|
150 |
+
reduce_sum = partial(torch.sum, dim=dim, keepdim=keepdim)
|
151 |
+
|
152 |
+
is_ord_even = ord % 2 == 0 if isinstance(ord, IntLike) else ord % 2.0 == 0.0
|
153 |
+
if not (is_ord_even and utils.is_float_dtype(x.dtype)):
|
154 |
+
x = torch.abs(x)
|
155 |
+
return to_result_dtype(torch.pow(reduce_sum(torch.pow(x, ord)), 1.0 / ord)) # type: ignore[return-value]
|
156 |
+
|
157 |
+
|
158 |
+
def _backshift_permutation(dim0, dim1, ndim):
|
159 |
+
# Auxiliary function for matrix_norm
|
160 |
+
# Computes the permutation that moves the two given dimensions to the back
|
161 |
+
ret = [i for i in range(ndim) if i != dim0 and i != dim1]
|
162 |
+
ret.extend((dim0, dim1))
|
163 |
+
return ret
|
164 |
+
|
165 |
+
|
166 |
+
def _inverse_permutation(perm):
|
167 |
+
# Given a permutation, returns its inverse. It's equivalent to argsort on an array
|
168 |
+
return [i for i, j in sorted(enumerate(perm), key=lambda i_j: i_j[1])]
|
169 |
+
|
170 |
+
|
171 |
+
# CompositeImplicitAutograd
|
172 |
+
@out_wrapper(exact_dtype=True)
|
173 |
+
def matrix_norm(
|
174 |
+
A: TensorLikeType,
|
175 |
+
ord: Union[float, str] = "fro",
|
176 |
+
dim: DimsType = (-2, -1),
|
177 |
+
keepdim: bool = False,
|
178 |
+
*,
|
179 |
+
dtype: Optional[torch.dtype] = None,
|
180 |
+
) -> TensorLikeType:
|
181 |
+
# shape
|
182 |
+
check_is_matrix(A, "linalg.matrix_norm")
|
183 |
+
# dim
|
184 |
+
dim = utils.canonicalize_dims(A.ndim, dim)
|
185 |
+
if isinstance(dim, Dim):
|
186 |
+
dim = (dim,) # type: ignore[assignment]
|
187 |
+
torch._check(
|
188 |
+
len(dim) == 2, lambda: "linalg.matrix_norm: dim must be a 2-tuple. Got {dim}"
|
189 |
+
)
|
190 |
+
torch._check(
|
191 |
+
dim[0] != dim[1],
|
192 |
+
lambda: "linalg.matrix_norm: dims must be different. Got ({dim[0]}, {dim[1]})",
|
193 |
+
)
|
194 |
+
# dtype arg
|
195 |
+
_check_norm_dtype(dtype, A.dtype, "linalg.matrix_norm")
|
196 |
+
|
197 |
+
if isinstance(ord, str):
|
198 |
+
# ord
|
199 |
+
torch._check(
|
200 |
+
ord in ("fro", "nuc"),
|
201 |
+
lambda: "linalg.matrix_norm: Order {ord} not supported.",
|
202 |
+
)
|
203 |
+
# dtype
|
204 |
+
check_fp_or_complex(
|
205 |
+
A.dtype, "linalg.matrix_norm", allow_low_precision_dtypes=ord != "nuc"
|
206 |
+
)
|
207 |
+
|
208 |
+
if ord == "fro":
|
209 |
+
return vector_norm(A, 2, dim, keepdim, dtype=dtype)
|
210 |
+
else: # ord == "nuc"
|
211 |
+
if dtype is not None:
|
212 |
+
A = _maybe_convert_to_dtype(A, dtype) # type: ignore[assignment]
|
213 |
+
perm = _backshift_permutation(dim[0], dim[1], A.ndim)
|
214 |
+
result = torch.sum(svdvals(prims.transpose(A, perm)), -1, keepdim)
|
215 |
+
if keepdim:
|
216 |
+
inv_perm = _inverse_permutation(perm)
|
217 |
+
result = prims.transpose(torch.unsqueeze(result, -1), inv_perm)
|
218 |
+
return result
|
219 |
+
else:
|
220 |
+
# ord
|
221 |
+
abs_ord = abs(ord)
|
222 |
+
torch._check(
|
223 |
+
abs_ord in (2, 1, float("inf")),
|
224 |
+
lambda: "linalg.matrix_norm: Order {ord} not supported.",
|
225 |
+
)
|
226 |
+
# dtype
|
227 |
+
check_fp_or_complex(
|
228 |
+
A.dtype, "linalg.matrix_norm", allow_low_precision_dtypes=ord != 2
|
229 |
+
)
|
230 |
+
|
231 |
+
max_min = partial(torch.amax if ord > 0.0 else torch.amin, keepdim=keepdim)
|
232 |
+
|
233 |
+
if abs_ord == 2.0:
|
234 |
+
if dtype is not None:
|
235 |
+
A = _maybe_convert_to_dtype(A, dtype) # type: ignore[assignment]
|
236 |
+
perm = _backshift_permutation(dim[0], dim[1], A.ndim)
|
237 |
+
result = max_min(svdvals(prims.transpose(A, perm)), dim=-1)
|
238 |
+
if keepdim:
|
239 |
+
inv_perm = _inverse_permutation(perm)
|
240 |
+
result = prims.transpose(torch.unsqueeze(result, -1), inv_perm)
|
241 |
+
return result
|
242 |
+
else: # 1, -1, inf, -inf
|
243 |
+
dim0, dim1 = dim
|
244 |
+
if abs_ord == float("inf"):
|
245 |
+
dim0, dim1 = dim1, dim0
|
246 |
+
if not keepdim and (dim0 < dim1):
|
247 |
+
dim1 -= 1
|
248 |
+
return max_min(
|
249 |
+
vector_norm(A, 1.0, dim=dim0, keepdim=keepdim, dtype=dtype), dim1
|
250 |
+
)
|
251 |
+
|
252 |
+
|
253 |
+
# CompositeImplicitAutograd
|
254 |
+
@out_wrapper(exact_dtype=True)
|
255 |
+
def norm(
|
256 |
+
A: TensorLikeType,
|
257 |
+
ord: Optional[Union[float, str]] = None,
|
258 |
+
dim: Optional[DimsType] = None,
|
259 |
+
keepdim: bool = False,
|
260 |
+
*,
|
261 |
+
dtype: Optional[torch.dtype] = None,
|
262 |
+
) -> TensorLikeType:
|
263 |
+
if dim is not None:
|
264 |
+
if isinstance(dim, Dim):
|
265 |
+
dim = (dim,) # type: ignore[assignment]
|
266 |
+
torch._check(
|
267 |
+
len(dim) in (1, 2),
|
268 |
+
lambda: "linalg.norm: If dim is specified, it must be of length 1 or 2. Got {dim}",
|
269 |
+
)
|
270 |
+
elif ord is not None:
|
271 |
+
torch._check(
|
272 |
+
A.ndim in (1, 2),
|
273 |
+
lambda: "linalg.norm: If dim is not specified but ord is, the input must be 1D or 2D. Got {A.ndim}D",
|
274 |
+
)
|
275 |
+
|
276 |
+
if ord is not None and (
|
277 |
+
(dim is not None and len(dim) == 2) or (dim is None and A.ndim == 2)
|
278 |
+
):
|
279 |
+
if dim is None:
|
280 |
+
dim = (0, 1)
|
281 |
+
return matrix_norm(A, ord, dim, keepdim, dtype=dtype)
|
282 |
+
else:
|
283 |
+
if ord is None:
|
284 |
+
ord = 2.0
|
285 |
+
return vector_norm(A, ord, dim, keepdim, dtype=dtype)
|
286 |
+
|
287 |
+
|
288 |
+
# CompositeImplicitAutograd
|
289 |
+
@out_wrapper("U", "S", "Vh", exact_dtype=True)
|
290 |
+
def svd(A: TensorLikeType, full_matrices: bool = True) -> Tuple[Tensor, Tensor, Tensor]:
|
291 |
+
return prims.svd(A, full_matrices=full_matrices)
|
292 |
+
|
293 |
+
|
294 |
+
# CompositeImplicitAutograd
|
295 |
+
@out_wrapper(exact_dtype=True)
|
296 |
+
def svdvals(A: TensorLikeType) -> Tensor:
|
297 |
+
return svd(A, full_matrices=False)[1]
|
298 |
+
|
299 |
+
|
300 |
+
# CompositeImplicitAutograd
|
301 |
+
@out_wrapper()
|
302 |
+
@elementwise_type_promotion_wrapper(
|
303 |
+
type_promoting_args=("x", "y"),
|
304 |
+
type_promotion_kind=ELEMENTWISE_TYPE_PROMOTION_KIND.DEFAULT,
|
305 |
+
)
|
306 |
+
def vecdot(x: Tensor, y: Tensor, dim: int = -1) -> Tensor:
|
307 |
+
check_fp_or_complex(x.dtype, "linalg.vecdot")
|
308 |
+
return (x.conj() * y).sum(dim=dim)
|