sapiens-gpt 1.0.2__tar.gz → 2.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/PKG-INFO +5 -5
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/sapiens_gpt/sapiens_gpt.py +16 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/sapiens_gpt.egg-info/PKG-INFO +5 -5
- sapiens_gpt-2.0.4/sapiens_gpt.egg-info/requires.txt +8 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/setup.py +9 -2
- sapiens_gpt-1.0.2/sapiens_gpt.egg-info/requires.txt +0 -6
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/LICENSE.txt +0 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/sapiens_gpt/__init__.py +0 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/sapiens_gpt.egg-info/SOURCES.txt +0 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/sapiens_gpt.egg-info/dependency_links.txt +0 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/sapiens_gpt.egg-info/top_level.txt +0 -0
- {sapiens_gpt-1.0.2 → sapiens_gpt-2.0.4}/setup.cfg +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sapiens_gpt
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Home-page: https://github.com/sapiens-technology/sapiens_gpt
|
|
5
5
|
Author: SAPIENS TECHNOLOGY
|
|
6
6
|
License: Proprietary Software
|
|
7
7
|
License-File: LICENSE.txt
|
|
8
|
-
Requires-Dist: torch
|
|
9
|
-
Requires-Dist:
|
|
10
|
-
Requires-Dist:
|
|
11
|
-
Requires-Dist: tiktoken==0.4.0
|
|
8
|
+
Requires-Dist: torch
|
|
9
|
+
Requires-Dist: numpy
|
|
10
|
+
Requires-Dist: tiktoken
|
|
12
11
|
Requires-Dist: tqdm
|
|
13
12
|
Requires-Dist: certifi
|
|
13
|
+
Requires-Dist: torch-xla==2.7.0; platform_system == "Linux" and platform_machine == "x86_64"
|
|
14
14
|
Dynamic: author
|
|
15
15
|
Dynamic: home-page
|
|
16
16
|
Dynamic: license
|
|
@@ -62,6 +62,8 @@ class SapiensGPT:
|
|
|
62
62
|
elif self.__xm is not None: self.device = self.__xm.xla_device()
|
|
63
63
|
elif backends.mps.is_available(): self.device = device('mps')
|
|
64
64
|
else: self.device = device('cpu')
|
|
65
|
+
from sys import setrecursionlimit
|
|
66
|
+
setrecursionlimit(self.epochs+10)
|
|
65
67
|
self.__Dataset = Dataset
|
|
66
68
|
self.__Module = Module
|
|
67
69
|
self.__neural_network = artificial_neural_network
|
|
@@ -428,6 +430,8 @@ class SapiensGPT:
|
|
|
428
430
|
string_precision = f'{precision:.4f}'.ljust(5, '0')
|
|
429
431
|
formatted_string = '{desc}: {percentage:3.0f}%|{bar:10}| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt:>9}]'
|
|
430
432
|
if self.__xm is not None or str(self.device).lower().strip() == 'tpu': self.device = self.__xm.xla_device()
|
|
433
|
+
from sys import setrecursionlimit
|
|
434
|
+
setrecursionlimit(self.epochs*self.batch_size)
|
|
431
435
|
while feed_forward:
|
|
432
436
|
self.__model.train()
|
|
433
437
|
loss_item, total_train_loss = 1.0, 1.0
|
|
@@ -476,6 +480,18 @@ class SapiensGPT:
|
|
|
476
480
|
except: pass
|
|
477
481
|
try: return training_metrics
|
|
478
482
|
except: return {'val_loss': 1.0, 'loss': 1.0, 'generalization_rate': 0.0, 'precision': 0.0}
|
|
483
|
+
def training(self, dataset_path='', progress=True):
|
|
484
|
+
try: return self.train(dataset_path=dataset_path, progress=progress)
|
|
485
|
+
except Exception as error:
|
|
486
|
+
try:
|
|
487
|
+
if self.__show_errors:
|
|
488
|
+
error_message = 'ERROR in SapiensGPT.training: '+str(error)
|
|
489
|
+
print(error_message)
|
|
490
|
+
try: self.__print_exc() if self.__display_error_point else None
|
|
491
|
+
except: pass
|
|
492
|
+
except: pass
|
|
493
|
+
try: return training_metrics
|
|
494
|
+
except: return {'val_loss': 1.0, 'loss': 1.0, 'generalization_rate': 0.0, 'precision': 0.0}
|
|
479
495
|
def saveModel(self, model_path='', progress=True):
|
|
480
496
|
try:
|
|
481
497
|
model_path = str(model_path).strip()
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: sapiens_gpt
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Home-page: https://github.com/sapiens-technology/sapiens_gpt
|
|
5
5
|
Author: SAPIENS TECHNOLOGY
|
|
6
6
|
License: Proprietary Software
|
|
7
7
|
License-File: LICENSE.txt
|
|
8
|
-
Requires-Dist: torch
|
|
9
|
-
Requires-Dist:
|
|
10
|
-
Requires-Dist:
|
|
11
|
-
Requires-Dist: tiktoken==0.4.0
|
|
8
|
+
Requires-Dist: torch
|
|
9
|
+
Requires-Dist: numpy
|
|
10
|
+
Requires-Dist: tiktoken
|
|
12
11
|
Requires-Dist: tqdm
|
|
13
12
|
Requires-Dist: certifi
|
|
13
|
+
Requires-Dist: torch-xla==2.7.0; platform_system == "Linux" and platform_machine == "x86_64"
|
|
14
14
|
Dynamic: author
|
|
15
15
|
Dynamic: home-page
|
|
16
16
|
Dynamic: license
|
|
@@ -5,13 +5,20 @@
|
|
|
5
5
|
# --------------------------> A SAPIENS TECHNOLOGY®️ PRODUCTION) <--------------------------
|
|
6
6
|
from setuptools import setup, find_packages
|
|
7
7
|
package_name = 'sapiens_gpt'
|
|
8
|
-
version = '
|
|
8
|
+
version = '2.0.4'
|
|
9
9
|
setup(
|
|
10
10
|
name=package_name,
|
|
11
11
|
version=version,
|
|
12
12
|
author='SAPIENS TECHNOLOGY',
|
|
13
13
|
packages=find_packages(),
|
|
14
|
-
install_requires=[
|
|
14
|
+
install_requires=[
|
|
15
|
+
'torch',
|
|
16
|
+
'numpy',
|
|
17
|
+
'tiktoken',
|
|
18
|
+
'tqdm',
|
|
19
|
+
'certifi',
|
|
20
|
+
"torch-xla==2.7.0; platform_system=='Linux' and platform_machine=='x86_64'"
|
|
21
|
+
],
|
|
15
22
|
url='https://github.com/sapiens-technology/sapiens_gpt',
|
|
16
23
|
license='Proprietary Software'
|
|
17
24
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|