semvec/pypi-packages huggingface dataset:
andvaranaut 1.0.0
Predictive modelling and UQ suite.
Requires Python: >=3.8

# Andvaranaut  

Predictive modelling and uncertainty quantification (UQ) suite. Use requires provision of target function which takes inputs and returns quantity of interest. In addition, probability distributions (from scipy.stats) for input variables should be specified if using sampling, along with optional input/output conversion methods (e.g bounded to unbounded range) for more performant machine learning surrogates.

Name backstory: https://en.wikipedia.org/wiki/Andvaranaut

To install run the following in the same directory as setup.py (can drop the --user flag if root):  

`pip3 install --user .`

## Functionality

### Current

- Latin hypercube sampling  
- UQ forward propagation  
- Parallel target function execution   
- Input \& output transformations   
- Gaussian process (GP) surrogates   
- Inverse Bayesian problems via maximum a posteriori (MAP) or Markov chain Monte Carlo (MCMC)
- GP hyperparameter optimisation via MAP or MCMC
- Hyperparameter optimisation optionally includes those necessary for complex multi-layered input and output transformations
- Custom GP mean functions
- Bayesian optimisation

### Future
 
- PCE surrogates
- Neural networks (NN)
- NN autoencoding for GP surrogate
- GP adaptive sampling  

## Tutorial

In tutorial/ is a Jupyter notebook called tutorial.ipynb. This will walk through most basic package functionality.
pydantic-serializer 0.2.1
A decorator to serialize a string into a Pydantic model with error handling
Requires Python: <4.0,>=3.12

# Pydantic deserializer

this is a simple decorator that can be used on functions that have a return type of `str`, To deserialize it into a given Pydantic Model.

## Usage:

For a function returning a string:

```py
def func_returning_str() -> str:
    return '{"sample": "json"}'
```

Let's say there's a Pydantic model like so:

```py
class SampleJson(BaseModel):
    sample: str
```

We can try and parse it with the decorator:

```py
from pydantic_serializer import deserialize

@deserialize(return_type=SampleJson)
def func_returning_str() -> str:
    return '{"sample": "json"}'
```

The function will return a `None` and log the error using `loguru` if there is an error.
If no error occurs, then you should get a return type of `SampleJson` in this case.