semvec/pypi-packages huggingface dataset:
stelar-spatiotemporal 0.0.33
Spatiotemporal data processing for the STELAR project

\n# STELAR Spatiotemporal Data Processing Package

This package is part of the EU STELAR project and provides tools for processing spatiotemporal data. The package includes functionality for field delineation (i.e., segmentation) of satellite images, extracting LAI timseries out of the images, and interpolating cloud covers, among others.

## Installation.

To install the package, simply run:
```
pip install git+https://github.com/stelar-eu/STELAR_spatiotemporal.git@master
```

## Usage.

To use the package, import it in your Python code:

```python
import stelar_spatiotemporal
```
Then, you can use the various functions provided by the package to process your spatiotemporal data.

## Contributing
If you would like to contribute to the package, please see the CONTRIBUTING.md file for guidelines.

## License
This package is licensed under the MIT License. See the LICENSE file for details.

## Contact
If you have any questions, please contact [Jens D'hondt](mailto:j.e.d.hondt@tue.nl).

## Contributors
- Jens d'Hondt (Eindhoven University of Technology)
- Giorgos Chatzigeorgakidis (Athena Research Center)
- Christoph Joerges (VISTA GmbH)
tracktable-data 1.7.3.1
Supplemental data files for Tracktable
Requires Python: >=3.9

# Welcome to Tracktable-Data!

Tracktable-Data is a supplimental data package for the Tracktable library. Refer to the
Tracktable [documentation](https://tracktable.readthedocs.org) and [Github repository](https://github.com/sandialabs/tracktable)
for more information on Tracktable's capabilities and usage.

## Usage
Below are example of how to use, `retrieve()`, the only function in the `tracktable-data` package.

```python
from tracktable_data.data import retrieve

# Retrieve file with a name
filepath = retrieve(filename="SampleFlightsUS.csv") # Returns a string

# Retrieve all files with a matching extension
filepathss = retrieve(file_ext=".csv") # Returns a list of strings

# Retrieve all files
all_files = retrieve() # Returns a dictionary

# See all files that can be retrived
retrieve(print_filenames=True)

# See all file extensions that can be retrived
retrieve(print_extensions=True)

```

## Copyright Notice

Copyright (c) 2014-2023 National Technology and Engineering
Solutions of Sandia, LLC. Under the terms of Contract DE-NA0003525
with National Technology and Engineering Solutions of Sandia, LLC,
the U.S. Government retains certain rights in this software.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ewatercycle-wflowjl 0.2.0
Wflow.jl eWaterCycle plugin
Keywords: ewatercycle, hydrology

# eWaterCycle plugin for the Wflow.jl hydrological model

Wflow.jl plugin for [eWatercycle](https://ewatercycle.readthedocs.io/).

The Wflow.jl documentation is available at https://deltares.github.io/Wflow.jl/ .

## Installation

Please first install ewatercycle, for more info see the [general ewatercycle documentation](https://ewatercycle.readthedocs.io/).

To install this package alongside your eWaterCycle installation, do:

```console
pip install ewatercycle-wflowjl
```

Then Wflow becomes available as one of the eWaterCycle models:

```python
import ewatercycle.models
ewatercycle.models.sources["WflowJl"]
```

## Usage

Usage of Wflow.jl forcing generation and model execution is shown in 
[docs/generate_era5_forcing.ipynb](https://github.com/eWaterCycle/ewatercycle-wflowjl/tree/main/docs/generate_era5_forcing.ipynb) and [docs/demo.ipynb](https://github.com/eWaterCycle/ewatercycle-wflow/tree/main/docs/demo.ipynb) respectively.

## License

`ewatercycle-wflowjl` is distributed under the terms of the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license.
gentuneflant5 0.1.5
Genetic Algorithm: Optimize the finetuning of FLAN-T5 models
Requires Python: >=3.6

# gentune-flan
Genetic Algorithm used to optimise the finetunning of FLAN-T5

# library dependecies
The following libraries must be installed for the library gentune-flan to work

pip install evaluate, transformers, rouge-score, pandas, numpy, torch

# the gentune-flan library
pip install gentune-flan

# Example (Summery creation from FLAN-T5 Base Model)

import gentune-flan

dataset = dataset = load_dataset("cnn_dailymail", "3.0.0", cache_dir="./hf_cache")

test_data = dataset["test"].select(range(100))

prompts = []
references = []

for ex in (list(test_data))[0:10]:
    article = ex.get("article", "")
    summary = ex.get("highlights", "")
    if isinstance(article, str) and isinstance(summary, str) and article.strip() != "" and summary.strip() != "":
        prompt = f"Summarize the following article:\n\n{article.strip()}\n\nSummary:"
        prompts.append(prompt)
        references.append(summary.strip())

params = {
            "max_length": [200, 300,400,500,600,700],
            "temperature": [0.1,0.3,0.5,0.7,0.9,1],
            "top_k": [10,20,30,50,70,90,100],
            "top_p": [0.2,0.3,0.5,0.7,0.9],
            "do_sample": True,       # Enables sampling-based decoding
            "num_beams": 1           # Beam search disabled (greedy/sample)
        }

args = gentune-flan.optimize_flan_t5_base(prompts=prompts, references=references,   params=params,      error_metric='ROUGE-L', number_of_generation = 2, mutation_rate=0.05, population_size=4, random_seed=2025)
print(args)

model_name = "google/flan-t5-base"  # or your fine-tuned path
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

inputs = tokenizer(
                  prompts,
                  return_tensors="pt",
                  padding=True,
                  truncation=True,
                  max_length=512
              )

with torch.no_grad():
            outputs = model.generate(
                input_ids=inputs["input_ids"],
                attention_mask=inputs["attention_mask"],
                **args
            )

decoded_preds = tokenizer.batch_decode(outputs, skip_special_tokens=True)

rouge = evaluate.load("rouge")
result = rouge.compute(predictions=decoded_preds, references=references, use_stemmer=True)

rouge_value = round(result['rougeL'] * 100, 2)
print(rouge_value)


# Default Hyperparameter value range

max_length : [50,100,150,200,250,300]
temperature : [0.2,0.4,0.6,0.8]
top_k : [10,20,30,40,50]
top_p : [0.3,0.5,0.7,0.9]

error_metric = 'ROUGE-L' (user can check for 'ROUGE-1', 'ROUGE-2' also)
number_of_generation = 3 (user can increase the value for better evolution)
mutation_rate = 0.05
population_size = 10 (user can increase the value for larger set for better results)