PyGeoModel 1.0.1__tar.gz → 1.0.2__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.
- pygeomodel-1.0.2/MANIFEST.in +9 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/PKG-INFO +1 -1
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/PyGeoModel.egg-info/PKG-INFO +1 -1
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/pygeomodel/__init__.py +11 -11
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/setup.py +1 -3
- pygeomodel-1.0.1/MANIFEST.in +0 -7
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/LICENSE +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/PyGeoModel.egg-info/SOURCES.txt +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/PyGeoModel.egg-info/dependency_links.txt +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/PyGeoModel.egg-info/requires.txt +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/PyGeoModel.egg-info/top_level.txt +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/README.md +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/data/computeModel.json +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/data/modelContext.txt +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/__init__.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/base.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/constants.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data/PGA.tif +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data/baseclip.tif +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data/intensity.tif +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_67c32dc057e89375/LandSlide-outputIntensitypbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_67c32dc057e89375/LandSlide-outputPGApbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_7972c0716caa1213/LandSlide-outputIntensitypbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_7972c0716caa1213/LandSlide-outputPGApbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_a044c410df669372/LandSlide-outputIntensitypbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_a044c410df669372/LandSlide-outputPGApbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_b6ba56c07bf80c30/LandSlide-outputIntensitypbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/data//345/234/260/351/234/207/347/276/244/345/217/221/346/273/221/345/235/241/346/246/202/347/216/207/350/257/204/344/274/260/351/242/204/350/255/246/346/250/241/345/236/213_b6ba56c07bf80c30/LandSlide-outputPGApbtyTif.tif" +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openModel.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openUtils/__init__.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openUtils/exceptions.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openUtils/http_client.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openUtils/mdlUtils.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openUtils/parameterValidator.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/ogmsServer2/openUtils/stateManager.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/pygeomodel/data/computeModel.json +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/pygeomodel/data/modelContext.txt +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/scripts.py +0 -0
- {pygeomodel-1.0.1 → pygeomodel-1.0.2}/setup.cfg +0 -0
|
@@ -311,20 +311,20 @@ class GeoModeler:
|
|
|
311
311
|
if model_name in models_data:
|
|
312
312
|
model_data = models_data[model_name]
|
|
313
313
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
# 添加到缓存
|
|
315
|
+
if len(self._model_cache) >= self._max_cache_size:
|
|
316
|
+
# 移除最旧的缓存项
|
|
317
|
+
oldest_key = next(iter(self._model_cache))
|
|
318
|
+
del self._model_cache[oldest_key]
|
|
319
319
|
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
self._model_cache[model_name] = model_data
|
|
321
|
+
self.models[model_name] = Model(model_name, model_data)
|
|
322
322
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
323
|
+
# 定期清理内存
|
|
324
|
+
if len(self.models) % 5 == 0:
|
|
325
|
+
cleanup_memory()
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
return self.models[model_name]
|
|
328
328
|
except Exception as e:
|
|
329
329
|
print(f"Failed to load model '{model_name}': {str(e)}")
|
|
330
330
|
return None
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from setuptools import setup, find_packages
|
|
2
2
|
|
|
3
|
-
# 读取README文件
|
|
4
|
-
|
|
5
3
|
|
|
6
4
|
def read_readme():
|
|
7
5
|
try:
|
|
@@ -13,7 +11,7 @@ def read_readme():
|
|
|
13
11
|
|
|
14
12
|
setup(
|
|
15
13
|
name="PyGeoModel",
|
|
16
|
-
version="1.0.
|
|
14
|
+
version="1.0.2",
|
|
17
15
|
author="Your Name", # 请替换为您的姓名
|
|
18
16
|
author_email="your.email@example.com", # 请替换为您的邮箱
|
|
19
17
|
description="An intelligent Python toolkit for geographic modeling with smart model recommendations",
|
pygeomodel-1.0.1/MANIFEST.in
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|