Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
69650ba
applied black formatting
connor-krill May 19, 2025
d08ce66
updated required packages to latest versions
connor-krill May 19, 2025
88aec84
updated required packages to latest versions. Removed packages exclus…
connor-krill May 19, 2025
2f77c79
relaxed beartype requirement, added hypothesis to development install
connor-krill May 20, 2025
843dead
replaced strict equality with numpy's allclose to accommodate for flo…
connor-krill May 20, 2025
c028e4c
replaced strict equality with numpy's allclose to accommodate for flo…
connor-krill May 20, 2025
91a949b
specified data type to prevent rare case where floating point errors …
connor-krill May 29, 2025
445c6a9
updated Python version to 3.11
connor-krill May 29, 2025
6a40387
changed version requirements to the versions they were written on or …
connor-krill May 29, 2025
92d774b
Fixed pylint issue by adding exception handling for polynomial basis …
connor-krill May 29, 2025
276581a
Fixed pylint issue initializing variables as None before they are ref…
connor-krill May 29, 2025
5a8144a
Fixed pylint issue initializing variables as None before they are ref…
connor-krill May 29, 2025
938358a
added else statements to raise exceptions in order to fix warnings ra…
connor-krill May 29, 2025
8f5f593
added else statements to raise exceptions in order to fix warnings ra…
connor-krill May 30, 2025
cc110cb
specified data type in tensor to fix test failure
connor-krill Jun 24, 2025
58522a2
specified dtype when converting numpy array to pytorch tensor
connor-krill Jul 16, 2025
b6d7d2a
reduced testing parameters to make sure tests meet deadline
connor-krill Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


variables:
pythonVersion: 3.9
pythonVersion: 3.11
srcDirectory: src

trigger:
Expand Down
34 changes: 17 additions & 17 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
numpy == 1.26.4
scipy == 1.6.0
matplotlib == 3.8.4
scikit-learn == 1.4.2
fire == 0.6.0
pytest == 8.2.0
coverage == 7.5.0
pytest-cov == 5.0.0
pylint == 3.1.0
wheel == 0.43.0
pytest-azurepipelines == 1.0.5
twine == 5.0.0
pathlib~=1.0.1
beartype == 0.18.5
setuptools~=65.5.1
torch ~= 2.2.2
torchinfo ~= 1.8.0
numpy >= 1.26.4
scipy >= 1.6.0
matplotlib >= 3.8.4
scikit-learn >= 1.4.2
fire >= 0.6.0
pytest >= 8.2.0
coverage >= 7.5.0
pytest-cov >= 5.0.0
pylint >= 3.1.0
wheel >= 0.43.0
pytest-azurepipelines >= 1.0.5
twine >= 5.0.0
pathlib >= 1.0.1
beartype >= 0.18.5
setuptools >= 65.5.1
torch >= 2.2.2
torchinfo >= 1.8.0
59 changes: 34 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,52 +1,61 @@
#!/usr/bin/env python
import sys

version = sys.argv[1]
del sys.argv[1]
from setuptools import setup, find_packages

from pathlib import Path

this_directory = Path(__file__).parent
long_description = (this_directory / "README.rst").read_text()

setup(
name='UQpy',
name="UQpy",
version=version,
url='https://github.com/SURGroup/UQpy',
url="https://github.com/SURGroup/UQpy",
description="UQpy is a general purpose toolbox for Uncertainty Quantification",
long_description=long_description,
author="Michael D. Shields, Dimitris G. Giovanis, Audrey Olivier, Aakash Bangalore-Satish, Mohit Chauhan, "
"Lohit Vandanapu, Ketson R.M. dos Santos",
license='MIT',
"Lohit Vandanapu, Ketson R.M. dos Santos",
license="MIT",
platforms=["OSX", "Windows", "Linux"],
packages=find_packages("src"),
package_dir={"": "src"},
package_data={"": ["*.pdf"]},
python_requires='>3.9.0',
python_requires=">3.9.0",
install_requires=[
"numpy==1.26.4", "scipy>=1.6.0", "matplotlib==3.8.4", "scikit-learn==1.4.2", 'fire==0.6.0',
"beartype==0.18.5", "torch ~= 2.2.2", "torchinfo ~= 1.8.0"
"numpy >= 1.26.4",
"scipy >= 1.6.0",
"matplotlib >= 3.8.4",
"scikit-learn >= 1.4.2",
"fire >= 0.6.0",
"beartype >= 0.18.5",
"torch >= 2.2.2",
"torchinfo >= 1.8.0",
],
extras_require={
'dev': [
'pytest == 8.2.0',
'pytest-cov == 5.0.0',
'pylint == 3.1.0',
'pytest-azurepipelines == 1.0.5',
'pytest-cov == 5.0.0',
'wheel == 0.43.0',
'twine == 5.0.0',
'sphinx_autodoc_typehints == 1.23.0',
'sphinx_rtd_theme == 1.2.0',
'sphinx_gallery == 0.13.0',
'sphinxcontrib_bibtex == 2.5.0',
'Sphinx==6.1.3',
"dev": [
"pytest == 8.2.0",
"pytest-cov == 5.0.0",
"pylint == 3.1.0",
"pytest-azurepipelines == 1.0.5",
"pytest-cov == 5.0.0",
"wheel == 0.43.0",
"twine == 5.0.0",
"sphinx_autodoc_typehints == 1.23.0",
"sphinx_rtd_theme == 1.2.0",
"sphinx_gallery == 0.13.0",
"sphinxcontrib_bibtex == 2.5.0",
"Sphinx == 6.1.3",
"hypothesis ~= 6.131.19"
]
},
classifiers=[
'Programming Language :: Python :: 3',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Mathematics',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
],
)
5 changes: 5 additions & 0 deletions src/UQpy/run_model/model_execution/ThirdPartyModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ def execute_single_sample(self, index, sample_to_send):
def postprocess_single_file(self, index, model_output):
if self.output_script is not None:
output = self._output_serial(index)
else:
raise RuntimeError(
"UQpy: To postprocess a run using postprocess_single_file within RunModel, output_script cannot be equal to None."
" See documentation for usage details."
)

work_dir = os.path.join(self.model_dir, "run_" + str(index))
# Remove the copied files and folders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def generalized_jensen_shannon_divergence(
alpha * kl_divergence_p_m
)
js_divergence /= n_samples
js_divergence = torch.tensor(js_divergence, device=device)
js_divergence = torch.tensor(js_divergence, device=device, dtype=torch.float32)

if reduction == "none":
return js_divergence
Expand Down
4 changes: 4 additions & 0 deletions src/UQpy/sensitivity/PostProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def plot_sensitivity_index(
error = confidence_interval[:, 1] - indices
else:
conf_int_flag = False
error = None

# x and y data
_idx = np.arange(num_vars)
Expand Down Expand Up @@ -171,12 +172,14 @@ def plot_index_comparison(
error_1 = confidence_interval_1[:, 1] - indices_1
else:
conf_int_flag_1 = False
error_1 = None

if confidence_interval_2 is not None:
conf_int_flag_2 = True
error_2 = confidence_interval_2[:, 1] - indices_2
else:
conf_int_flag_2 = False
error_2 = None

# x and y data
_idx = np.arange(num_vars)
Expand Down Expand Up @@ -289,6 +292,7 @@ def plot_second_order_indices(
error = confidence_interval[:, 1] - indices
else:
conf_int_flag = False
error = None

# x and y data
_idx = np.arange(num_second_order_terms)
Expand Down
Loading
Loading