# packages

pkgId: 58c6c755b6ccb14493c59a35ce735c50350fc858f469ce0566956fac842bc3d9
name: python-toolslm-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for toolslm
url: https://github.com/AnswerDotAI/toolslm
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-toolslm-0.1.0-1.src.rpm
location_href: Packages/python-toolslm-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

  This is a work in progress…



  ``` sh
  pip install toolslm
  ```





  toolslm has some helpers to make it easier to generate XML context from
  files, for instance
  [`folder2ctx`](https://AnswerDotAI.github.io/toolslm/xml.html#folder2ctx):

  ``` python
  print(folder2ctx('samples', prefix=False, file_glob='*.py'))
  ```

      <documents><document index="1"><src>
      samples/sample_core.py
      </src><document-content>
      import inspect
      empty = inspect.Parameter.empty
      models = 'claude-3-opus-20240229','claude-3-sonnet-20240229','claude-3-haiku-20240307'
      </document-content></document></documents>

  JSON doesn’t map as nicely to XML as the `ft` data structure from
  `fastcore.xml`, but for simple XML trees it can be convenient. The
  [`json_to_xml`](https://AnswerDotAI.github.io/toolslm/xml.html#json_to_xml)
  function handles that conversion:

  ``` python
  a = dict(surname='Howard', firstnames=['Jeremy','Peter'],
           address=dict(state='Queensland',country='Australia'))
  print(json_to_xml(a, 'person'))
  ```

      <person>
        <surname>Howard</surname>
        <firstnames>
          <item>Jeremy</item>
          <item>Peter</item>
        </firstnames>
        <address>
          <state>Queensland</state>
          <country>Australia</country>
        </address>
      </person>


pkgId: d4605bd92be5bd49a92e1fb6bf74bf89fa3d49c5bab422f1245180e7e268e27b
name: python-topaz-em-help
arch: noarch
version: 0.3.5
epoch: 0
release: 1
summary: Development documents and examples for topaz-em
url: https://github.com/tbepler/topaz
rpm_license: GPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-topaz-em-0.3.5-1.src.rpm
location_href: Packages/python-topaz-em-help-0.3.5-1.noarch.rpm
checksum_type: sha256
description:
  Particle picking software for single particle cryo-electron microscopy using convolutional neural networks and positive-unlabeled learning. Includes methods for micrograph denoising.


pkgId: 6f426f2c7ff831232935b22a7d7a1755ff5776e92d31a8056df799a91f92a27e
name: python-torch-book-help
arch: noarch
version: 0.1
epoch: 0
release: 1
summary: Development documents and examples for torch-book
url: https://pypi.org/project/torch-book/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-book-0.1-1.src.rpm
location_href: Packages/python-torch-book-help-0.1-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI][pypi-badge]][pypi-link]
  [![GitHub issues][issue-badge]][issue-link]
  [![GitHub forks][fork-badge]][fork-link]
  [![GitHub stars][star-badge]][star-link]
  [![GitHub license][license-badge]][license-link]
  [![contributors][contributor-badge]][contributor-link]
  [![watcher][watcher-badge]][watcher-link]
  [![Binder][binder-badge]][binder-link]
  [![Downloads][download-badge]][download-link]
  [![Documentation Status][status-badge]][status-link]
  [![PyPI - Downloads][install-badge]][install-link]
  ![repo size](https://img.shields.io/github/repo-size/xinetzone/torch-book.svg)
  [![Downloads Week](https://pepy.tech/badge/torch-book/week)](https://pepy.tech/project/torch-book)
  [![Documentation Status][rtd-badge]][rtd-link]
  [![Upload Python Package][upload-python-package-badge]][upload-python-package-link]

  借助 PyTorch 探索有趣之事。

  [upload-python-package-badge]: https://github.com/xinetzone/torch-book/actions/workflows/python-publish.yml/badge.svg
  [upload-python-package-link]: https://github.com/xinetzone/torch-book/actions/workflows/python-publish.yml
  [pypi-badge]: https://img.shields.io/pypi/v/torch-book.svg
  [pypi-link]: https://pypi.org/project/torch-book/
  [issue-badge]: https://img.shields.io/github/issues/xinetzone/torch-book
  [issue-link]: https://github.com/xinetzone/torch-book/issues
  [fork-badge]: https://img.shields.io/github/forks/xinetzone/torch-book
  [fork-link]: https://github.com/xinetzone/torch-book/network
  [star-badge]: https://img.shields.io/github/stars/xinetzone/torch-book
  [star-link]: https://github.com/xinetzone/torch-book/stargazers
  [license-badge]: https://img.shields.io/github/license/xinetzone/torch-book
  [license-link]: https://github.com/xinetzone/torch-book/LICENSE
  [contributor-badge]: https://img.shields.io/github/contributors/xinetzone/torch-book
  [contributor-link]: https://github.com/xinetzone/torch-book/contributors
  [watcher-badge]: https://img.shields.io/github/watchers/xinetzone/torch-book
  [watcher-link]: https://github.com/xinetzone/torch-book/watchers
  [binder-badge]: https://mybinder.org/badge_logo.svg
  [binder-link]: https://mybinder.org/v2/gh/xinetzone/torch-book/main
  [install-badge]: https://img.shields.io/pypi/dw/torch-book?label=pypi%20installs
  [install-link]: https://pypistats.org/packages/torch-book
  [status-badge]: https://readthedocs.org/projects/torch-book/badge/?version=latest
  [status-link]: https://torch-book.readthedocs.io/zh/latest/?badge=latest
  [download-badge]: https://pepy.tech/badge/torch-book
  [download-link]: https://pepy.tech/project/torch-book
  [rtd-badge]: https://readthedocs.org/projects/torch-book/badge/?version=latest
  [rtd-link]: https://torch-book.readthedocs.io/zh/latest/?badge=latest



  需要安装 `torch-book` 包：

  ```shell
  pip install torch-book
  ```


pkgId: 63b5a04a2fbebab15c373b8f498189adf2a4080d2af07d0b4178abf4285917f3
name: python-torch-harmonics-help
arch: noarch
version: 0.7.3
epoch: 0
release: 1
summary: Development documents and examples for torch-harmonics
url: https://pypi.org/project/torch-harmonics/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-harmonics-0.7.3-1.src.rpm
location_href: Packages/python-torch-harmonics-help-0.7.3-1.noarch.rpm
checksum_type: sha256
description:
  <!--
  SPDX-FileCopyrightText: Copyright (c) 2022 The torch-harmonics Authors. All rights reserved.

  SPDX-License-Identifier: BSD-3-Clause

  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.

  3. Neither the name of the copyright holder nor the names of its
     contributors may be used to endorse or promote products derived from
     this software without specific prior written permission.

  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.
  -->

  <!-- <div align="center">
      <img src="https://raw.githubusercontent.com/NVIDIA/torch-harmonics/main/images/logo/logo.png"  width="568">
      <br>
      <a href="https://github.com/NVIDIA/torch-harmonics/actions/workflows/tests.yml"><img src="https://github.com/NVIDIA/torch-harmonics/actions/workflows/tests.yml/badge.svg"></a>
      <a href="https://pypi.org/project/torch_harmonics/"><img src="https://img.shields.io/pypi/v/torch_harmonics"></a>
  </div> -->

  <!--
  [![pypi](https://img.shields.io/pypi/v/torch_harmonics)](https://pypi.org/project/torch_harmonics/)
  -->

  <!-- # spherical harmonic transforms -->



  [**Overview**](#overview) | [**Installation**](#installation) | [**More information**](#more-about-torch-harmonics) | [**Getting started**](#getting-started) | [**Contributors**](#contributors) | [**Cite us**](#cite-us) | [**References**](#references)

  [![tests](https://github.com/NVIDIA/torch-harmonics/actions/workflows/tests.yml/badge.svg)](https://github.com/NVIDIA/torch-harmonics/actions/workflows/tests.yml)
  [![pypi](https://img.shields.io/pypi/v/torch_harmonics)](https://pypi.org/project/torch_harmonics/)



  torch-harmonics implements differentiable signal processing on the sphere. This includes differentiable implementations of the spherical harmonic transforms, vector spherical harmonic transforms and discrete-continuous convolutions on the sphere. The package was originally implemented to enable Spherical Fourier Neural Operators (SFNO) [1].

  The SHT algorithm uses quadrature rules to compute the projection onto the associated Legendre polynomials and FFTs for the projection onto the harmonic basis. This algorithm tends to outperform others with better asymptotic scaling for most practical purposes [2].

  torch-harmonics uses PyTorch primitives to implement these operations, making it fully differentiable. Moreover, the quadrature can be distributed onto multiple ranks making it spatially distributed.

  torch-harmonics has been used to implement a variety of differentiable PDE solvers which generated the animations below. Moreover, it has enabled the development of Spherical Fourier Neural Operators (SFNOs) [1].

  <div align="center">
  <table border="0" cellspacing="0" cellpadding="0">
      <tr>
          <td><img src="https://media.githubusercontent.com/media/NVIDIA/torch-harmonics/main/images/sfno.gif"  width="240"></td>
          <td><img src="https://media.githubusercontent.com/media/NVIDIA/torch-harmonics/main/images/zonal_jet.gif"  width="240"></td>
          <td><img src="https://media.githubusercontent.com/media/NVIDIA/torch-harmonics/main/images/allen-cahn.gif"  width="240"></td>
      </tr>
  <!--     <tr>
          <td style="text-align:center; border-style : hidden!important;">Shallow Water Eqns.</td>
          <td style="text-align:center; border-style : hidden!important;">Ginzburg-Landau Eqn.</td>
          <td style="text-align:center; border-style : hidden!important;">Allen-Cahn Eqn.</td>
      </tr>  -->
  </table>
  </div>



  A simple installation can be directly done from PyPI:

  ```bash
  pip install torch-harmonics
  ```
  If you are planning to use spherical convolutions, we recommend building the corresponding custom CUDA kernels. To enforce this, you can set the `FORCE_CUDA_EXTENSION` flag. You may also want to set appropriate architectures with the `TORCH_CUDA_ARCH_LIST` flag. Finally, make sure to disable build isolation via the `--no-build-isolation` flag to ensure that the custom kernels are built with the existing torch installation.
  ```bash
  export FORCE_CUDA_EXTENSION=1
  export TORCH_CUDA_ARCH_LIST="7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX"
  pip install --no-build-isolation torch-harmonics
  ```
  :warning: Please note that the custom CUDA extensions currently only support CUDA architectures >= 7.0.

  If you want to actively develop torch-harmonics, we recommend building it in your environment from github:

  ```bash
  git clone git@github.com:NVIDIA/torch-harmonics.git
  cd torch-harmonics
  pip install -e .
  ```

  Alternatively, use the Dockerfile to build your custom container after cloning:

  ```bash
  git clone git@github.com:NVIDIA/torch-harmonics.git
  cd torch-harmonics
  docker build . -t torch_harmonics
  docker run --gpus all -it --rm --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 torch_harmonics
  ```





  The [spherical harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics) are special functions defined on the two-dimensional sphere $S^2$ (embedded in three dimensions). They form an orthonormal basis of the space of square-integrable functions defined on the sphere $L^2(S^2)$ and are comparable to the harmonic functions defined on a circle/torus. The spherical harmonics are defined as

  $$
  Y_l^m(\theta, \lambda) = \sqrt{\frac{(2l + 1)}{4 \pi} \frac{(l - m)!}{(l + m)!}} P_l^m(\cos \theta)  \exp(im\lambda),
  $$

  where $\theta$ and $\lambda$ are colatitude and longitude respectively, and $P_l^m$ the normalized, [associated Legendre polynomials](https://en.wikipedia.org/wiki/Associated_Legendre_polynomials).

  <div align="center">
  <img src="https://media.githubusercontent.com/media/NVIDIA/torch-harmonics/main/images/spherical_harmonics.gif" width="432">
  <br>
  Spherical harmonics up to degree 5
  </div>



  The spherical harmonic transform (SHT)

  $$
  f_l^m = \int_{S^2}  \overline{Y_{l}^{m}}(\theta, \lambda) f(\theta, \lambda) \mathrm{d} \mu(\theta, \lambda)
  $$

  realizes the projection of a signal $f(\theta, \lambda)$ on $S^2$ onto the spherical harmonics basis. The SHT generalizes the Fourier transform on the sphere. Conversely, a truncated series expansion of a function $f$ can be written in terms of spherical harmonics as

  $$
  f (\theta, \lambda) = \sum_{m=-M}^{M} \exp(im\lambda) \sum_{l=|m|}^{M} \hat f_l^m  P_l^m (\cos \theta),
  $$

  where $\hat{f}_l^m$, are the expansion coefficients associated to the mode $m$, $n$.

  The implementation of the SHT follows the algorithm as presented in [2]. A direct spherical harmonic transform can be accomplished by a Fourier transform

  $$
  \hat f^m(\theta) = \frac{1}{2 \pi} \int_{0}^{2\pi} f(\theta, \lambda) \exp(-im\lambda) \mathrm{d} \lambda
  $$

  in longitude and a Legendre transform

  $$
  \hat f_l^m = \frac{1}{2} \int^{\pi}_0 \hat f^{m} (\theta) P_l^m (\cos \theta) \sin \theta \mathrm{d} \theta
  $$

  in latitude.



  The second integral, which computed the projection onto the Legendre polynomials is realized with quadrature. On the Gaussian grid, we use Gaussian quadrature in the $\cos \theta$ domain. The integral

  $$
  \hat f_l^m = \frac{1}{2} \int_{-1}^1 \hat{f}^m(\arccos x) P_l^m (x) \mathrm{d} x
  $$

  is obtained with the substitution $x = \cos \theta$ and then approximated by the sum

  $$
  \hat f_l^m = \sum_{j=1}^{N_\theta}  \hat{f}^m(\arccos x_j) P_l^m(x_j) w_j.
  $$

  Here, $x_j \in [-1,1]$ are the quadrature nodes with the respective quadrature weights $w_j$.



  torch-harmonics now provides local discrete-continuous (DISCO) convolutions as outlined in [4] on the sphere.



  The main functionality of `torch_harmonics` is provided in the form of `torch.nn.Modules` for composability. A minimum example is given by:

  ```python
  import torch
  import torch_harmonics as th

  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

  nlat = 512
  nlon = 2*nlat
  batch_size = 32
  signal = torch.randn(batch_size, nlat, nlon)


  sht = th.RealSHT(nlat, nlon, grid="equiangular").to(device)

  coeffs = sht(signal)
  ```

  To enable scalable model-parallelism, `torch-harmonics` implements a distributed variant of the SHT located in `torch_harmonics.distributed`.

  Detailed usage of torch-harmonics, alongside helpful analysis provided in a series of notebooks:

  1. [Getting started](./notebooks/getting_started.ipynb)
  2. [Quadrature](./notebooks/quadrature.ipynb)
  3. [Visualizing the spherical harmonics](./notebooks/plot_spherical_harmonics.ipynb)
  4. [Spectral fitting vs. SHT](./notebooks/gradient_analysis.ipynb)
  5. [Conditioning of the Gramian](./notebooks/conditioning_sht.ipynb)
  6. [Solving the Helmholtz equation](./notebooks/helmholtz.ipynb)
  7. [Solving the shallow water equations](./notebooks/shallow_water_equations.ipynb)
  8. [Training Spherical Fourier Neural Operators (SFNO)](./notebooks/train_sfno.ipynb)
  9. [Resampling signals on the sphere](./notebooks/resample_sphere.ipynb)



  Note that torch-harmonics uses Fourier transforms from `torch.fft` which in turn uses kernels from the optimized `cuFFT` library. This library supports fourier transforms of `float32` and `float64` (i.e. `single` and `double` precision) tensors for all input sizes. For `float16` (i.e. `half` precision) and `bfloat16` inputs however, the dimensions which are transformed are restricted to powers of two. Since data is converted to one of these reduced precision floating point formats when `torch.autocast` is used, torch-harmonics will issue an error when the input shapes are not powers of two. For these cases, we recommend disabling autocast for the harmonics transform specifically:

  ```python
  import torch
  import torch_harmonics as th

  sht = th.RealSHT(512, 1024, grid="equiangular").cuda()

  with torch.autocast(device_type="cuda", enabled = True):
     
     x = some_math(x)
     
     x = x.to(torch.float32)
     
     
     
     with torch.autocast(device_type="cuda", enabled = False):
        xt = sht(x)

     
     xt = some_more_math(xt)
  ```

  Depending on the problem, it might be beneficial to upcast data to `float64` instead of `float32` precision for numerical stability.



  [Boris Bonev](https://bonevbs.github.io) (bbonev@nvidia.com), [Thorsten Kurth](https://github.com/azrael417) (tkurth@nvidia.com), [Mauro Bisson](https://scholar.google.com/citations?hl=en&user=f0JE-0gAAAAJ) , [Massimiliano Fatica](https://scholar.google.com/citations?user=Deaq4uUAAAAJ&hl=en), [Nikola Kovachki](https://kovachki.github.io), [Jean Kossaifi](http://jeankossaifi.com), [Christian Hundt](https://github.com/gravitino)



  If you use `torch-harmonics` in an academic paper, please cite [1]

  ```bibtex
  @misc{bonev2023spherical,
        title={Spherical Fourier Neural Operators: Learning Stable Dynamics on the Sphere},
        author={Boris Bonev and Thorsten Kurth and Christian Hundt and Jaideep Pathak and Maximilian Baust and Karthik Kashinath and Anima Anandkumar},
        year={2023},
        eprint={2306.03838},
        archivePrefix={arXiv},
        primaryClass={cs.LG}
  }
  ```



  <a id="1">[1]</a>
  Bonev B., Kurth T., Hundt C., Pathak, J., Baust M., Kashinath K., Anandkumar A.;
  Spherical Fourier Neural Operators: Learning Stable Dynamics on the Sphere;
  arXiv 2306.0383, 2023.

  <a id="1">[2]</a>
  Schaeffer N.;
  Efficient spherical harmonic transforms aimed at pseudospectral numerical simulations;
  G3: Geochemistry, Geophysics, Geosystems, 2013.

  <a id="1">[3]</a>
  Wang B., Wang L., Xie Z.;
  Accurate calculation of spherical and vector spherical harmonic expansions via spectral element grids;
  Adv Comput Math, 2018.

  <a id="1">[4]</a>
  Ocampo, Price, McEwen, Scalable and equivariant spherical CNNs by discrete-continuous (DISCO) convolutions, ICLR (2023), arXiv:2209.13603


pkgId: 04c75a4446a59d616af1f7e10f3bd47bc9c0ee7fb920abadfd9824144e3d0c46
name: python-torch-levenberg-marquardt-help
arch: noarch
version: 1.1.2
epoch: 0
release: 1
summary: Development documents and examples for torch-levenberg-marquardt
url: https://pypi.org/project/torch-levenberg-marquardt/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-levenberg-marquardt-1.1.2-1.src.rpm
location_href: Packages/python-torch-levenberg-marquardt-help-1.1.2-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/torch-levenberg-marquardt)](https://pypi.org/project/torch-levenberg-marquardt/)
  [![PyPI Downloads](https://img.shields.io/pypi/dm/torch-levenberg-marquardt?label=PyPI%20downloads)](https://pypi.org/project/torch-levenberg-marquardt/)
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/fabiodimarco/torch-levenberg-marquardt/blob/main/examples/torch_levenberg_marquardt.ipynb)

  A PyTorch implementation of the **Levenberg-Marquardt (LM)** optimization algorithm, supporting **mini-batch training** for both **regression** and **classification** problems. It leverages GPU acceleration and offers an extensible framework, supporting diverse loss functions and customizable damping strategies.

  A TensorFlow implementation is also available: [tf-levenberg-marquardt](https://github.com/fabiodimarco/tf-levenberg-marquardt)

  For more information on the theory behind the Levenberg-Marquardt and Gauss-Newton algorithms, refer to the following resources:
  [Levenberg-Marquardt](https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm),
  [Gauss-Newton](https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm).



  First-order methods like SGD and Adam dominate large-scale neural network training due to their efficiency and scalability, making them the only viable option for models with millions or billions of parameters.
  However, for smaller models, second-order methods can offer faster convergence and sometimes succeed where first-order methods fail.

  The **Levenberg-Marquardt algorithm** strikes a balance:
  - It builds on the Gauss-Newton method, using second-order information for faster convergence.
  - Adaptive damping enhances stability, mitigating issues that can arise in the standard Gauss-Newton algorithm.

  This makes it a strong choice for problems with manageable model sizes.



  - **Versatile Loss Support**: Leverage the square root trick to apply LM with any PyTorch-supported loss function.
  - **Mini-batch Training**: Scale LM to large datasets for both regression and classification tasks.
  - **Custom Damping Strategies**: Adapt the damping factor dynamically for stable optimization.
  - **Split Jacobian Matrix Computation**: Split the Computation of the Jacobian and Hessian matrix approximation to reduce memory usage.
  - **Custom Param Selection Strategies**: Select a subset of model parameters to update during the training step.



  The following loss functions are supported out of the box:
  - `MSELoss`
  - `L1Loss`
  - `HuberLoss`
  - `CrossEntropyLoss`
  - `BCELoss`
  - `BCEWithLogitsLoss`

  Additional loss functions can be added by implementing custom residual definitions.



  * **Standard**: $\large J^T J + \lambda I$
  * **Fletcher**: $\large J^T J + \lambda ~ \text{diag}\(J^T J\hspace{0.1em})$
  * **Custom**: Support for defining custom damping strategies.



  To install the library, use pip:
  ```bash
  pip install torch-levenberg-marquardt
  ```



  To contribute or modify the code, clone the repository and install it in editable mode:


  ```bash
  conda env create -f environment_cuda.yml
  ```


  ```bash
  conda env create -f environment_cpu.yml
  ```


  ```bash
  conda env create -f environment_macos.yml
  ```





  The `utils.fit` function provides an example of how to implement a PyTorch training loop using the `training.LevenbergMarquardtModule`.

  ```python
  import torch_levenberg_marquardt as tlm


  tlm.utils.fit(
    tlm.training.LevenbergMarquardtModule(
      model=model,
      loss_fn=tlm.loss.MSELoss(),
      learning_rate=1.0,
      attempts_per_step=10,
      solve_method='qr',
    ),
    train_loader,
    epochs=50,
  )
  ```



  The class `utils.CustomLightningModule` provides an example of how to implement a PyTorch Lightning module that uses the `training.LevenbergMarquardtModule`:

  ```python
  import torch_levenberg_marquardt as tlm
  from pytorch_lightning import Trainer


  lm_module = tlm.utils.CustomLightningModule(
    tlm.training.LevenbergMarquardtModule(
      model=model,
      loss_fn=tlm.loss.MSELoss(),
      learning_rate=1.0,
      attempts_per_step=10,
      solve_method='qr',
    )
  )


  trainer = Trainer(max_epochs=50, accelerator='gpu', devices=1)
  trainer.fit(lm_module, train_loader)
  ```



  The Levenberg-Marquardt algorithm is designed to solve **least-squares problems** or the form:

  $$
  \large \underset{W}{\text{argmin}} \enspace S\left(W\right) = \sum_{i=1}^N r_i\left(W\right)^2, \quad r_i = y_i - f\left(x_i, W\right)
  $$

  This might seem to restrict it to **Mean Squared Error loss**. However, it is possible to use the **square root trick** to adapt LM to any loss that is guaranteed to always be positive. Suppose we have a loss function of the form:

  $$
  \large \ell\left(y, f\left(x, W\right)\right) ≥ 0 \quad \text{for all valid inputs and outputs}
  $$

  the residuals $\large r_i$ in LM can be redefined to generalize the algorithm as:

  $$
  \large r_i = \sqrt{\ell\left(y, f\left(x, W\right)\right)}
  $$





  $$
  \large r_i = \sqrt{\left(y_i - f\left(x_i, W\right)\right)^2} \quad \Rightarrow \quad r_i = \left|\hspace{0.3em}y_i - f\left(x_i, W\right)\right| \quad \Rightarrow \quad r_i = y_i - f\left(x_i, W\right)
  $$

  ```python
  class MSELoss(Loss):
      def forward(self, y_true: Tensor, y_pred: Tensor) -> Tensor:
          return (y_pred - y_true).square().mean()

      def residuals(self, y_true: Tensor, y_pred: Tensor) -> Tensor:
          return y_pred - y_true
  ```



  $$
  \large r_i = \sqrt{-y_i \log\left(f\left(x_i, W\right)\right)}
  $$

  ```python
  class CrossEntropyLoss(Loss):
      def forward(self, y_true: Tensor, y_pred: Tensor) -> Tensor:
          return torch.nn.functional.cross_entropy(y_pred, y_true, reduction='mean')

      def residuals(self, y_true: Tensor, y_pred: Tensor) -> Tensor:
          return torch.sqrt(torch.nn.functional.cross_entropy(y_pred, y_true, reduction='none'))
  ```





  The **Gauss-Newton method** provides an efficient way to optimize least-squares problems by approximating the second-order derivatives of the objective function:

  $$
  \large \underset{W}{\text{argmin}} \enspace S\left(W\right) = \sum_{i=1}^N r_i\left(W\right)^2, \quad r_i = r\left(y_i, f\left(x_i, W\right)\right)
  $$

  where:

  - $\large r_i$ are the residuals derived from a general loss function,
  - $\large f\left(x_i, W\right)$ represents the model output for input $\large x_i$ and parameters $\large W$,
  - $\large N$ is the number of data points.

  In what follows, the Gauss-Newton algorithm will be derived from Newton's method for function optimization via an approximation.
  The recurrence relation for Newton's method for minimizing a function $\large S$ of parameters $\large W$ is:

  $$
  \large W^{\hspace{0.3em} s+1} = W^{\hspace{0.3em} s} - H^{\hspace{0.1em}-1} g
  $$

  where $\large g$ denotes the gradient vector of $\large S$, and $\large H$ denotes the Hessian matrix of $\large S$.

  The gradient of $\large S$ with respect to $\large W$ is given by:

  $$
  \large g_j = 2 \sum_{i=1}^N r_i \frac{\partial r_i}{\partial w_j},
  $$

  Elements of the Hessian are calculated by differentiating the gradient elements, $\large g_j$, with respect to $\large w_k$:

  $$
  \large H_{jk} = 2 \sum_{i=1}^N \left( \frac{\partial r_i}{\partial w_j} \frac{\partial r_i}{\partial w_k} + r_i \frac{\partial^2 r_i}{\partial w_j \partial w_k} \right)
  $$

  The Gauss-Newton method is obtained by ignoring the second-order derivative terms (the second term in this expression). That is, the Hessian is approximated by

  $$
  \large H_{jk} \approx 2 \sum_{i=1}^N J_{ij} J_{ik}, \quad J_{ij} = \frac{\partial r_i}{\partial w_j}
  $$


  where $\large J_{ij} = \partial r_i / \partial w_j$ are entries of the Jacobian matrix $\large J_r$. Note that when the exact Hessian is evaluated near an exact fit we have near-zero
  $\large r_i$, so the second term becomes near-zero as well, which justifies the approximation. The gradient and the approximate Hessian can be written in matrix notation as

  $$
  \large g = 2 J_r^T r, \quad H \approx 2 J_r^T J_r
  $$



  While the Gauss-Newton method is powerful, its instability near singularity in $\large J_r^T J_r$ is a limitation. The **Levenberg-Marquardt algorithm** mitigates this by introducing a damping factor $\large \lambda$:

  $$
  \large H = J_r^T J_r + \lambda I
  $$

  This ensures numerical stability when $\large J_r^T J_r$ is ill-conditioned. The update rule becomes:

  $$
  \large W^{\hspace{0.3em} s+1} = W^{\hspace{0.3em} s} - (J_r^T J_r + \lambda I)^{-1} J_r^T r
  $$

  The damping $\large \lambda$ is changed based on an adaptive strategy. During each training step, the LM algorithm attempts to find an update for the model that reduces the loss. In each attempt, new model parameters are computed, and the resulting loss is compared to the previous loss. If `new_loss < loss`, the new parameters are accepted. Otherwise, the old parameters are restored, and a new attempt is made with an adjusted damping factor.



  To achieve optimal performance from the training algorithm, it is important to carefully choose the batch size and the number of model parameters.



  The LM algorithm minimizes the least-squares objective:

  $$
  \large \underset{W}{\text{argmin}} \sum_{i=1}^N \left[r\left(y_i, f\left(x_i, W\right)\right)\right]^2
  $$

  The Jacobian matrix $\large J_r$ captures the partial derivatives of the residuals with respect to the model parameters:

  $$
  \large J_r[i, j] = \frac{\partial r_i}{\partial w_j}
  $$

  For a batch of size $\large B$, the Jacobian matrix $\large J_r$ has dimensions:

  $$
  \large J_r \in \mathbb{R}^{N \times P}
  $$

  where:
  - $\large W$: Model parameters (weights),
  - $\large N$: Total number of residuals, determined by $\large N = B \cdot O$,
  - $\large B$: Batch size,
  - $\large O$: Number of outputs per sample,
  - $\large r\left(y_i, f\left(x_i, W\right)\right)$: Residuals, which are computed differently depending on the chosen loss function.
  - $\large P$: Total number of parameters in the model.



  The LM update is chosen based on whether the system is  **overdetermined** $\large (N > P)$ or **underdetermined** $\large (N < P)$, with the algorithm checking the system type for each batch.



  Update formula:

  $$
  \large W^{\hspace{0.3em} s+1} = W^{\hspace{0.3em} s} - (J_r^T J_r + \lambda I)^{-1} J_r^T r
  $$

  The Size of the matrix to invert $\large J_r^T J_r + \lambda I$ is $\large [P \times P]$.



  Update formula:

  $$
  \large W^{\hspace{0.3em} s+1} = W^{\hspace{0.3em} s} - J_r^T (J_r J_r^T + \lambda I)^{-1} r
  $$

  The Size of the matrix to invert $\large J_r J_r^T + \lambda I$ is $\large [N \times N]$.



  The memory required to store $\large J_r$ scales with both $\large N$ and $\large P$. Thus, directly storing and computing $\large J_r$ is often infeasible.
  However, for overdetermined systems $(N > P)$, the properties of $\large J_r^T J_r$ can be leveraged to compute it incrementally through **Jacobian splitting**.
  This functionality can be controlled in the code by setting the `jacobian_max_num_rows` argument.

  Rather than constructing the full $\large J_r$ at once, divide the computation into smaller sub-batches.



  Split the full batch into $\large M$ sub-batches of size $\large B_s$:

  $$
  \large M = \lceil B / B_s \rceil,
  $$

  where $\large B$ is the full batch size and $\large B_s$ is the sub-batch size.



  For each sub-batch $\large i$, compute the corresponding residuals $\large \bar{r}_i$ of size $\large N_s$ and Jacobians $\large \bar{J}_i$ of size $\large [N_s \times P]$.

  Where $\large N_s$ the number of sub-residuals, is determined by $\large B_s \cdot O$.


  Instead of storing the entire $\large J_r$, compute $\large J_r^T J_r$ and $\large J_r^T r$ incrementally:

  $$
  \large J_r^T J_r = \sum_{i=1}^M \bar{J}_i^T \bar{J}_i,
  $$

  $$
  J_r^T r = \sum_{i=1}^M \bar{J}_i^T \bar{r}_i
  $$




  When using the Split Jacobian computation, the memory usage is primarily determined by the size of $\large J_r^T J_r$, which is $\large [P \times P]$, where $\large P$ is the number of model parameters. While this approach reduces overall memory requirements compared to storing the full Jacobian matrix $\large J_r$, the size of $\large J_r^T J_r$ can still become a bottleneck for models with a very large number of parameters, potentially leading to out-of-memory (OOM) errors.



  A simple curve-fitting example is implemented in `examples/sinc_curve_fitting.py` and `examples/sinc_curve_fitting_lightning.py`. The function `y = sinc(10 * x)` is fitted using a shallow neural network with 61 parameters.
  Despite the simplicity of the problem, first-order methods such as Adam fail to converge, whereas Levenberg-Marquardt converges rapidly with very low loss values. The learning rate values were chosen experimentally based on the results obtained by each algorithm.

  Here the results with Adam for 10000 epochs and learning_rate=0.01
  ```
  Training with Adam optimizer...
  Epoch 9999: 100%|██████████| 20/20 [00:00<00:00, 81.07it/s, loss_step=0.000461, loss_epoch=0.000412]
  `Trainer.fit` stopped: `max_epochs=10000` reached.
  Epoch 9999: 100%|██████████| 20/20 [00:00<00:00, 80.21it/s, loss_step=0.000461, loss_epoch=0.000412]
  Training completed. Elapsed time: 2604.56 seconds
  ```
  Here the results with Levenberg-Marquardt for 100 epochs and learning_rate=1.0
  ```
  Training with Levenberg-Marquardt...
  Epoch 49: 100%|██████████| 20/20 [00:00<00:00, 64.07it/s, loss_step=2.79e-7, damping_factor=1e-6, attempts=3.000, loss_epoch=3.31e-7]
  `Trainer.fit` stopped: `max_epochs=50` reached.
  Epoch 49: 100%|██████████| 20/20 [00:00<00:00, 63.35it/s, loss_step=2.79e-7, damping_factor=1e-6, attempts=3.000, loss_epoch=3.31e-7]
  Training completed. Elapsed time: 16.60 seconds
  ```

  <img width="700" alt="Curve Fitting Comparison Plot" src="https://github.com/user-attachments/assets/f01eee5a-4e7f-417c-99de-f269771a6c22">


  A common MNIST classification example is implemented in `examples/mnist_classification.py.py` and `examples/mnist_classification_lightning.py.py`. The classification is performed using a convolutional neural network with 1026 parameters.
  Both optimization methods achieve roughly the same accuracy on the training and test sets; however, Levenberg-Marquardt requires significantly fewer epochs, automatically stopping the training at epoch 8.

  Here the results with Adam for 100 epochs and learning_rate=0.01
  ```
  Training with Adam optimizer...
  Training with Adam optimizer...
  Epoch 99: 100%|██████████| 12/12 [00:01<00:00,  8.90it/s, accuracy=0.970, loss_step=0.0977, loss_epoch=0.0986]
  `Trainer.fit` stopped: `max_epochs=100` reached.
  Epoch 99: 100%|██████████| 12/12 [00:01<00:00,  8.88it/s, accuracy=0.970, loss_step=0.0977, loss_epoch=0.0986]
  Training completed. Elapsed time: 125.33 seconds

  Adam - Test Loss: 0.089224, Test Accuracy: 97.32%
  ```
  Here the results with Levenberg-Marquardt for 10 epochs and learning_rate=0.05
  ```
  Train using Levenberg-Marquardt
  Training with Levenberg-Marquardt...
  Epoch 8:  83%|████████▎ | 10/12 [00:02<00:00,  4.64it/s, accuracy=0.977, loss_step=0.0683, damping_factor=1e+10, attempts=3.000, loss_epoch=0.0742]
  Training completed. Elapsed time: 22.10 seconds

  Levenberg-Marquardt - Test Loss: 0.076580, Test Accuracy: 97.59%
  ```



   * python>3.9
   * torch>=2.0.0
   * numpy>=1.22
   * pytorch-lightning>=1.9
   * tqdm
   * torchmetrics>=0.11.0

rpm_license:
  MIT License  Copyright (c) 2024 Fabio Di Marco  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: a814fd3eaf94be55e95e314feca7110f96f966612a63fec1ac60c2f9b3cbe9bc
name: python-torch-mdct-help
arch: noarch
version: 0.4.0
epoch: 0
release: 1
summary: Development documents and examples for torch-mdct
url: https://github.com/Kinyugo/torch_mdct
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-mdct-0.4.0-1.src.rpm
location_href: Packages/python-torch-mdct-help-0.4.0-1.noarch.rpm
checksum_type: sha256
description:
  A fast and clean implementation of the Modified Discrete Cosine Transform (MDCT) algorithm in PyTorch.



  ```bash
  pip install torch_mdct
  ```



  ```python
  import torchaudio
  from torch_mdct import MDCT, IMDCT


  waveform, sample_rate = torchaudio.load("/path/to/audio.file")


  mdct = MDCT(win_length=2048)
  imdct = IMDCT(win_length=2048)


  spectrogram = mdct(waveform)


  reconst_waveform = imdct(spectrogram)


  print(f"L1: {(waveform - reconst_waveform).abs().mean()}")
  ```


  [[1]](https://github.com/zafarrafii/Zaf-Python) Zaf-Python: Zafar's Audio Functions in **Python** for audio signal analysis.

  [[2]](https://github.com/nils-werner/mdct) MDCT: A fast MDCT implementation using SciPy and FFTs.


pkgId: 0740387e028a137aeb9b4bc8e1eba763d3c3c097011085aa82a1cd4e28b1cbda
name: python-torch-radon24-help
arch: noarch
version: 1.5
epoch: 0
release: 1
summary: Development documents and examples for torch-radon24
url: https://pypi.org/project/torch-radon24/
rpm_license: GNU GENERAL PUBLIC LICENSE
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-radon24-1.5-1.src.rpm
location_href: Packages/python-torch-radon24-help-1.5-1.noarch.rpm
checksum_type: sha256
description:
  torch_radon is a Python library that provides an implementation of the Radon transform using PyTorch 2.0. The Radon transform is a mathematical operation that maps an image to its Radon space representation, which is useful in various image processing and computer vision tasks.

  To install torch_radon24, you can use pip by running the following command:

  ```
  pip install torch_radon24
  ```

  Once installed, you can import the library in your Python code and start using the Radon transform functionality provided by torch_radon24.
  <!-- write tutorial usage -->
  To learn how to use torch_radon24, you can refer to the tutorial available at [this link](https://github.com/QBioImaging/torch_radon24/blob/main/tutorial_usage.ipynb). The tutorial provides step-by-step instructions on installing the library and demonstrates various use cases of the Radon transform functionality provided by torch_radon24. Make sure to follow the instructions in the tutorial to get started with using torch_radon24 effectively in your Python code.


pkgId: 892f6003461e51619d0e4386c9f94b24f0aabfc13d84f3b4ff1021a37d11aa38
name: python-torch-sci-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for torch-sci
url: https://pypi.org/project/torch-sci/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-sci-1.0.0-1.src.rpm
location_href: Packages/python-torch-sci-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  ![Test](https://github.com/github/docs/actions/workflows/test.yml/badge.svg)

  Differentiable PyTorch functions to calculate scientific notation.



  Bring your own PyTorch, then install this package:

  ```bash
  pip install torch-sci
  ```



  ```python
  import torch

  import torch_sci


  x = torch.tensor(1234.0, requires_grad=True)
  sig, exp = torch_sci.to_sci(x)
  sig, exp



  loss = sig * exp
  loss.backward()
  assert x.grad != 0.0

  torch_sci.from_sci(sig, exp)



  torch_sci.to_sci(torch.tensor(-1234.0, requires_grad=True))

  torch_sci.to_sci(torch.tensor(-0.1234, requires_grad=True))

  torch_sci.to_sci(torch.tensor(0.0, requires_grad=True))

  torch_sci.to_sci(torch.tensor(0.1234, requires_grad=True))

  torch_sci.to_sci(torch.tensor(1234.0, requires_grad=True))

  ```





  [Install uv](https://docs.astral.sh/uv/getting-started/installation/) for dependency management if you haven't already. Then run:

  ```bash

  venv sync
  ```



  ```bash
  uv run pytest
  ```


pkgId: 56a143098e2b514f0ba8857a58381288c1dc542ff8812c093d350da1eead0ea9
name: python-torch-snippets-help
arch: noarch
version: 0.547
epoch: 0
release: 1
summary: Development documents and examples for torch-snippets
url: https://github.com/sizhky/torch_snippets/tree/master/
rpm_license: Apache Software License 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-snippets-0.547-1.src.rpm
location_href: Packages/python-torch-snippets-help-0.547-1.noarch.rpm
checksum_type: sha256
description:
  <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

  ``` python

  from torch_snippets import *
  ```

      CPU times: user 1.57 s, sys: 1.59 s, total: 3.16 s
      Wall time: 731 ms

  Below we are trying to extract the `__all__` list from all Python files
  of the torch_snippets directory.
  Through the code, you can already see some of the elements of
  torch-snippets in action.

  ``` python
  import ast

  os.environ[
      "AD_MAX_ITEMS"
  ] = (  # os is already imported by torch_snippets, along with many other useful libraries
      "1000"  # Set the maximum number of items to display in the AD object
  )


  @tryy  # This is a decorator that catches exceptions
  def extract_all_list(file_path):
      file = readfile(file_path, silent=True)  # Read the file
      tree = ast.parse(file, filename=file_path)

      for node in tree.body:
          if isinstance(node, ast.Assign):
              for target in node.targets:
                  if isinstance(target, ast.Name) and target.id == "__all__":
                      if isinstance(node.value, ast.List):
                          all_list = [
                              elt.value
                              for elt in node.value.elts
                              if isinstance(elt, ast.Constant)
                          ]
                          return all_list
      return None


  def print_all_lists_in_directory(directory):
      dir = P(directory)  # Create a pathlib.Path object
      for f in dir.ls():  # Iterate over all files in the directory
          if f.extn == "py" and f.stem not in [
              "__init__",
              "_nbdev",
          ]:  # If it's a Python file and not __init__.py
              all_list = extract_all_list(f)
              if all_list is not None and len(all_list) > 0:
                  h2(f.stem)  # Print the name of the file as a heading in jupyter
                  print(
                      AD({"items": all_list})
                  )  # AD is an intelligent dictionary that can display itself nicely
  ```

  ``` python
  print(P().resolve())
  ```

      /Users/yeshwanth/Code/Personal/torch_snippets/nbs

  ``` python

  directory_path = "../torch_snippets"
  print_all_lists_in_directory(directory_path)
  ```




      ```↯ AttrDict ↯
      items[]
        0 - Timer (🏷️ str)
        1 - track2 (🏷️ str)
        2 - summarize_input (🏷️ str)
        3 - timeit (🏷️ str)
        4 - io (🏷️ str)
        5 - tryy (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - ifnone (🏷️ str)
        1 - exists (🏷️ str)
        2 - loadifexists (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - textify (🏷️ str)
        1 - find_lines (🏷️ str)
        2 - find_blocks (🏷️ str)
        3 - find_substring (🏷️ str)
        4 - get_line_data_from_word_data (🏷️ str)
        5 - edit_distance_path (🏷️ str)
        6 - group_blocks (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - valid_methods (🏷️ str)
        1 - P (🏷️ str)
        2 - ls (🏷️ str)
        3 - print_folder_summary (🏷️ str)
        4 - dill (🏷️ str)
        5 - input_to_str (🏷️ str)
        6 - output_to_path (🏷️ str)
        7 - process_f (🏷️ str)
        8 - get_fs (🏷️ str)
        9 - P0 (🏷️ str)
        10 - stem (🏷️ str)
        11 - stems (🏷️ str)
        12 - extn (🏷️ str)
        13 - remove_file (🏷️ str)
        14 - isdir (🏷️ str)
        15 - makedir (🏷️ str)
        16 - fname (🏷️ str)
        17 - fname2 (🏷️ str)
        18 - parent (🏷️ str)
        19 - Glob (🏷️ str)
        20 - find (🏷️ str)
        21 - zip_files (🏷️ str)
        22 - unzip_file (🏷️ str)
        23 - list_zip (🏷️ str)
        24 - md5 (🏷️ str)
        25 - remove_duplicates (🏷️ str)
        26 - common_items (🏷️ str)
        27 - folder_summary (🏷️ str)
        28 - readlines (🏷️ str)
        29 - readfile (🏷️ str)
        30 - writelines (🏷️ str)
        31 - tree (🏷️ str)
        32 - folder_structure_to_dict (🏷️ str)
        33 - folder_structure_to_json (🏷️ str)
        34 - rename_batch (🏷️ str)
        35 - dumpdill (🏷️ str)
        36 - loaddill (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - alt (🏷️ str)
        1 - Chart (🏷️ str)
        2 - CM (🏷️ str)
        3 - radar (🏷️ str)
        4 - confusion_matrix (🏷️ str)
        5 - spider (🏷️ str)
        6 - upsetaltair_top_level_configuration (🏷️ str)
        7 - UpSetAltair (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - PDF (🏷️ str)
        1 - dump_pdf_images (🏷️ str)
        2 - preview_pdf (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - COLORS (🏷️ str)
        1 - to_networkx (🏷️ str)
        2 - plot_image (🏷️ str)
        3 - plot_graph (🏷️ str)
        4 - tonp (🏷️ str)
        5 - tolist (🏷️ str)
        6 - convert_to_nx (🏷️ str)
        7 - viz2 (🏷️ str)
        8 - df2graph_nodes (🏷️ str)
        9 - ishow (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - Config (🏷️ str)
        1 - AttrDict (🏷️ str)
        2 - registry (🏷️ str)
        3 - tryeval (🏷️ str)
        4 - parse_base (🏷️ str)
        5 - parse (🏷️ str)
        6 - parse_and_resolve (🏷️ str)
        7 - parse_string (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - AD (🏷️ str)
        1 - Config (🏷️ str)
        2 - isnamedtupleinstance (🏷️ str)
        3 - unpack (🏷️ str)
        4 - AttrDict (🏷️ str)
        5 - pretty_json (🏷️ str)
        6 - read_json (🏷️ str)
        7 - write_json (🏷️ str)
        8 - write_jsonl (🏷️ str)
        9 - read_jsonl (🏷️ str)
        10 - read_yaml (🏷️ str)
        11 - write_yaml (🏷️ str)
        12 - read_xml (🏷️ str)
        13 - write_xml (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - inspect (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - torch (🏷️ str)
        1 - th (🏷️ str)
        2 - torchvision (🏷️ str)
        3 - T (🏷️ str)
        4 - transforms (🏷️ str)
        5 - nn (🏷️ str)
        6 - np (🏷️ str)
        7 - F (🏷️ str)
        8 - Dataset (🏷️ str)
        9 - DataLoader (🏷️ str)
        10 - optim (🏷️ str)
        11 - Report (🏷️ str)
        12 - Reshape (🏷️ str)
        13 - Permute (🏷️ str)
        14 - device (🏷️ str)
        15 - save_torch_model_weights_from (🏷️ str)
        16 - load_torch_model_weights_to (🏷️ str)
        17 - detach (🏷️ str)
        18 - cat_with_padding (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - console (🏷️ str)
        1 - reset_logger_width (🏷️ str)
        2 - logger (🏷️ str)
        3 - Trace (🏷️ str)
        4 - Debug (🏷️ str)
        5 - Info (🏷️ str)
        6 - Warn (🏷️ str)
        7 - Excep (🏷️ str)
        8 - warn_mode (🏷️ str)
        9 - info_mode (🏷️ str)
        10 - debug_mode (🏷️ str)
        11 - trace_mode (🏷️ str)
        12 - excep_mode (🏷️ str)
        13 - in_warn_mode (🏷️ str)
        14 - in_info_mode (🏷️ str)
        15 - in_debug_mode (🏷️ str)
        16 - in_trace_mode (🏷️ str)
        17 - in_excep_mode (🏷️ str)
        18 - frames (🏷️ str)
        19 - get_console (🏷️ str)
        20 - reset_logger (🏷️ str)
        21 - get_logger_level (🏷️ str)
        22 - logger_mode (🏷️ str)
        23 - in_logger_mode (🏷️ str)
        24 - notify_waiting (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - AttrDict (🏷️ str)
        1 - json (🏷️ str)
        2 - Config (🏷️ str)
        3 - isnamedtupleinstance (🏷️ str)
        4 - unpack (🏷️ str)
        5 - hash_tensor (🏷️ str)
        6 - hash_pandas_dataframe (🏷️ str)
        7 - AttrDictDeprecated (🏷️ str)
        8 - decompose (🏷️ str)
        9 - pretty_json (🏷️ str)
        10 - read_json (🏷️ str)
        11 - write_json (🏷️ str)
        12 - write_jsonl (🏷️ str)
        13 - read_jsonl (🏷️ str)
        14 - read_yaml (🏷️ str)
        15 - write_yaml (🏷️ str)
        16 - read_xml (🏷️ str)
        17 - write_xml (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - ColumnSelector (🏷️ str)
        1 - GroupedPredictor (🏷️ str)
        2 - EstimatorTransformer (🏷️ str)
        3 - train_test_split (🏷️ str)
        4 - MakeFrame (🏷️ str)
        5 - ImputeMissingValues (🏷️ str)
        6 - LambdaTransformer (🏷️ str)
        7 - Cat2Num (🏷️ str)
        8 - SplitDateColumn (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - save_notebook (🏷️ str)
        1 - backup_this_notebook (🏷️ str)
        2 - backup_all_notebooks (🏷️ str)
        3 - backup_folders_of_nbs (🏷️ str)
        4 - display_dfs_side_by_side (🏷️ str)
        5 - show_big_dataframe (🏷️ str)
        6 - h1 (🏷️ str)
        7 - h2 (🏷️ str)
        8 - h3 (🏷️ str)
        9 - h4 (🏷️ str)
        10 - h5 (🏷️ str)
        11 - h6 (🏷️ str)
        12 - store_scrap (🏷️ str)
        13 - shutdown_current_notebook (🏷️ str)

      ```

      ../torch_snippets/loader.py:532: SyntaxWarning: invalid escape sequence '\$'
        puttext(ax, text.replace("$", "\$"), tuple(bbs[ix][:2]), size=text_sz)




      ```↯ AttrDict ↯
      items[]
        0 - B (🏷️ str)
        1 - Blank (🏷️ str)
        2 - batchify (🏷️ str)
        3 - C (🏷️ str)
        4 - choose (🏷️ str)
        5 - common (🏷️ str)
        6 - crop_from_bb (🏷️ str)
        7 - diff (🏷️ str)
        8 - E (🏷️ str)
        9 - flatten (🏷️ str)
        10 - Image (🏷️ str)
        11 - jitter (🏷️ str)
        12 - L (🏷️ str)
        13 - lzip (🏷️ str)
        14 - line (🏷️ str)
        15 - lines (🏷️ str)
        16 - to_absolute (🏷️ str)
        17 - to_relative (🏷️ str)
        18 - enlarge_bbs (🏷️ str)
        19 - shrink_bbs (🏷️ str)
        20 - logger (🏷️ str)
        21 - np (🏷️ str)
        22 - now (🏷️ str)
        23 - nunique (🏷️ str)
        24 - os (🏷️ str)
        25 - pad (🏷️ str)
        26 - pd (🏷️ str)
        27 - pdfilter (🏷️ str)
        28 - pdb (🏷️ str)
        29 - PIL (🏷️ str)
        30 - print (🏷️ str)
        31 - puttext (🏷️ str)
        32 - randint (🏷️ str)
        33 - rand (🏷️ str)
        34 - re (🏷️ str)
        35 - read (🏷️ str)
        36 - readPIL (🏷️ str)
        37 - rect (🏷️ str)
        38 - resize (🏷️ str)
        39 - rotate (🏷️ str)
        40 - see (🏷️ str)
        41 - show (🏷️ str)
        42 - store_attr (🏷️ str)
        43 - subplots (🏷️ str)
        44 - sys (🏷️ str)
        45 - toss (🏷️ str)
        46 - track (🏷️ str)
        47 - tqdm (🏷️ str)
        48 - Tqdm (🏷️ str)
        49 - trange (🏷️ str)
        50 - unique (🏷️ str)
        51 - uint (🏷️ str)
        52 - write (🏷️ str)
        53 - BB (🏷️ str)
        54 - bbfy (🏷️ str)
        55 - xywh2xyXY (🏷️ str)
        56 - df2bbs (🏷️ str)
        57 - bbs2df (🏷️ str)
        58 - Info (🏷️ str)
        59 - Warn (🏷️ str)
        60 - Debug (🏷️ str)
        61 - Excep (🏷️ str)
        62 - reset_logger (🏷️ str)
        63 - get_logger_level (🏷️ str)
        64 - in_debug_mode (🏷️ str)
        65 - debug_mode (🏷️ str)
        66 - typedispatch (🏷️ str)
        67 - defaultdict (🏷️ str)
        68 - Counter (🏷️ str)
        69 - dcopy (🏷️ str)
        70 - patch_to (🏷️ str)
        71 - split (🏷️ str)
        72 - train_test_split (🏷️ str)
        73 - init_plt (🏷️ str)
        74 - init_cv2 (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - do (🏷️ str)
        1 - bw (🏷️ str)
        2 - rotate (🏷️ str)
        3 - pad (🏷️ str)
        4 - get_size (🏷️ str)
        5 - rescale (🏷️ str)
        6 - crop (🏷️ str)
        7 - imgaugbbs2bbs (🏷️ str)
        8 - bbs2imgaugbbs (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - make_uniform_date_format (🏷️ str)
        1 - ALL_DATE_FORMATS (🏷️ str)
        2 - are_dates_equal (🏷️ str)
        3 - today (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - time_profiler (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - parse_sz (🏷️ str)
        1 - get_bplot (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - randint (🏷️ str)
        1 - BB (🏷️ str)
        2 - df2bbs (🏷️ str)
        3 - bbs2df (🏷️ str)
        4 - bbfy (🏷️ str)
        5 - jitter (🏷️ str)
        6 - compute_eps (🏷️ str)
        7 - enlarge_bbs (🏷️ str)
        8 - shrink_bbs (🏷️ str)
        9 - iou (🏷️ str)
        10 - compute_distance_matrix (🏷️ str)
        11 - compute_distances (🏷️ str)
        12 - split_bb_to_xyXY (🏷️ str)
        13 - combine_xyXY_to_bb (🏷️ str)
        14 - is_absolute (🏷️ str)
        15 - is_relative (🏷️ str)
        16 - to_relative (🏷️ str)
        17 - to_absolute (🏷️ str)
        18 - merge_by_bb (🏷️ str)
        19 - isin (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - np_2_b64 (🏷️ str)
        1 - b64_2_np (🏷️ str)
        2 - b64_2_file (🏷️ str)
        3 - bytes_2_file (🏷️ str)
        4 - file_2_bytes (🏷️ str)
        5 - csvs_2_cvat (🏷️ str)
        6 - cvat_2_csvs (🏷️ str)
        7 - df_2_yolo (🏷️ str)
        8 - yolo_2_df (🏷️ str)

      ```




      ```↯ AttrDict ↯
      items[]
        0 - format (🏷️ str)
        1 - warn_on_fail (🏷️ str)
        2 - timeit (🏷️ str)
        3 - io (🏷️ str)
        4 - check_kwargs_not_none (🏷️ str)

      ```


pkgId: 2ce75335bf4abba3aeb28eed79f34c82ec0d0a73a4503682068a19ca2602d24a
name: python-torch-workflow-archiver-nightly
arch: noarch
version: 2024.12.19
epoch: 0
release: 1
url: https://github.com/pytorch/serve/blob/master/workflow-archiver/
rpm_license: Apache License Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torch-workflow-archiver-nightly-2024.12.19-1.src.rpm
location_href: Packages/python-torch-workflow-archiver-nightly-2024.12.19-1.noarch.rpm
checksum_type: sha256
summary:
  Torch Workflow Archiver is used for creating archives of workflow designed using trained neural net models that can be consumed by TorchServe inference

description:
  Torch Workflow Archiver is a tool used for creating archives of workflow designed using trained neural net models that can be consumed by TorchServe inference.
  Use the Torch Workflow Archiver CLI to create a ``.war`` file.
  Torch Workflow Archiver is part of `TorchServe <https://pypi.org/project/torchserve/>`__.
  However, you can install Torch Workflow Archiver stand alone.
  Detailed documentation and examples are provided in the `README
  <https://github.com/pytorch/serve/blob/master/workflow-archiver/README.md>`__.


pkgId: 167c500e22d7375d5028e203e7f19341333a03e2c73e37e0e36c0bdc52d6e487
name: python-torchattack-help
arch: noarch
version: 1.2.0
epoch: 0
release: 1
summary: Development documents and examples for torchattack
url: https://pypi.org/project/torchattack/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchattack-1.2.0-1.src.rpm
location_href: Packages/python-torchattack-help-1.2.0-1.noarch.rpm
checksum_type: sha256
description:
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/refs/heads/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
  [![pypi python versions](https://img.shields.io/pypi/pyversions/torchattack.svg?logo=pypi&logoColor=white&labelColor=2D3339)](https://pypi.python.org/pypi/torchattack)
  [![pypi version](https://img.shields.io/pypi/v/torchattack.svg?logo=pypi&logoColor=white&labelColor=2D3339)](https://pypi.python.org/pypi/torchattack)
  [![pypi weekly downloads](https://img.shields.io/pypi/dm/torchattack?logo=pypi&logoColor=white&labelColor=2D3339)](https://pypi.python.org/pypi/torchattack)
  [![lint](https://github.com/spencerwooo/torchattack/actions/workflows/ci.yml/badge.svg)](https://github.com/spencerwooo/torchattack/actions/workflows/ci.yml)
  🛡 **torchattack** - _A curated list of adversarial attacks in PyTorch, with a focus on transferable black-box attacks._
  ```shell
  pip install torchattack
  ```

  - 🛡️ A curated collection of adversarial attacks implemented in PyTorch.
  - 🔍 Focuses on gradient-based transferable black-box attacks.
  - 📦 Easily load pretrained models from torchvision or timm using `AttackModel`.
  - 🔄 Simple interface to initialize attacks with `create_attack`.
  - 🔧 Extensively typed for better code quality and safety.
  - 📊 Tooling for fooling rate metrics and model evaluation in `eval`.
  - 🔁 Numerous attacks reimplemented for readability and efficiency (TGR, VDC, etc.).

  torchattack's docs are available at [docs.swo.moe/torchattack](https://docs.swo.moe/torchattack/).

  ```python
  import torch
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
  ```
  Load a pretrained model to attack from either torchvision or timm.
  ```python
  from torchattack import AttackModel

  model = AttackModel.from_pretrained(model_name='resnet50', device=device)

  transform, normalize = model.transform, model.normalize


  vit_b16 = AttackModel.from_pretrained(model_name='timm/vit_base_patch16_224', device=device)
  inv_v3 = AttackModel.from_pretrained(model_name='tv/inception_v3', device=device)
  pit_b = AttackModel.from_pretrained(model_name='pit_b_224', device=device, from_timm=True)
  ```
  Initialize an attack by importing its attack class.
  ```python
  from torchattack import FGSM, MIFGSM

  attack = FGSM(model, normalize, device)

  attack = MIFGSM(model, normalize, device, eps=0.03, steps=10, decay=1.0)
  ```
  Initialize an attack by its name with `create_attack()`.
  ```python
  from torchattack import create_attack

  attack = create_attack('FGSM', model, normalize, device)

  attack = create_attack('PGD', model, normalize, device, eps=0.03)

  attack_args = {'steps': 10, 'decay': 1.0}
  attack = create_attack('MIFGSM', model, normalize, device, eps=0.03, **attack_args)
  ```
  Check out [examples/](examples/mifgsm_transfer.py) and [`torchattack.eval.runner`](torchattack/eval/runner.py) for full examples.

  <table>
    <thead>
      <tr>
        <th>Name</th>
        <th>Class Name</th>
        <th>Publication</th>
        <th>Paper (Open Access)</th>
      </tr>
    </thead>
    <tbody>
      <!-- Gradient-based attacks -->
      <tr>
        <th colspan="4">Gradient-based attacks</th>
      </tr>
      <tr>
        <td>FGSM</td>
        <td><code>FGSM</code></td>
        <td><img src="https://img.shields.io/badge/ICLR-2015-62B959?labelColor=2D3339" alt="ICLR 2015"></td>
        <td><a href="https://arxiv.org/abs/1412.6572">Explaining and Harnessing Adversarial Examples</a></td>
      </tr>
      <tr>
        <td>PGD</td>
        <td><code>PGD</code></td>
        <td><img src="https://img.shields.io/badge/ICLR-2018-62B959?labelColor=2D3339" alt="ICLR 2018"></td>
        <td><a href="https://arxiv.org/abs/1706.06083">Towards Deep Learning Models Resistant to Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>PGD (L2)</td>
        <td><code>PGDL2</code></td>
        <td><img src="https://img.shields.io/badge/ICLR-2018-62B959?labelColor=2D3339" alt="ICLR 2018"></td>
        <td><a href="https://arxiv.org/abs/1706.06083">Towards Deep Learning Models Resistant to Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>MI-FGSM</td>
        <td><code>MIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2018-1A407F?labelColor=2D3339" alt="CVPR 2018"></td>
        <td><a href="https://arxiv.org/abs/1710.06081">Boosting Adversarial Attacks with Momentum</a></td>
      </tr>
      <tr>
        <td>DI-FGSM</td>
        <td><code>DIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2019-1A407F?labelColor=2D3339" alt="CVPR 2019"></td>
        <td><a href="https://arxiv.org/abs/1803.06978">Improving Transferability of Adversarial Examples with Input Diversity</a></td>
      </tr>
      <tr>
        <td>TI-FGSM</td>
        <td><code>TIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2019-1A407F?labelColor=2D3339" alt="CVPR 2019"></td>
        <td><a href="https://arxiv.org/abs/1904.02884">Evading Defenses to Transferable Adversarial Examples by Translation-Invariant Attacks</a></td>
      </tr>
      <tr>
        <td>NI-FGSM</td>
        <td><code>NIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/ICLR-2020-62B959?labelColor=2D3339" alt="ICLR 2020"></td>
        <td><a href="https://arxiv.org/abs/1908.06281">Nesterov Accelerated Gradient and Scale Invariance for Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>SI-NI-FGSM</td>
        <td><code>SINIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/ICLR-2020-62B959?labelColor=2D3339" alt="ICLR 2020"></td>
        <td><a href="https://arxiv.org/abs/1908.06281">Nesterov Accelerated Gradient and Scale Invariance for Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>DR</td>
        <td><code>DR</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2020-1A407F?labelColor=2D3339" alt="CVPR 2020"></td>
        <td><a href="https://arxiv.org/abs/1911.11616">Enhancing Cross-Task Black-Box Transferability of Adversarial Examples With Dispersion Reduction</a></td>
      </tr>
      <tr>
        <td>VMI-FGSM</td>
        <td><code>VMIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2021-1A407F?labelColor=2D3339" alt="CVPR 2021"></td>
        <td><a href="https://arxiv.org/abs/2103.15571">Enhancing the Transferability of Adversarial Attacks through Variance Tuning</a></td>
      </tr>
      <tr>
        <td>VNI-FGSM</td>
        <td><code>VNIFGSM</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2021-1A407F?labelColor=2D3339" alt="CVPR 2021"></td>
        <td><a href="https://arxiv.org/abs/2103.15571">Enhancing the Transferability of Adversarial Attacks through Variance Tuning</a></td>
      </tr>
      <tr>
        <td>Admix</td>
        <td><code>Admix</code></td>
        <td><img src="https://img.shields.io/badge/ICCV-2021-5A428D?labelColor=2D3339" alt="ICCV 2021"></td>
        <td><a href="https://arxiv.org/abs/2102.00436">Admix: Enhancing the Transferability of Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>FIA</td>
        <td><code>FIA</code></td>
        <td><img src="https://img.shields.io/badge/ICCV-2021-5A428D?labelColor=2D3339" alt="ICCV 2021"></td>
        <td><a href="https://arxiv.org/abs/2107.14185">Feature Importance-aware Transferable Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>PNA-PatchOut</td>
        <td><code>PNAPatchOut</code></td>
        <td><img src="https://img.shields.io/badge/AAAI-2022-C8172C?labelColor=2D3339" alt="AAAI 2022"></td>
        <td><a href="https://arxiv.org/abs/2109.04176">Towards Transferable Adversarial Attacks on Vision Transformers</a></td>
      </tr>
      <tr>
        <td>NAA</td>
        <td><code>NAA</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2022-1A407F?labelColor=2D3339" alt="CVPR 2022"></td>
        <td><a href="https://arxiv.org/abs/2204.00008">Improving Adversarial Transferability via Neuron Attribution-Based Attacks</a></td>
      </tr>
      <tr>
        <td>SSA</td>
        <td><code>SSA</code></td>
        <td><img src="https://img.shields.io/badge/ECCV-2022-E16B4C?labelColor=2D3339" alt="ECCV 2022"></td>
        <td><a href="https://arxiv.org/abs/2207.05382">Frequency Domain Model Augmentation for Adversarial Attack</a></td>
      </tr>
      <tr>
        <td>TGR</td>
        <td><code>TGR</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2023-1A407F?labelColor=2D3339" alt="CVPR 2023"></td>
        <td><a href="https://arxiv.org/abs/2303.15754">Transferable Adversarial Attacks on Vision Transformers with Token Gradient Regularization</a></td>
      </tr>
      <tr>
        <td>ILPD</td>
        <td><code>ILPD</code></td>
        <td><img src="https://img.shields.io/badge/NeurIPS-2023-654287?labelColor=2D3339" alt="NeurIPS 2023"></td>
        <td><a href="https://arxiv.org/abs/2304.13410">Improving Adversarial Transferability via Intermediate-level Perturbation Decay</a></td>
      </tr>
      <tr>
        <td>DeCoWA</td>
        <td><code>DeCoWA</code></td>
        <td><img src="https://img.shields.io/badge/AAAI-2024-C8172C?labelColor=2D3339" alt="AAAI 2024"></td>
        <td><a href="https://arxiv.org/abs/2402.03951">Boosting Adversarial Transferability across Model Genus by Deformation-Constrained Warping</a></td>
      </tr>
      <tr>
        <td>VDC</td>
        <td><code>VDC</code></td>
        <td><img src="https://img.shields.io/badge/AAAI-2024-C8172C?labelColor=2D3339" alt="AAAI 2024"></td>
        <td><a href="https://ojs.aaai.org/index.php/AAAI/article/view/28541">Improving the Adversarial Transferability of Vision Transformers with Virtual Dense Connection</a></td>
      </tr>
      <!-- Generative attacks -->
      <tr>
        <th colspan="4">Generative attacks</th>
      </tr>
      <tr>
        <td>CDA</td>
        <td><code>CDA</code></td>
        <td><img src="https://img.shields.io/badge/NeurIPS-2019-654287?labelColor=2D3339" alt="NeurIPS 2019"></td>
        <td><a href="https://arxiv.org/abs/1905.11736">Cross-Domain Transferability of Adversarial Perturbations</a></td>
      </tr>
      <tr>
        <td>LTP</td>
        <td><code>LTP</code></td>
        <td><img src="https://img.shields.io/badge/NeurIPS-2021-654287?labelColor=2D3339" alt="NeurIPS 2021"></td>
        <td><a href="https://proceedings.neurips.cc/paper/2021/hash/7486cef2522ee03547cfb970a404a874-Abstract.html">Learning Transferable Adversarial Perturbations</a></td>
      </tr>
      <tr>
        <td>BIA</td>
        <td><code>BIA</code></td>
        <td><img src="https://img.shields.io/badge/ICLR-2022-62B959?labelColor=2D3339" alt="ICLR 2022"></td>
        <td><a href="https://arxiv.org/abs/2201.11528">Beyond ImageNet Attack: Towards Crafting Adversarial Examples for Black-box Domains</a></td>
      </tr>
      <!-- Others -->
      <tr>
        <th colspan="4">Others</th>
      </tr>
      <tr>
        <td>DeepFool</td>
        <td><code>DeepFool</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2016-1A407F?labelColor=2D3339" alt="CVPR 2016"></td>
        <td><a href="https://arxiv.org/abs/1511.04599">DeepFool: A Simple and Accurate Method to Fool Deep Neural Networks</a></td>
      </tr>
      <tr>
        <td>GeoDA</td>
        <td><code>GeoDA</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2020-1A407F?labelColor=2D3339" alt="CVPR 2020"></td>
        <td><a href="https://arxiv.org/abs/2003.06468">GeoDA: A Geometric Framework for Black-box Adversarial Attacks</a></td>
      </tr>
      <tr>
        <td>SSP</td>
        <td><code>SSP</code></td>
        <td><img src="https://img.shields.io/badge/CVPR-2020-1A407F?labelColor=2D3339" alt="CVPR 2020"></td>
        <td><a href="https://arxiv.org/abs/2006.04924">A Self-supervised Approach for Adversarial Robustness</a></td>
      </tr>
    </tbody>
  </table>

  On how to install dependencies, run tests, and build documentation. See [Development - torchattack](https://docs.swo.moe/torchattack/development/).

  [MIT](LICENSE)

  - [Harry24k/adversarial-attacks-pytorch](https://github.com/Harry24k/adversarial-attacks-pytorch)
  - [Trusted-AI/adversarial-robustness-toolbox](https://github.com/Trusted-AI/adversarial-robustness-toolbox)

rpm_license:
  MIT License  Copyright (c) 2023 Spencer Woo  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 51dd69029a5de2b1bbe88b201ace304228994f75bc7d34bc76c48671ae46c11b
name: python-torchcp-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for torchcp
url: https://github.com/ml-stat-Sustech/TorchCP
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchcp-1.0.1-1.src.rpm
location_href: Packages/python-torchcp-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  <div id="top"></div>
  <!--
  *** Thanks for checking out the Best-README-Template. If you have a suggestion
  *** that would make this better, please fork the repo and create a pull request
  *** or simply open an issue with the tag "enhancement".
  *** Don't forget to give the project a star!
  *** Thanks again! Now go create something AMAZING! :D
  -->

  <!-- PROJECT SHIELDS -->

  <!--
  *** I'm using markdown "reference style" links for readability.
  *** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
  *** See the bottom of this document for the declaration of the reference variables
  *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
  *** https://www.markdownguide.org/basic-syntax/#reference-style-links
  -->

  [![Forks][forks-shield]][forks-url]
  [![Stargazers][stars-shield]][stars-url]
  [![Issues][issues-shield]][issues-url]
  <!--
  ***[![MIT License][license-shield]][license-url]
  -->

  <!-- PROJECT LOGO -->

  <br />
  <div align="center">
    <!-- <a href="https://github.com/microsoft/promptbench">
      <img src="imgs/promptbench_logo.png" alt="Logo" width="300">
    </a> -->
  <img src="https://raw.githubusercontent.com/ml-stat-Sustech/TorchCP/master/logo.png" width="300px" />
  <!-- <h3 align="center">USB</h3> -->
  <!-- ![TorchCP_logo](./logo.png) -->
  <p align="center">
      <strong>TorchCP</strong>: A Python toolbox for Conformal Prediction in Deep Learning.
      <br />
      <a href="https://arxiv.org/abs/2402.12683">Technical Report</a>
      ·
      <a href="https://torchcp.readthedocs.io/en/latest/">Documentation</a>
    </p>
  </div>


  TorchCP is a Python toolbox for conformal prediction research on deep learning models, built on the PyTorch Library with strong GPU acceleration. In the toolbox, we implement representative methods (including posthoc and training methods) for many tasks of conformal prediction, including: Classification, Regression, Graph Node Classification, and LLM. We build the basic framework of TorchCP based on [`AdverTorch`](https://github.com/BorealisAI/advertorch/tree/master). This codebase is still under construction and maintained by [`Hongxin Wei`](https://hongxin001.github.io/)'s research group at SUSTech.
  Comments, issues, contributions, and collaborations are all welcomed!



  - Added new score functions and training methods for classification, including KNN, TOPK, C-Adapter, and ConfTS.
  - Introduced CP algorithms for graph node classification, such as DAPS, SNAPS, and NAPS.
  - Added new conformal algorithms for regression, including CQRFM, CQRR, CQRM, and Ensemble CP.
  - Introduced CP algorithms for LLMs.
  - Added unit-test and examples.
  - Optimized the form of prediction sets to improve the computational efficiency.
  - Refactored the module design of Regression to improve the scalability.



  TorchCP has implemented the following methods:



  | Year | Title                                                                                                                                                                        | Venue                | Code Link                                                                         | Implementation                                      |
  |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|-----------------------------------------------------------------------------------|-----------------------------------------------------|
  | 2024 | [**C-Adapter: Adapting Deep Classifiers for Efficient Conformal Prediction Sets**](https://arxiv.org/abs/2410.09408)                                                         | Arxiv                |                                                                                   | classification.loss.cd_loss                         |
  | 2024 | [**Delving into temperature scaling for adaptive conformal prediction**](https://arxiv.org/abs/2402.04344)                                                                   | Arxiv                |                                                                                   | classification.loss.confts                          |
  | 2024 | [**Conformal Prediction for Deep Classifier via Label Ranking**](https://arxiv.org/abs/2310.06430)                                                                           | ICML'24              | [Link](https://github.com/ml-stat-Sustech/conformal_prediction_via_label_ranking) | classification.score.saps                           |
  | 2023 | [**Class-Conditional Conformal Prediction with Many Classes**](https://arxiv.org/abs/2306.09335)                                                                             | NeurIPS'23           | [Link](https://github.com/tiffanyding/class-conditional-conformal)                | classification.predictor.cluster                    |
  | 2023 | [**Conformal Prediction Sets for Ordinal Classification**](https://proceedings.neurips.cc/paper_files/paper/2023/file/029f699912bf3db747fe110948cc6169-Paper-Conference.pdf) | NeurIPS'23           |                                                                                   | classification.trainer.ordinal                      |
  | 2022 | [**Learning Optimal Conformal Classifiers**](https://arxiv.org/abs/2110.09192)                                                                                               | ICLR'22              | [Link](https://github.com/google-deepmind/conformal_training/tree/main)           | classification.loss.conftr                          |
  | 2021 | [**Uncertainty Sets for Image Classifiers using Conformal Prediction**](https://arxiv.org/abs/2009.14193       )                                                             | ICLR'21              | [Link](https://github.com/aangelopoulos/conformal_classification)                 | classification.score.raps classification.score.topk |
  | 2020 | [**Classification with Valid and Adaptive Coverage**](https://proceedings.neurips.cc/paper/2020/file/244edd7e85dc81602b7615cd705545f5-Paper.pdf)                             | NeurIPS'20           | [Link](https://github.com/msesia/arc)                                             | classification.score.aps                            |
  | 2019 | [**Conformal Prediction Under Covariate Shift**](https://arxiv.org/abs/1904.06019)                                                                                           | NeurIPS'19           | [Link](https://github.com/ryantibs/conformal/)                                    | classification.predictor.weight                     |
  | 2016 | [**Least Ambiguous Set-Valued Classifiers with Bounded Error Levels**](https://arxiv.org/abs/1609.00451)                                                                     | JASA                 |                                                                                   | classification.score.thr                            |
  | 2016 | [**Hedging Predictions in Machine Learning**](https://ieeexplore.ieee.org/document/8129828)                                                                                  | The Computer Journal |                                                                                   | classification.score.knn                            |
  | 2015 | [**Bias reduction through conditional conformal prediction**](https://dl.acm.org/doi/abs/10.3233/IDA-150786)                                                                 | Intell. Data Anal.   |                                                                                   | classification.score.margin                         |
  | 2012 | [**Conditional Validity of Inductive Conformal Predictors**](https://proceedings.mlr.press/v25/vovk12.html)                                                                  | ACML'12              |                                                                                   | classification.predictor.classwise                  |
  | 2007 | [**Hedging Predictions in Machine Learning**](https://ieeexplore.ieee.org/document/8129828)                                                                                  | The Computer Journal |                                                                                   | classification.score.knn                            |



  | Year | Title                                                                                                                                           | Venue                | Code Link                                              | Implementation                             | Remark              |
  |------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------------------|--------------------------------------------------------|--------------------------------------------|---------------------|
  | 2023 | [**Conformal Prediction via Regression-as-Classification**](http://etash.me/papers/Bayesian_Conformal_Prediction_through_Memory_Adaptation.pdf) | RegML @ NeurIPS 2023 | [link](https://github.com/EtashGuha/R2CCP/tree/master) | regression.score.r2ccp                     |                     |
  | 2021 | [**Adaptive Conformal Inference Under Distribution Shift**](https://arxiv.org/abs/2106.00170)                                                   | NeurIPS'21           | [Link](https://github.com/isgibbs/AdaptiveConformal)   | regression.predictor.aci                   | support time series |
  | 2020 | [**A comparison of some conformal quantile regression methods**](https://onlinelibrary.wiley.com/doi/epdf/10.1002/sta4.261)                     | Stat                 | [Link](https://github.com/soroushzargar/DAPS)          | regression.score.cqm regression.score.cqrr |                     |
  | 2020 | [**Conformal Prediction Interval for Dynamic Time-Series**](https://proceedings.mlr.press/v139/xu21h.html)                                      | ICML'21              | [Link](https://github.com/hamrel-cxu/EnbPI)            | regression.predictor.ensemble              | support time series |
  | 2019 | [**Adaptive, Distribution-Free Prediction Intervals for Deep Networks**](https://proceedings.mlr.press/v108/kivaranovic20a.html)                | AISTATS'19           | [Link](https://github.com/yromano/cqr)                 | regression.score.cqrfm                     |                     |
  | 2019 | [**Conformalized Quantile Regression**](https://proceedings.neurips.cc/paper_files/paper/2019/file/5103c3584b063c431bd1268e9b5e76fb-Paper.pdf)  | NeurIPS'19           | [Link](https://github.com/yromano/cqr)                 | regression.score.cqr                       |                     |
  | 2017 | [**Distribution-Free Predictive Inference For Regression**](https://arxiv.org/abs/1604.04173)                                                   | JASA                 | [Link](https://github.com/ryantibs/conformal)          | regression.predictor.split                 |                     |



  | Year | Title                                                                                                                                                                                                      | Venue      | Code Link                                                  | Implementation                   |
  |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|------------------------------------------------------------|----------------------------------|
  | 2024 | [**Similarity-Navigated Conformal Prediction for Graph Neural Networks**](https://arxiv.org/abs/2405.14303)                                                                                                | NeuIPS'24  | [Link](https://github.com/janqsong/SNAPS)                  | graph.score.snaps                |
  | 2023 | [**Distribution Free Prediction Sets for Node Classification**](https://proceedings.mlr.press/v202/clarkson23a)                                                                                            | ICML'23    | [Link](https://github.com/jase-clarkson/graph_cp)          | graph.predictor.neighbors_weight |
  | 2023 | [**Conformal Prediction Sets for Graph Neural Networks**](https://proceedings.mlr.press/v202/h-zargarbashi23a.html)                                                                                        | ICML'23    | [Link](https://github.com/soroushzargar/DAPS)              | graph.score.daps                 |
  | 2023 | [**Uncertainty Quantification over Graph with Conformalized Graph Neural Networks**](https://proceedings.neurips.cc/paper_files/paper/2023/hash/54a1495b06c4ee2f07184afb9a37abda-Abstract-Conference.html) | NeurIPS'23 | [Link](https://github.com/snap-stanford/conformalized-gnn) | graph.trainer.cfgnn              |



  | Year | Title                                                                         | Venue   | Code Link                                                     | Implementation              |
  |------|-------------------------------------------------------------------------------|---------|---------------------------------------------------------------|-----------------------------|
  | 2023 | [**Conformal Language Modeling**](https://openreview.net/forum?id=pzUhfQ74c5) | ICLR'24 | [Link](https://github.com/Varal7/conformal-language-modeling) | llm.predictor.conformal_llm |



  TorchCP is still under active development. We will add the following features/items down the road:

  | Year | Title                                                                                                           | Venue      | Code                                                                       |
  |------|-----------------------------------------------------------------------------------------------------------------|------------|----------------------------------------------------------------------------|
  | 2022 | [**Training Uncertainty-Aware Classifiers with Conformalized Deep Learning**](https://arxiv.org/abs/2205.05878) | NeurIPS'22 | [Link](https://github.com/bat-sheva/conformal-learning)                    |
  | 2022 | [**Adaptive Conformal Predictions for Time Series**](https://arxiv.org/abs/2202.07282)                          | ICML'22    | [Link](https://github.com/mzaffran/AdaptiveConformalPredictionsTimeSeries) |
  | 2022 | [**Conformal Prediction Sets with Limited False Positives**](https://arxiv.org/abs/2202.07650)                  | ICML'22    | [Link](https://github.com/ajfisch/conformal-fp)                            |
  | 2021 | [**Optimized conformal classification using gradient descent approximation**](https://arxiv.org/abs/2105.11255) | Arxiv      |                                                                            |



  TorchCP is developed with Python 3.9 and PyTorch 2.0.1. To install TorchCP, simply run

  ```
  pip install torchcp
  ```

  To install from TestPyPI server, run

  ```
  pip install --index-url https://test.pypi.org/simple/ --no-deps torchcp
  ```


  TorchCP achieves 100% unit test coverage. You can use the following command to test the code implementation:
  ```
  pytest --cov=torchcp tests
  ```



  Here, we provide a simple example for a classification task, with THR score and SplitPredictor.

  ```python
  from torchcp.classification.score import THR
  from torchcp.classification.predictor import SplitPredictor


  cal_dataloader = ...
  test_dataloader = ...

  model = ...

  model.eval()



  predictor = SplitPredictor(score_function=THR(), model=model)


  predictor.calibrate(cal_dataloader, alpha=0.1)




  test_instances = ...
  predict_sets = predictor.predict(test_instances)
  print(predict_sets)




  result_dict = predictor.evaluate(test_dataloader)
  print(result_dict["coverage_rate"], result_dict["average_size"])

  ```

  You may find more tutorials in [`examples`](https://github.com/ml-stat-Sustech/TorchCP/tree/master/examples) folder.



  This project is licensed under the LGPL. The terms and conditions can be found in the LICENSE and LICENSE.GPL files.



  If you find our repository useful for your research, please consider citing the
  following [technical report](https://arxiv.org/abs/2402.12683):

  ```
  @misc{wei2024torchcp,
        title={TorchCP: A Library for Conformal Prediction based on PyTorch},
        author={Hongxin Wei and Jianguo Huang},
        year={2024},
        eprint={2402.12683},
        archivePrefix={arXiv},
        primaryClass={cs.LG}
  }
  ```

  We welcome you to cite the following works:

  ```
  @inproceedings{huangconformal,
    title={Conformal Prediction for Deep Classifier via Label Ranking},
    author={Huang, Jianguo and Xi, HuaJun and Zhang, Linjun and Yao, Huaxiu and Qiu, Yue and Wei, Hongxin},
    booktitle={Forty-first International Conference on Machine Learning}
  }

  @article{xi2024does,
    title={Does Confidence Calibration Help Conformal Prediction?},
    author={Xi, Huajun and Huang, Jianguo and Feng, Lei and Wei, Hongxin},
    journal={arXiv preprint arXiv:2402.04344},
    year={2024}
  }

  @article{liu2024c,
    title={C-Adapter: Adapting Deep Classifiers for Efficient Conformal Prediction Sets},
    author={Liu, Kangdao and Zeng, Hao and Huang, Jianguo and Zhuang, Huiping and Vong, Chi-Man and Wei, Hongxin},
    journal={arXiv preprint arXiv:2410.09408},
    year={2024}
  }
  ```



  * [Hongxin Wei](https://hongxin001.github.io/)
  * [Jianguo Huang](https://jianguo99.github.io/)
  * [Xuanning Zhou](https://github.com/Shinning-Zhou)
  * [Jianqing Song](https://janqsong.github.io/)

  [contributors-shield]: https://img.shields.io/github/contributors/ml-stat-Sustech/TorchCP.svg?style=for-the-badge

  [contributors-url]: https://github.com/ml-stat-Sustech/TorchCP/graphs/contributors

  [forks-shield]: https://img.shields.io/github/forks/ml-stat-Sustech/TorchCP.svg?style=for-the-badge

  [forks-url]: https://github.com/ml-stat-Sustech/TorchCP/network/members

  [stars-shield]: https://img.shields.io/github/stars/ml-stat-Sustech/TorchCP.svg?style=for-the-badge

  [stars-url]: https://github.com/ml-stat-Sustech/TorchCP/stargazers

  [issues-shield]: https://img.shields.io/github/issues/ml-stat-Sustech/TorchCP.svg?style=for-the-badge

  [issues-url]: https://github.com/ml-stat-Sustech/TorchCP/issues

  [license-shield]: https://img.shields.io/github/license/ml-stat-Sustech/TorchCP.svg?style=for-the-badge

  [license-url]: https://github.com/ml-stat-Sustech/TorchCP/blob/main/LICENSE.txt


pkgId: fcf59558d1adcf1a0f74e0e9cf02530a9cd2fc60fc30ac116866f141054c2414
name: python-torchcvnn-help
arch: noarch
version: 0.7.0
epoch: 0
release: 1
summary: Development documents and examples for torchcvnn
url: https://pypi.org/project/torchcvnn/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchcvnn-0.7.0-1.src.rpm
location_href: Packages/python-torchcvnn-help-0.7.0-1.noarch.rpm
checksum_type: sha256
description:
  [![docs](https://github.com/jeremyfix/torchcvnn/actions/workflows/doc.yml/badge.svg)](https://jeremyfix.github.io/torchcvnn/) ![pytest](https://github.com/jeremyfix/torchcvnn/actions/workflows/test.yml/badge.svg) [![PyPI version](https://badge.fury.io/py/torchcvnn.svg)](https://badge.fury.io/py/torchcvnn)

  This is a library that uses [pytorch](https://pytorch.org) as a back-end for complex valued neural networks.

  It was initially developed by Victor Dhédin and Jérémie Levi during their third year project at CentraleSupélec.



  To install the library, it is simple as :

  ```
  python -m pip install torchcvnn
  ```



  To install when developping the library, within a virtual envrionment, you can :

  ```
  git clone git@github.com:jeremyfix/torchcvnn.git
  python3 -m venv torchcvnn-venv
  source torchcvnn-venv/bin/activate
  python -m pip install -e torchcvnn
  ```

  This will install torchcvnn in developper mode.



  To trigger the pipeline for a new release, you have to tag a commit and to push
  it on the main branch

  ```
  [main] git tag x.x.x
  [main] git push --tags
  ```

  This will trigger the `ci-cd.yml` pipeline which builds the distribution,
  release it on github and on pypi.

  Any commit that is not explicitely tagged with a version number does not trigger
  the release ci-cd pipeline.



  You might also be interested in some other projects:

  Tensorflow based :

  - [cvnn](https://github.com/NEGU93/cvnn) developed by colleagues from CentraleSupélec

  Pytorch based :

  - [cplxmodule](https://github.com/ivannz/cplxmodule)
  - [complexPyTorch](https://github.com/wavefrontshaping/complexPyTorch)


pkgId: 19208669a565a6ab58f6f818df46a47ee2752b2e29e46adaf2ff1b53aecfaafa
name: python-torchdata
arch: noarch
version: 0.10.1
epoch: 0
release: 1
summary: Composable data loading modules for PyTorch
url: https://github.com/pytorch/data
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchdata-0.10.1-1.src.rpm
location_href: Packages/python-torchdata-0.10.1-1.noarch.rpm
checksum_type: sha256
description:
  [**What is TorchData?**](#what-is-torchdata) | [**Stateful DataLoader**](#stateful-dataloader) |
  [**Install guide**](#installation) | [**Contributing**](#contributing) | [**License**](#license)

  **:warning: June 2024 Status Update: Removing DataPipes and DataLoader V2**

  **We are re-focusing the torchdata repo to be an iterative enhancement of torch.utils.data.DataLoader. We do not plan on
  continuing development or maintaining the [`DataPipes`] and [`DataLoaderV2`] solutions, and they will be removed from
  the torchdata repo. We'll also be revisiting the `DataPipes` references in pytorch/pytorch. In release
  `torchdata==0.8.0` (July 2024) they will be marked as deprecated, and sometime after 0.9.0 (Oct 2024) they will be
  deleted. Existing users are advised to pin to `torchdata==0.9.0` or an older version until they are able to migrate
  away. Subsequent releases will not include DataPipes or DataLoaderV2. The old version of this README is
  [available here](https://github.com/pytorch/data/blob/v0.7.1/README.md). Please reach out if you suggestions or comments
  (please use [#1196](https://github.com/pytorch/data/issues/1196) for feedback).**





  The TorchData project is an iterative enhancement to the PyTorch torch.utils.data.DataLoader and
  torch.utils.data.Dataset/IterableDataset to make them scalable, performant dataloading solutions. We will be iterating
  on the enhancements under [the torchdata repo](torchdata).

  Our first change begins with adding checkpointing to torch.utils.data.DataLoader, which can be found in
  [stateful_dataloader, a drop-in replacement for torch.utils.data.DataLoader](torchdata/stateful_dataloader), by defining
  `load_state_dict` and `state_dict` methods that enable mid-epoch checkpointing, and an API for users to track custom
  iteration progress, and other custom states from the dataloader workers such as token buffers and/or RNG states.



  `torchdata.stateful_dataloader.StatefulDataLoader` is a drop-in replacement for torch.utils.data.DataLoader which
  provides state_dict and load_state_dict functionality. See
  [the Stateful DataLoader main page](torchdata/stateful_dataloader) for more information and examples. Also check out the
  examples
  [in this Colab notebook](https://colab.research.google.com/drive/1tonoovEd7Tsi8EW8ZHXf0v3yHJGwZP8M?usp=sharing).



  torchdata.nodes is a library of composable iterators (not iterables!) that let you chain together common dataloading and
  pre-proc operations. It follows a streaming programming model, although "sampler + Map-style" can still be configured if
  you desire. See [torchdata.nodes main page](torchdata/nodes) for more details. Stay tuned for tutorial on
  torchdata.nodes coming soon!





  The following is the corresponding `torchdata` versions and supported Python versions.

  | `torch`              | `torchdata`        | `python`                                |
  | -------------------- | ------------------ | --------------------------------------- |
  | `master` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.12` (`3.13` experimental) |
  | `2.5.0`              | `0.10.0`           | `>=3.9`, `<=3.12`                       |
  | `2.5.0`              | `0.9.0`            | `>=3.9`, `<=3.12`                       |
  | `2.4.0`              | `0.8.0`            | `>=3.8`, `<=3.12`                       |
  | `2.0.0`              | `0.6.0`            | `>=3.8`, `<=3.11`                       |
  | `1.13.1`             | `0.5.1`            | `>=3.7`, `<=3.10`                       |
  | `1.12.1`             | `0.4.1`            | `>=3.7`, `<=3.10`                       |
  | `1.12.0`             | `0.4.0`            | `>=3.7`, `<=3.10`                       |
  | `1.11.0`             | `0.3.0`            | `>=3.7`, `<=3.10`                       |



  First, set up an environment. We will be installing a PyTorch binary as well as torchdata. If you're using conda, create
  a conda environment:

  ```bash
  conda create --name torchdata
  conda activate torchdata
  ```

  If you wish to use `venv` instead:

  ```bash
  python -m venv torchdata-env
  source torchdata-env/bin/activate
  ```

  Install torchdata:

  Using pip:

  ```bash
  pip install torchdata
  ```

  Using conda:

  ```bash
  conda install -c pytorch torchdata
  ```



  ```bash
  pip install .
  ```

  In case building TorchData from source fails, install the nightly version of PyTorch following the linked guide on the
  [contributing page](CONTRIBUTING.md#install-pytorch-nightly).



  The nightly version of TorchData is also provided and updated daily from main branch.

  Using pip:

  ```bash
  pip install --pre torchdata --index-url https://download.pytorch.org/whl/nightly/cpu
  ```

  Using conda:

  ```bash
  conda install torchdata -c pytorch-nightly
  ```



  We welcome PRs! See the [CONTRIBUTING](CONTRIBUTING.md) file.



  We'd love to hear from and work with early adopters to shape our designs. Please reach out by raising an issue if you're
  interested in using this tooling for your project.



  TorchData is BSD licensed, as found in the [LICENSE](LICENSE) file.


pkgId: 5d76750e7c4daa075aabce27234c53be23d9add56680f046b63cfb0bd38a4662
name: python-torchdistill-help
arch: noarch
version: 1.1.2
epoch: 0
release: 1
summary: Development documents and examples for torchdistill
url: https://github.com/yoshitomo-matsubara/torchdistill
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchdistill-1.1.2-1.src.rpm
location_href: Packages/python-torchdistill-help-1.1.2-1.noarch.rpm
checksum_type: sha256
description:
  ![torchdistill logo](https://raw.githubusercontent.com/yoshitomo-matsubara/torchdistill/main/docs/source/_static/images/logo-color.png)


  [![PyPI version](https://img.shields.io/pypi/v/torchdistill?color=00cc00)](https://pypi.org/project/torchdistill/)
  [![Build Status](https://app.travis-ci.com/yoshitomo-matsubara/torchdistill.svg?token=BsLDELKSQ5j23aFsTQKc&branch=main)](https://travis-ci.com/github/yoshitomo-matsubara/torchdistill)
  [![GitHub Discussions](https://img.shields.io/github/discussions/yoshitomo-matsubara/torchdistill)](https://github.com/yoshitomo-matsubara/torchdistill/discussions)
  [![DOI:10.1007/978-3-030-76423-4_3](https://zenodo.org/badge/DOI/10.1007/978-3-030-76423-4_3.svg)](https://doi.org/10.1007/978-3-030-76423-4_3)
  [![DOI:10.18653/v1/2023.nlposs-1.18](https://zenodo.org/badge/DOI/10.18653/v1/2023.nlposs-1.18.svg)](https://doi.org/10.18653/v1/2023.nlposs-1.18)


  ***torchdistill*** (formerly *kdkit*) offers various state-of-the-art knowledge distillation methods
  and enables you to design (new) experiments simply by editing a declarative yaml config file instead of Python code.
  Even when you need to extract intermediate representations in teacher/student models,
  you will **NOT** need to reimplement the models, that often change the interface of the forward, but instead
  specify the module path(s) in the yaml file. Refer to [these papers](https://github.com/yoshitomo-matsubara/torchdistill#citation) for more details.

  In addition to knowledge distillation, this framework helps you design and perform general deep learning experiments
  (**WITHOUT coding**) for reproducible deep learning studies. i.e., it enables you to train models without teachers
  simply by excluding teacher entries from a declarative yaml config file.
  You can find such examples below and in [configs/sample/](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/).

  When you refer to ***torchdistill*** in your paper, please cite [these papers](https://github.com/yoshitomo-matsubara/torchdistill#citation)
  instead of this GitHub repository.
  **If you use** ***torchdistill*** **as part of your work, your citation is appreciated and motivates me to maintain and upgrade this framework!**



  You can find the API documentation and research projects that leverage ***torchdistill*** at https://yoshitomo-matsubara.net/torchdistill/



  Using **ForwardHookManager**, you can extract intermediate representations in model without modifying the interface of its forward function.
  [This example notebook](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/demo/extract_intermediate_representations.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/yoshitomo-matsubara/torchdistill/blob/main/demo/extract_intermediate_representations.ipynb) [![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/yoshitomo-matsubara/torchdistill/blob/main/demo/extract_intermediate_representations.ipynb)
  will give you a better idea of the usage such as knowledge distillation and analysis of intermediate representations.



  In ***torchdistill***, many components and PyTorch modules are abstracted e.g., models, datasets, optimizers, losses,
  and more! You can define them in a declarative PyYAML config file so that can be seen as a summary of your experiment,
  and in many cases, you will **NOT need to write Python code at all**.
  Take a look at some configurations available in [configs/](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/).
  You'll see what modules are abstracted and how they are defined in a declarative PyYAML config file to design an experiment.

  If you want to use your own modules (models, loss functions, datasets, etc) with this framework,
  you can do so without editing code in the local package `torchdistill/`.
  See [the official documentation](https://yoshitomo-matsubara.net/torchdistill/usage.html) and [Discussions](https://github.com/yoshitomo-matsubara/torchdistill/discussions) for more details.



  [Top-1 validation accuracy for ILSVRC 2012 (ImageNet)](https://yoshitomo-matsubara.net/torchdistill/benchmarks.html#imagenet-ilsvrc-2012)



  Executable code can be found in [examples/](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/) such as
  - [Image classification](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/torchvision/image_classification.py): ImageNet (ILSVRC 2012), CIFAR-10, CIFAR-100, etc
  - [Object detection](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/torchvision/object_detection.py): COCO 2017, etc
  - [Semantic segmentation](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/torchvision/semantic_segmentation.py): COCO 2017, PASCAL VOC, etc
  - [Text classification](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/hf_transformers/text_classification.py): GLUE, etc

  For CIFAR-10 and CIFAR-100, some models are reimplemented and available as pretrained models in ***torchdistill***.
  More details can be found [here](https://github.com/yoshitomo-matsubara/torchdistill/releases/tag/v0.1.1).

  Some Transformer models fine-tuned by ***torchdistill*** for GLUE tasks are available at [Hugging Face Model Hub](https://huggingface.co/yoshitomo-matsubara).
  Sample GLUE benchmark results and details can be found [here](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/hf_transformers#sample-benchmark-results-and-fine-tuned-models).



  The following examples are available in [demo/](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/demo/).
  Note that these examples are for Google Colab users and compatible with Amazon SageMaker Studio Lab.
  Usually, [examples/](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/) would be a better reference
  if you have your own GPU(s).


  - Training without teacher models [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/yoshitomo-matsubara/torchdistill/blob/main/demo/cifar_training.ipynb) [![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/yoshitomo-matsubara/torchdistill/blob/main/demo/cifar_training.ipynb)
  - Knowledge distillation [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/yoshitomo-matsubara/torchdistill/blob/main/demo/cifar_kd.ipynb) [![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/yoshitomo-matsubara/torchdistill/blob/main/demo/cifar_kd.ipynb)


  - Fine-tuning without teacher models [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/yoshitomo-matsubara/torchdistill/blob/main/demo/glue_finetuning_and_submission.ipynb) [![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/yoshitomo-matsubara/torchdistill/blob/main/demo/glue_finetuning_and_submission.ipynb)
  - Knowledge distillation [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/yoshitomo-matsubara/torchdistill/blob/main/demo/glue_kd_and_submission.ipynb) [![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/yoshitomo-matsubara/torchdistill/blob/main/demo/glue_kd_and_submission.ipynb)

  These examples write out test prediction files for you to see the test performance at [the GLUE leaderboard system](https://gluebenchmark.com/).



  If you find models on [PyTorch Hub](https://pytorch.org/hub/) or GitHub repositories supporting PyTorch Hub,
  you can import them as teacher/student models simply by editing a declarative yaml config file.

  e.g., If you use a pretrained ResNeSt-50 available in [huggingface/pytorch-image-models](https://github.com/huggingface/pytorch-image-models)
  (aka *timm*) as a teacher model for ImageNet dataset, you can import the model via PyTorch Hub with the following entry
  in your declarative yaml config file.

  ```yaml
  models:
    teacher_model:
      key: 'resnest50d'
      repo_or_dir: 'huggingface/pytorch-image-models'
      kwargs:
        num_classes: 1000
        pretrained: True
  ```



  - Python >= 3.9
  - pipenv (optional)


  ```
  pip3 install torchdistill

  pipenv install torchdistill
  ```


  ```
  git clone https://github.com/yoshitomo-matsubara/torchdistill.git
  cd torchdistill/
  pip3 install -e .

  pipenv install "-e ."
  ```



  Feel free to create an issue if you find a bug.
  If you have either a question or feature request, start a new discussion [here](https://github.com/yoshitomo-matsubara/torchdistill/discussions).
  Please search through [Issues](https://github.com/yoshitomo-matsubara/torchdistill/issues) and [Discussions](https://github.com/yoshitomo-matsubara/torchdistill/discussions) and make sure your issue/question/request has not been addressed yet.

  Pull requests are welcome.
  Please start with an issue and discuss solutions with me rather than start with a pull request.


  If you use ***torchdistill*** in your research, please cite the following papers:
  [[Paper](https://link.springer.com/chapter/10.1007/978-3-030-76423-4_3)] [[Preprint](https://arxiv.org/abs/2011.12913)]
  ```bibtex
  @inproceedings{matsubara2021torchdistill,
    title={{torchdistill: A Modular, Configuration-Driven Framework for Knowledge Distillation}},
    author={Matsubara, Yoshitomo},
    booktitle={International Workshop on Reproducible Research in Pattern Recognition},
    pages={24--44},
    year={2021},
    organization={Springer}
  }
  ```

  [[Paper](https://aclanthology.org/2023.nlposs-1.18/)] [[OpenReview](https://openreview.net/forum?id=A5Axeeu1Bo)] [[Preprint](https://arxiv.org/abs/2310.17644)]
  ```bibtex
  @inproceedings{matsubara2023torchdistill,
    title={{torchdistill Meets Hugging Face Libraries for Reproducible, Coding-Free Deep Learning Studies: A Case Study on NLP}},
    author={Matsubara, Yoshitomo},
    booktitle={Proceedings of the 3rd Workshop for Natural Language Processing Open Source Software (NLP-OSS 2023)},
    publisher={Empirical Methods in Natural Language Processing},
    pages={153--164},
    year={2023}
  }
  ```




  This project has been supported by Travis CI's OSS credits and [JetBrain's Free License Programs (Open Source)](https://www.jetbrains.com/community/opensource/?utm_campaign=opensource&utm_content=approved&utm_medium=email&utm_source=newsletter&utm_term=jblogo#support)
  since November 2021 and June 2022, respectively.
  ![PyCharm logo](https://resources.jetbrains.com/storage/products/company/brand/logos/PyCharm.svg)



  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/image_classification.py) [pytorch/vision/references/classification/](https://github.com/pytorch/vision/blob/main/references/classification/)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/object_detection.py) [pytorch/vision/references/detection/](https://github.com/pytorch/vision/tree/main/references/detection/)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/semantic_segmentation.py) [pytorch/vision/references/segmentation/](https://github.com/pytorch/vision/tree/main/references/segmentation/)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/examples/hf_transformers/text_classification.py) [huggingface/transformers/examples/pytorch/text-classification](https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/kd/) Geoffrey Hinton, Oriol Vinyals, Jeff Dean. ["Distilling the Knowledge in a Neural Network"](https://arxiv.org/abs/1503.02531) (Deep Learning and Representation Learning Workshop: NeurIPS 2014)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/fitnet/) Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, Yoshua Bengio. ["FitNets: Hints for Thin Deep Nets"](https://arxiv.org/abs/1412.6550) (ICLR 2015)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/fsp/) Junho Yim, Donggyu Joo, Jihoon Bae, Junmo Kim. ["A Gift From Knowledge Distillation: Fast Optimization, Network Minimization and Transfer Learning"](http://openaccess.thecvf.com/content_cvpr_2017/html/Yim_A_Gift_From_CVPR_2017_paper.html) (CVPR 2017)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/at/) Sergey Zagoruyko, Nikos Komodakis. ["Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer"](https://openreview.net/forum?id=Sks9_ajex) (ICLR 2017)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/pkt/) Nikolaos Passalis, Anastasios Tefas. ["Learning Deep Representations with Probabilistic Knowledge Transfer"](http://openaccess.thecvf.com/content_ECCV_2018/html/Nikolaos_Passalis_Learning_Deep_Representations_ECCV_2018_paper.html) (ECCV 2018)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/ft/) Jangho Kim, Seonguk Park, Nojun Kwak. ["Paraphrasing Complex Network: Network Compression via Factor Transfer"](http://papers.neurips.cc/paper/7541-paraphrasing-complex-network-network-compression-via-factor-transfer) (NeurIPS 2018)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/dab/) Byeongho Heo, Minsik Lee, Sangdoo Yun, Jin Young Choi. ["Knowledge Transfer via Distillation of Activation Boundaries Formed by Hidden Neurons"](https://aaai.org/ojs/index.php/AAAI/article/view/4264) (AAAI 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/coco2017/ktaad/) Tong He, Chunhua Shen, Zhi Tian, Dong Gong, Changming Sun, Youliang Yan. ["Knowledge Adaptation for Efficient Semantic Segmentation"](https://openaccess.thecvf.com/content_CVPR_2019/html/He_Knowledge_Adaptation_for_Efficient_Semantic_Segmentation_CVPR_2019_paper.html) (CVPR 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/rkd/) Wonpyo Park, Dongju Kim, Yan Lu, Minsu Cho. ["Relational Knowledge Distillation"](http://openaccess.thecvf.com/content_CVPR_2019/html/Park_Relational_Knowledge_Distillation_CVPR_2019_paper.html) (CVPR 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/vid/) Sungsoo Ahn, Shell Xu Hu, Andreas Damianou, Neil D. Lawrence, Zhenwen Dai. ["Variational Information Distillation for Knowledge Transfer"](http://openaccess.thecvf.com/content_CVPR_2019/html/Ahn_Variational_Information_Distillation_for_Knowledge_Transfer_CVPR_2019_paper.html) (CVPR 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/hnd/) Yoshitomo Matsubara, Sabur Baidya, Davide Callegaro, Marco Levorato, Sameer Singh. ["Distilled Split Deep Neural Networks for Edge-Assisted Real-Time Systems"](https://dl.acm.org/doi/10.1145/3349614.3356022) (Workshop on Hot Topics in Video Analytics and Intelligent Edges: MobiCom 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/cckd/) Baoyun Peng, Xiao Jin, Jiaheng Liu, Dongsheng Li, Yichao Wu, Yu Liu, Shunfeng Zhou, Zhaoning Zhang. ["Correlation Congruence for Knowledge Distillation"](http://openaccess.thecvf.com/content_ICCV_2019/html/Peng_Correlation_Congruence_for_Knowledge_Distillation_ICCV_2019_paper.html) (ICCV 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/spkd/) Frederick Tung, Greg Mori. ["Similarity-Preserving Knowledge Distillation"](http://openaccess.thecvf.com/content_ICCV_2019/html/Tung_Similarity-Preserving_Knowledge_Distillation_ICCV_2019_paper.html) (ICCV 2019)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/crd/) Yonglong Tian, Dilip Krishnan, Phillip Isola. ["Contrastive Representation Distillation"](https://openreview.net/forum?id=SkgpBJrtvS) (ICLR 2020)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/coco2017/ghnd/) Yoshitomo Matsubara, Marco Levorato. ["Neural Compression and Filtering for Edge-assisted Real-time Object Detection in Challenged Networks"](https://arxiv.org/abs/2007.15818) (ICPR 2020)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/tfkd/) Li Yuan, Francis E.H.Tay, Guilin Li, Tao Wang, Jiashi Feng. ["Revisiting Knowledge Distillation via Label Smoothing Regularization"](https://openaccess.thecvf.com/content_CVPR_2020/papers/Yuan_Revisiting_Knowledge_Distillation_via_Label_Smoothing_Regularization_CVPR_2020_paper.pdf) (CVPR 2020)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/sskd/) Guodong Xu, Ziwei Liu, Xiaoxiao Li, Chen Change Loy. ["Knowledge Distillation Meets Self-Supervision"](http://www.ecva.net/papers/eccv_2020/papers_ECCV/html/898_ECCV_2020_paper.php) (ECCV 2020)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/pad/) Youcai Zhang, Zhonghao Lan, Yuchen Dai, Fangao Zeng, Yan Bai, Jie Chang, Yichen Wei. ["Prime-Aware Adaptive Distillation"](http://www.ecva.net/papers/eccv_2020/papers_ECCV/html/3317_ECCV_2020_paper.php) (ECCV 2020)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/tree/main/configs/sample/ilsvrc2012/kr/) Pengguang Chen, Shu Liu, Hengshuang Zhao, Jiaya Jia. ["Distilling Knowledge via Knowledge Review"](https://openaccess.thecvf.com/content/CVPR2021/html/Chen_Distilling_Knowledge_via_Knowledge_Review_CVPR_2021_paper.html) (CVPR 2021)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/blob/main/configs/sample/ilsvrc2012/ickd/) Li Liu, Qingle Huang, Sihao Lin, Hongwei Xie, Bing Wang, Xiaojun Chang, Xiaodan Liang. ["Exploring Inter-Channel Correlation for Diversity-Preserved Knowledge Distillation"](https://openaccess.thecvf.com/content/ICCV2021/html/Liu_Exploring_Inter-Channel_Correlation_for_Diversity-Preserved_Knowledge_Distillation_ICCV_2021_paper.html) (ICCV 2021)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/blob/main/configs/sample/ilsvrc2012/dist/) Tao Huang, Shan You, Fei Wang, Chen Qian, Chang Xu. ["Knowledge Distillation from A Stronger Teacher"](https://proceedings.neurips.cc/paper_files/paper/2022/hash/da669dfd3c36c93905a17ddba01eef06-Abstract-Conference.html) (NeurIPS 2022)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/blob/main/configs/sample/ilsvrc2012/srd/) Roy Miles, Krystian Mikolajczyk. ["Understanding the Role of the Projector in Knowledge Distillation"](https://ojs.aaai.org/index.php/AAAI/article/view/28219) (AAAI 2024)
  - [:mag:](https://github.com/yoshitomo-matsubara/torchdistill/blob/main/configs/sample/ilsvrc2012/kd_w_ls/) Shangquan Sun, Wenqi Ren, Jingzhi Li, Rui Wang, Xiaochun Cao. ["Logit Standardization in Knowledge Distillation"](https://arxiv.org/abs/2403.01427) (CVPR 2024)


pkgId: 594f201f4f7a25e16e3d4874d3bcb7d51eadba41316d0ef5b1e240c52915b93e
name: python-torchfa-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for torchfa
url: https://github.com/pengzhendong/Torchaudio-Forced-Aligner
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchfa-0.0.1-1.src.rpm
location_href: Packages/python-torchfa-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  ``` python
  from torchfa import TorchaudioForcedAligner

  aligner = TorchaudioForcedAligner()

  audio = "assets/clean_speech.wav"
  transcript = "关服务高端产品仍处于供不应求的局面"
  cut = aligner.align_audios(audio, transcript)

  cut.trim_to_alignments("word").save_audios("./")
  for alignment in cut.supervisions[0].alignment["word"]:
      print(alignment)
  ```

  ```
  AlignmentItem(symbol='关', start=0.02, duration=0.121, score=0.21)
  AlignmentItem(symbol='服', start=0.241, duration=0.141, score=0.07)
  AlignmentItem(symbol='务', start=0.502, duration=0.101, score=0.49)
  AlignmentItem(symbol='高', start=0.724, duration=0.181, score=0.97)
  AlignmentItem(symbol='端', start=0.945, duration=0.141, score=0.52)
  AlignmentItem(symbol='产', start=1.126, duration=0.201, score=0.81)
  AlignmentItem(symbol='品', start=1.367, duration=0.141, score=0.35)
  AlignmentItem(symbol='仍', start=1.608, duration=0.201, score=0.89)
  AlignmentItem(symbol='处', start=1.869, duration=0.121, score=0.72)
  AlignmentItem(symbol='于', start=2.09, duration=0.06, score=0.96)
  AlignmentItem(symbol='供', start=2.251, duration=0.161, score=0.95)
  AlignmentItem(symbol='不', start=2.452, duration=0.06, score=0.69)
  AlignmentItem(symbol='应', start=2.573, duration=0.161, score=0.63)
  AlignmentItem(symbol='求', start=2.754, duration=0.141, score=0.95)
  AlignmentItem(symbol='的', start=2.935, duration=0.08, score=0.99)
  AlignmentItem(symbol='局', start=3.075, duration=0.101, score=0.98)
  AlignmentItem(symbol='面', start=3.256, duration=0.221, score=0.94)
  ```


pkgId: 4721706de655b104e06f33c24e568edf514bd1beda74adb7f1e5141f391391b8
name: python-torchgeo-help
arch: noarch
version: 0.6.2
epoch: 0
release: 1
summary: Development documents and examples for torchgeo
url: https://github.com/microsoft/torchgeo
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchgeo-0.6.2-1.src.rpm
location_href: Packages/python-torchgeo-help-0.6.2-1.noarch.rpm
checksum_type: sha256
description:
  <img src="https://raw.githubusercontent.com/microsoft/torchgeo/main/logo/logo-color.svg" width="400" alt="TorchGeo logo"/>

  TorchGeo is a [PyTorch](https://pytorch.org/) domain library, similar to [torchvision](https://pytorch.org/vision), providing datasets, samplers, transforms, and pre-trained models specific to geospatial data.

  The goal of this library is to make it simple:

  1. for machine learning experts to work with geospatial data, and
  2. for remote sensing experts to explore machine learning solutions.

  Community:
  [![slack](https://img.shields.io/badge/Slack-join-4A154B?logo=slack)](https://join.slack.com/t/torchgeo/shared_invite/zt-22rse667m-eqtCeNW0yI000Tl4B~2PIw)
  [![osgeo](https://img.shields.io/badge/OSGeo-join-4CB05B?logo=osgeo)](https://www.osgeo.org/community/getting-started-osgeo/)
  [![huggingface](https://img.shields.io/badge/Hugging_Face-join-FFD21E?logo=huggingface)](https://huggingface.co/torchgeo)
  [![pytorch](https://img.shields.io/badge/PyTorch-join-DE3412?logo=pytorch)](https://pytorch.org/ecosystem/join)

  Packaging:
  [![pypi](https://badge.fury.io/py/torchgeo.svg)](https://pypi.org/project/torchgeo/)
  [![conda](https://anaconda.org/conda-forge/torchgeo/badges/version.svg)](https://anaconda.org/conda-forge/torchgeo)
  [![spack](https://img.shields.io/spack/v/py-torchgeo)](https://packages.spack.io/package.html?name=py-torchgeo)

  Testing:
  [![docs](https://readthedocs.org/projects/torchgeo/badge/?version=latest)](https://torchgeo.readthedocs.io/en/stable/)
  [![style](https://github.com/microsoft/torchgeo/actions/workflows/style.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/style.yaml)
  [![tests](https://github.com/microsoft/torchgeo/actions/workflows/tests.yaml/badge.svg)](https://github.com/microsoft/torchgeo/actions/workflows/tests.yaml)
  [![codecov](https://codecov.io/gh/microsoft/torchgeo/branch/main/graph/badge.svg?token=oa3Z3PMVOg)](https://codecov.io/gh/microsoft/torchgeo)



  The recommended way to install TorchGeo is with [pip](https://pip.pypa.io/):

  ```sh
  pip install torchgeo
  ```

  For [conda](https://docs.conda.io/) and [spack](https://spack.io/) installation instructions, see the [documentation](https://torchgeo.readthedocs.io/en/stable/user/installation.html).



  You can find the documentation for TorchGeo on [ReadTheDocs](https://torchgeo.readthedocs.io). This includes API documentation, contributing instructions, and several [tutorials](https://torchgeo.readthedocs.io/en/stable/tutorials/getting_started.html). For more details, check out our [paper](https://arxiv.org/abs/2111.08872), [podcast episode](https://www.youtube.com/watch?v=ET8Hb_HqNJQ), [tutorial](https://www.youtube.com/watch?v=R_FhY8aq708), and [blog post](https://pytorch.org/blog/geospatial-deep-learning-with-torchgeo/).

  <p float="left">
      <a href="https://www.youtube.com/watch?v=ET8Hb_HqNJQ">
          <img src="https://img.youtube.com/vi/ET8Hb_HqNJQ/0.jpg" style="width:49%;">
      </a>
      <a href="https://www.youtube.com/watch?v=R_FhY8aq708">
          <img src="https://img.youtube.com/vi/R_FhY8aq708/0.jpg" style="width:49%;">
      </a>
  </p>



  The following sections give basic examples of what you can do with TorchGeo.

  First we'll import various classes and functions used in the following sections:

  ```python
  from lightning.pytorch import Trainer
  from torch.utils.data import DataLoader

  from torchgeo.datamodules import InriaAerialImageLabelingDataModule
  from torchgeo.datasets import CDL, Landsat7, Landsat8, VHR10, stack_samples
  from torchgeo.samplers import RandomGeoSampler
  from torchgeo.trainers import SemanticSegmentationTask
  ```



  Many remote sensing applications involve working with [_geospatial datasets_](https://torchgeo.readthedocs.io/en/stable/api/datasets.html#geospatial-datasets)—datasets with geographic metadata. These datasets can be challenging to work with due to the sheer variety of data. Geospatial imagery is often multispectral with a different number of spectral bands and spatial resolution for every satellite. In addition, each file may be in a different coordinate reference system (CRS), requiring the data to be reprojected into a matching CRS.

  <img src="https://raw.githubusercontent.com/microsoft/torchgeo/main/images/geodataset.png" alt="Example application in which we combine Landsat and CDL and sample from both"/>

  In this example, we show how easy it is to work with geospatial data and to sample small image patches from a combination of [Landsat](https://www.usgs.gov/landsat-missions) and [Cropland Data Layer (CDL)](https://data.nal.usda.gov/dataset/cropscape-cropland-data-layer) data using TorchGeo. First, we assume that the user has Landsat 7 and 8 imagery downloaded. Since Landsat 8 has more spectral bands than Landsat 7, we'll only use the bands that both satellites have in common. We'll create a single dataset including all images from both Landsat 7 and 8 data by taking the union between these two datasets.

  ```python
  landsat7 = Landsat7(paths="...", bands=["B1", ..., "B7"])
  landsat8 = Landsat8(paths="...", bands=["B2", ..., "B8"])
  landsat = landsat7 | landsat8
  ```

  Next, we take the intersection between this dataset and the CDL dataset. We want to take the intersection instead of the union to ensure that we only sample from regions that have both Landsat and CDL data. Note that we can automatically download and checksum CDL data. Also note that each of these datasets may contain files in different coordinate reference systems (CRS) or resolutions, but TorchGeo automatically ensures that a matching CRS and resolution is used.

  ```python
  cdl = CDL(paths="...", download=True, checksum=True)
  dataset = landsat & cdl
  ```

  This dataset can now be used with a PyTorch data loader. Unlike benchmark datasets, geospatial datasets often include very large images. For example, the CDL dataset consists of a single image covering the entire continental United States. In order to sample from these datasets using geospatial coordinates, TorchGeo defines a number of [_samplers_](https://torchgeo.readthedocs.io/en/stable/api/samplers.html). In this example, we'll use a random sampler that returns 256 x 256 pixel images and 10,000 samples per epoch. We also use a custom collation function to combine each sample dictionary into a mini-batch of samples.

  ```python
  sampler = RandomGeoSampler(dataset, size=256, length=10000)
  dataloader = DataLoader(dataset, batch_size=128, sampler=sampler, collate_fn=stack_samples)
  ```

  This data loader can now be used in your normal training/evaluation pipeline.

  ```python
  for batch in dataloader:
      image = batch["image"]
      mask = batch["mask"]

      
  ```

  Many applications involve intelligently composing datasets based on geospatial metadata like this. For example, users may want to:

  - Combine datasets for multiple image sources and treat them as equivalent (e.g., Landsat 7 and 8)
  - Combine datasets for disparate geospatial locations (e.g., Chesapeake NY and PA)

  These combinations require that all queries are present in at least one dataset, and can be created using a `UnionDataset`. Similarly, users may want to:

  - Combine image and target labels and sample from both simultaneously (e.g., Landsat and CDL)
  - Combine datasets for multiple image sources for multimodal learning or data fusion (e.g., Landsat and Sentinel)

  These combinations require that all queries are present in both datasets, and can be created using an `IntersectionDataset`. TorchGeo automatically composes these datasets for you when you use the intersection (`&`) and union (`|`) operators.



  TorchGeo includes a number of [_benchmark datasets_](https://torchgeo.readthedocs.io/en/stable/api/datasets.html#non-geospatial-datasets)—datasets that include both input images and target labels. This includes datasets for tasks like image classification, regression, semantic segmentation, object detection, instance segmentation, change detection, and more.

  If you've used [torchvision](https://pytorch.org/vision) before, these datasets should seem very familiar. In this example, we'll create a dataset for the Northwestern Polytechnical University (NWPU) very-high-resolution ten-class ([VHR-10](https://github.com/chaozhong2010/VHR-10_dataset_coco)) geospatial object detection dataset. This dataset can be automatically downloaded, checksummed, and extracted, just like with torchvision.

  ```python
  from torch.utils.data import DataLoader

  from torchgeo.datamodules.utils import collate_fn_detection
  from torchgeo.datasets import VHR10


  dataset = VHR10(root="...", download=True, checksum=True)


  dataloader = DataLoader(
      dataset,
      batch_size=128,
      shuffle=True,
      num_workers=4,
      collate_fn=collate_fn_detection,
  )


  for batch in dataloader:
      images = batch["image"]  # list of images
      boxes = batch["boxes"]  # list of boxes
      labels = batch["labels"]  # list of labels
      masks = batch["masks"]  # list of masks

      
  ```

  <img src="https://raw.githubusercontent.com/microsoft/torchgeo/main/images/vhr10.png" alt="Example predictions from a Mask R-CNN model trained on the VHR-10 dataset"/>

  All TorchGeo datasets are compatible with PyTorch data loaders, making them easy to integrate into existing training workflows. The only difference between a benchmark dataset in TorchGeo and a similar dataset in torchvision is that each dataset returns a dictionary with keys for each PyTorch `Tensor`.



  Pre-trained weights have proven to be tremendously beneficial for transfer learning tasks in computer vision. Practitioners usually utilize models pre-trained on the ImageNet dataset, containing RGB images. However, remote sensing data often goes beyond RGB with additional multispectral channels that can vary across sensors. TorchGeo is the first library to support models pre-trained on different multispectral sensors, and adopts torchvision's [multi-weight API](https://pytorch.org/blog/introducing-torchvision-new-multi-weight-support-api/). A summary of currently available weights can be seen in the [docs](https://torchgeo.readthedocs.io/en/stable/api/models.html#pretrained-weights). To create a [timm](https://github.com/huggingface/pytorch-image-models) Resnet-18 model with weights that have been pretrained on Sentinel-2 imagery, you can do the following:

  ```python
  import timm
  from torchgeo.models import ResNet18_Weights

  weights = ResNet18_Weights.SENTINEL2_ALL_MOCO
  model = timm.create_model("resnet18", in_chans=weights.meta["in_chans"], num_classes=10)
  model.load_state_dict(weights.get_state_dict(progress=True), strict=False)
  ```

  These weights can also directly be used in TorchGeo Lightning modules that are shown in the following section via the `weights` argument. For a notebook example, see this [tutorial](https://torchgeo.readthedocs.io/en/stable/tutorials/pretrained_weights.html).



  In order to facilitate direct comparisons between results published in the literature and further reduce the boilerplate code needed to run experiments with datasets in TorchGeo, we have created Lightning [_datamodules_](https://torchgeo.readthedocs.io/en/stable/api/datamodules.html) with well-defined train-val-test splits and [_trainers_](https://torchgeo.readthedocs.io/en/stable/api/trainers.html) for various tasks like classification, regression, and semantic segmentation. These datamodules show how to incorporate augmentations from the kornia library, include preprocessing transforms (with pre-calculated channel statistics), and let users easily experiment with hyperparameters related to the data itself (as opposed to the modeling process). Training a semantic segmentation model on the [Inria Aerial Image Labeling](https://project.inria.fr/aerialimagelabeling/) dataset is as easy as a few imports and four lines of code.

  ```python
  datamodule = InriaAerialImageLabelingDataModule(root="...", batch_size=64, num_workers=6)
  task = SemanticSegmentationTask(
      model="unet",
      backbone="resnet50",
      weights=True,
      in_channels=3,
      num_classes=2,
      loss="ce",
      ignore_index=None,
      lr=0.1,
      patience=6,
  )
  trainer = Trainer(default_root_dir="...")

  trainer.fit(model=task, datamodule=datamodule)
  ```

  <img src="https://raw.githubusercontent.com/microsoft/torchgeo/main/images/inria.png" alt="Building segmentations produced by a U-Net model trained on the Inria Aerial Image Labeling dataset"/>

  TorchGeo also supports command-line interface training using [LightningCLI](https://lightning.ai/docs/pytorch/stable/cli/lightning_cli.html). It can be invoked in two ways:

  ```sh

  torchgeo

  python3 -m torchgeo
  ```

  It supports command-line configuration or YAML/JSON config files. Valid options can be found from the help messages:

  ```sh

  torchgeo --help

  torchgeo fit --help

  torchgeo fit --model.help ClassificationTask

  torchgeo fit --data.help EuroSAT100DataModule
  ```

  Using the following config file:

  ```yaml
  trainer:
    max_epochs: 20
  model:
    class_path: ClassificationTask
    init_args:
      model: 'resnet18'
      in_channels: 13
      num_classes: 10
  data:
    class_path: EuroSAT100DataModule
    init_args:
      batch_size: 8
    dict_kwargs:
      download: true
  ```

  we can see the script in action:

  ```sh

  torchgeo fit --config config.yaml

  torchgeo validate --config config.yaml

  torchgeo test --config config.yaml --ckpt_path=...
  ```

  It can also be imported and used in a Python script if you need to extend it to add new features:

  ```python
  from torchgeo.main import main

  main(["fit", "--config", "config.yaml"])
  ```

  See the [Lightning documentation](https://lightning.ai/docs/pytorch/stable/cli/lightning_cli.html) for more details.



  If you use this software in your work, please cite our [paper](https://dl.acm.org/doi/10.1145/3557915.3560953):

  ```bibtex
  @inproceedings{Stewart_TorchGeo_Deep_Learning_2022,
      address = {Seattle, Washington},
      author = {Stewart, Adam J. and Robinson, Caleb and Corley, Isaac A. and Ortiz, Anthony and Lavista Ferres, Juan M. and Banerjee, Arindam},
      booktitle = {Proceedings of the 30th International Conference on Advances in Geographic Information Systems},
      doi = {10.1145/3557915.3560953},
      month = nov,
      pages = {1--12},
      publisher = {Association for Computing Machinery},
      series = {SIGSPATIAL '22},
      title = {{TorchGeo}: Deep Learning With Geospatial Data},
      url = {https://dl.acm.org/doi/10.1145/3557915.3560953},
      year = {2022}
  }
  ```



  This project welcomes contributions and suggestions. If you would like to submit a pull request, see our [Contribution Guide](https://torchgeo.readthedocs.io/en/stable/user/contributing.html) for more information.

  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

rpm_license:
  MIT License  Copyright (c) Microsoft Corporation.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE


pkgId: ea4c1180d36875b2caacc753e3d9de730e80cfcb45c6daa15055183ff45aa3f2
name: python-torchmanager-help
arch: noarch
version: 1.3.3
epoch: 0
release: 1
summary: Development documents and examples for torchmanager
url: https://github.com/kisonho/torchmanager.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchmanager-1.3.3-1.src.rpm
location_href: Packages/python-torchmanager-help-1.3.3-1.noarch.rpm
checksum_type: sha256
description:
  ![](res/torchmanager.png)

  <div style="text-align: center;">

  <!-- [![Conda Version](https://img.shields.io/conda/vn/conda-forge/torchmanager.svg)](https://anaconda.org/conda-forge/torchmanager) -->
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10381715.svg)](https://doi.org/10.5281/zenodo.10381715)

  </div>

  To use this framework, simply initialize a `Manager` object. The `Manager` class provides a generic training/testing loop for PyTorch models. It also provides some useful callbacks to use during training/testing.


  * Python 3.9+
  * PyTorch
  * Packaging
  * tqdm
  * PyYAML (Optional for yaml configs)
  * scipy (Optional for FID metric)
  * tensorboard (Optional for tensorboard recording)


  * PyPi: `pip install torchmanager`
  * Conda: `conda install torchmanager -c conda-forge`


  The `Configs` class is designed to be inherited to define necessary configurations. It also provides a method to get configurations from terminal arguments.

  ```python
  from torchmanager.configs import Configs as _Configs


  class Configs(_Configs):
      epochs: int
      lr: float
      ...

      def get_arguments(parser: Union[argparse.ArgumentParser, argparse._ArgumentGroup] = argparse.ArgumentParser()) -> Union[argparse.ArgumentParser, argparse._ArgumentGroup]:
          '''Add arguments to argument parser'''
          ...

      def show_settings(self) -> None:
          ...


  configs = Configs.from_arguments()
  ```


  The `data.Dataset` class is designed to be inherited to define a dataset. It is a combination of `torch.utils.data.Dataset` and `torch.utils.data.DataLoader` with easier usage.

  ```python
  from torchmanager.data import Dataset


  class CustomDataset(Dataset):
      def __init__(self, ...):
          ...

      @property
      def unbatched_len(self) -> int:
          ...

      def __getitem__(self, index: int) -> Tuple[torch.Tensor, torch.Tensor]:
          ...


  training_dataset = CustomDataset(...)
  val_dataset = CustomDataset(...)
  testing_dataset = CustomDataset(...)
  ```


  The `Manager` class is the core of the framework. It provides a generic training/testing loop for PyTorch models. The `Manager` class is designed to be inherited to manage the training/testing algorithm. There are also some useful callbacks to use during training/testing.

  1. Initialize the manager with target model, optimizer, loss function, and metrics:
  ```python
  import torch, torchmanager


  class PytorchModel(torch.nn.Module):
      ...


  model = PytorchModel(...)
  optimizer = torch.optim.SGD(model.parameters(), lr=configs.lr)
  loss_fn = torchmanager.losses.CrossEntropy()
  metrics = {'accuracy': torchmanager.metrics.SparseCategoricalAccuracy()}


  manager = torchmanager.Manager(model, optimizer, loss_fn=loss_fn, metrics=metrics)
  ```

  - Multiple losses can be used by passing a dictionary to `loss_fn`:
  ```python
  loss_fn = {
      'loss1': torchmanager.losses.CrossEntropy(),
      'loss2': torchmanager.losses.Dice(),
      ...
  }
  ```

  2. Train the model with `fit`` method:
  ```python
  show_verbose: bool = ... # show progress bar information during training/testing
  manager.fit(training_dataset, epochs=configs.epochs, val_dataset=val_dataset, show_verbose=show_verbose)
  ```

  - There are also some other callbacks to use:
  ```python
  tensorboard_callback = torchmanager.callbacks.TensorBoard('logs') # tensorboard dependency required
  last_ckpt_callback = torchmanager.callbacks.LastCheckpoint(manager, 'last.model')
  model = manager.fit(..., callbacks_list=[tensorboard_callback, last_ckpt_callback])
  ```

  3. Test the model with test method:
  ```python
  manager.test(testing_dataset, show_verbose=show_verbose)
  ```

  4. Save the final trained PyTorch model:
  ```python
  torch.save(model, "model.pth") # The saved PyTorch model can be loaded individually without using torchmanager
  ```


  Torchmanager automatically detects available devices to use during training/testing. GPU/MPS will be used in first priority if available. To specify other device to use, simply pass the device to the `fit` method for training and `test` method for testing:

  1. Multi-GPU training/testing:
  ```python

  model = manager.fit(..., use_multi_gpus=True)


  manager.test(..., use_multi_gpus=True)
  ```

  2. Use only specified GPUs for training/testing:
  ```python

  gpus: Union[list[torch.device], torch.device] = ... # Notice: device id must be specified


  model = manager.fit(..., use_multi_gpus=True, devices=gpus)


  manager.test(..., use_multi_gpus=True, devices=gpus)
  ```


  The `Manager` class is designed to be inherited to manage the training/testing algorithm. To customize the training/testing algorithm, simply inherit the `Manager` class and override the `train_step` and `test_step` methods.
  ```python
  class CustomManager(Manager):
      ...

      def train_step(x_train: torch.Tensor, y_train: torch.Tensor) -> Dict[str, float]:
          ...

      def test_step(x_test: torch.Tensor, y_test: torch.Tensor) -> Dict[str, float]:
          ...
  ```


  The `Experiment` class is designed to be used as a single callback to save experiment information. It is a combination of `torchmanager.callbacks.TensorBoard`, `torchmanager.callbacks.LastCheckpoint`, and `torchmanager.callbacks.BestCheckpoint` with easier usage.
  ```python
  ...

  exp_callback = torchmanager.callbacks.Experiment('test.exp', manager) # tensorboard dependency required
  model = manager.fit(..., callbacks_list=[exp_callback])
  ```

  The information, including full training logs and checkpoints, will be saved in the following structure:
  ```
  experiments
  └── <experiment name>.exp
      ├── checkpoints
      │   ├── best-<metric name>.model
      │   └── last.model
      └── data
      │   └── <TensorBoard data file>
      ├── <experiment name>.cfg
      └── <experiment name>.log
  ```


  ```bibtex
  @software{he_2023_10381715,
    author       = {He, Qisheng and
                    Dong, Ming},
    title        = {{TorchManager: A generic deep learning
                     training/testing framework for PyTorch}},
    month        = dec,
    year         = 2023,
    publisher    = {Zenodo},
    version      = 1,
    doi          = {10.5281/zenodo.10381715},
    url          = {https://doi.org/10.5281/zenodo.10381715}
  }
  ```


  * [MAG-MS/MAGNET](https://github.com/kisonho/magnet) - Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation
  * [tlt](https://github.com/kisonho/tlt) - Transferring Lottery Tickets in Computer Vision Models: a Dynamic Pruning Approach


pkgId: f5754e887b8dd6fed53006de4b9af811e1c1af78dd6712d98bc583713973391a
name: python-torchood-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for torchood
url: https://pypi.org/project/torchood/
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchood-0.0.1-1.src.rpm
location_href: Packages/python-torchood-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  ```bash
  pip install torchood
  ```
  ```python
  import torchood
  class UserDefineModel(nn.Module):
  classifier = UserDefineModel(...)
  classifier = torchood.EvidenceNeuralNetwork(classifier)
  ```

  ```python
  for data, label in train_loader:
      
      
      _, evidence, _ = classifier(data)
      loss = classifier.criterion(evidence, label)
      optimizer.zero_grad()
      loss.backward()
      optimizer.step()
  ```

  ```python
  prob, uncertainty = classifier.predict(inputs)
  ```
  ![](./images/robot.png)


pkgId: 1fc6d45b242e50c7c838c01d46f5c96ccc09467efae8e0a2688efea9aba26c02
name: python-torchserve-nightly
arch: noarch
version: 2024.12.19
epoch: 0
release: 1
summary: TorchServe is a tool for serving neural net models for inference
url: https://github.com/pytorch/serve.git
rpm_license: Apache License Version 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchserve-nightly-2024.12.19-1.src.rpm
location_href: Packages/python-torchserve-nightly-2024.12.19-1.noarch.rpm
checksum_type: sha256
description:
  TorchServe is a flexible and easy to use tool for
  serving `PyTorch <http://pytorch.org/>`__ models in production.
  Use the TorchServe CLI, or the pre-configured Docker images, to start a
  service that sets up HTTP endpoints to handle model inference requests.


pkgId: e0fe698d9376cbc0445e51b0cd392f60e2934a6db23957fc4566df8a99d90e43
name: python-torchsurv-help
arch: noarch
version: 0.1.4
epoch: 0
release: 1
summary: Development documents and examples for torchsurv
url: https://github.com/Novartis/torchsurv
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torchsurv-0.1.4-1.src.rpm
location_href: Packages/python-torchsurv-help-0.1.4-1.noarch.rpm
checksum_type: sha256
description:
  <p align="center">
      <!-- <img src="https://github.com/Novartis/torchsurv/blob/main/docs/source/logo_firecamp.png" width="300"> -->
      <img src="./docs/source/logo_firecamp.png" width="300">

  </p>



  [![Python](https://img.shields.io/pypi/pyversions/torchsurv?label=Python)](https://pypi.org/project/torchsurv/)
  [![PyPI - Version](https://img.shields.io/pypi/v/torchsurv?color=green&label=PyPI)](https://pypi.org/project/torchsurv/)
  [![Conda](https://img.shields.io/conda/v/conda-forge/torchsurv?label=Conda&color=green)](https://anaconda.org/conda-forge/torchsurv)
  [![PyPI Downloads](https://img.shields.io/pypi/dm/torchsurv.svg?label=PyPI%20downloads)](
  https://pypi.org/project/torchsurv/)
  [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/torchsurv.svg?label=Conda%20downloads)](
  https://anaconda.org/conda-forge/torchsurv)

  ![CodeQC](https://github.com/Novartis/torchsurv/actions/workflows/codeqc.yml/badge.svg?branch=main)
  ![Docs](https://github.com/Novartis/torchsurv/actions/workflows/docs.yml/badge.svg?branch=main)
  [![arXiv](https://img.shields.io/badge/arXiv-2404.10761-f9f107.svg?color=green)](https://arxiv.org/abs/2404.10761)
  [![status](https://joss.theoj.org/papers/02d7496da2b9cc34f9a6e04cabf2298d/status.svg)](https://joss.theoj.org/papers/02d7496da2b9cc34f9a6e04cabf2298d)
  [![License](https://img.shields.io/badge/License-MIT-black)](https://opensource.org/licenses/MIT)
  [![Documentation](https://img.shields.io/badge/GithubPage-Sphinx-blue)](https://opensource.nibr.com/torchsurv/)


  `TorchSurv` is a Python package that serves as a companion tool to perform deep survival modeling within the `PyTorch` environment. Unlike existing libraries that impose specific parametric forms on users, `TorchSurv` enables the use of custom `PyTorch`-based deep survival models.  With its lightweight design, minimal input requirements, full `PyTorch` backend, and freedom from restrictive survival model parameterizations, `TorchSurv` facilitates efficient survival model implementation, particularly beneficial for high-dimensional input data scenarios.

  If you find this repository useful, please consider giving a star! ⭐

  This package was developed by **Novartis** and the **US Food and Drug Administration** as part of a **research collaboration** agreement on radiogenomics.



  Our idea is to **keep things simple**. You are free to use any model architecture you want! Our code has 100% PyTorch backend and behaves like any other functions (losses or metrics) you may be familiar with.

  Our functions are designed to support you, not to make you jump through hoops. Here's a pseudo code illustrating how easy is it to use `TorchSurv` to fit and evaluate a Cox proportional hazards model:

  ```python
  from torchsurv.loss import cox
  from torchsurv.metrics.cindex import ConcordanceIndex


  for data in dataloader:
      x, event, time = data
      estimate = model(x)  # shape = torch.Size([64, 1]), if batch size is 64
      loss = cox.neg_partial_log_likelihood(estimate, event, time)
      loss.backward()  # native torch backend


  cindex = ConcordanceIndex()
  cindex(estimate, event, time)


  cindex.confidence_interval()


  cindex.p_value(method="noether", alternative="two_sided")


  cindex.compare(cindexB)
  ```



  First, install the package using either [PyPI]([https://pypi.org/](https://pypi.org/project/torchsurv/)) or [Conda]([https://anaconda.org/anaconda/conda](https://anaconda.org/conda-forge/torchsurv))

  - Using conda (**recommended**)
  ```bash
  conda install conda-forge::torchsurv
  ```
  - Using PyPI
  ```bash
  pip install torchsurv
  ```

  - Using for local installation (`latest version`)

  ```bash
  git clone <repo>
  cd <repo>
  pip install -e .
  ```

  Additionally, to build the documentation (`notebooks`, `sphinx`) and for package development (`tests`), please see [the development notes](https://opensource.nibr.com/torchsurv/devnotes.html) and
  [dev/environment.yml](dev/environment.yml). This step is **not required** to use `TorchSurv` in your projects but only for optional features.



  We recommend starting with the [introductory guide](https://opensource.nibr.com/torchsurv/notebooks/introduction.html), where you'll find an overview of the package's functionalities.



  We simulate a random batch of 64 subjects. Each subject is associated with a binary event status (= `True` if event occured), a time-to-event or censoring and 16 covariates.

  ```python
  >>> import torch
  >>> _ = torch.manual_seed(52)
  >>> n = 64
  >>> x = torch.randn((n, 16))
  >>> event = torch.randint(low=0, high=2, size=(n,)).bool()
  >>> time = torch.randint(low=1, high=100, size=(n,)).float()
  ```



  The user is expected to have defined a model that outputs the estimated *log relative hazard* for each subject. For illustrative purposes, we define a simple linear model that generates a linear combination of the covariates.

  ```python
  >>> from torch import nn
  >>> model_cox = nn.Sequential(nn.Linear(16, 1))
  >>> log_hz = model_cox(x)
  >>> print(log_hz.shape)
  torch.Size([64, 1])
  ```

  Given the estimated log relative hazard and the survival data, we calculate the current loss for the batch with:

  ```python
  >>> from torchsurv.loss.cox import neg_partial_log_likelihood
  >>> loss = neg_partial_log_likelihood(log_hz, event, time)
  >>> print(loss)
  tensor(4.1723, grad_fn=<DivBackward0>)
  ```

  We obtain the concordance index for this batch with:

  ```python
  >>> from torchsurv.metrics.cindex import ConcordanceIndex
  >>> with torch.no_grad(): log_hz = model_cox(x)
  >>> cindex = ConcordanceIndex()
  >>> print(cindex(log_hz, event, time))
  tensor(0.4872)
  ```

  We obtain the Area Under the Receiver Operating Characteristic Curve (AUC) at a new time t = 50 for this batch with:

  ```python
  >>> from torchsurv.metrics.auc import Auc
  >>> new_time = torch.tensor(50.)
  >>> auc = Auc()
  >>> print(auc(log_hz, event, time, new_time=50))
  tensor([0.4737])
  ```



  The user is expected to have defined a model that outputs for each subject the estimated *log scale* and optionally the *log shape* of the Weibull distribution that the event density follows. In case the model has a single output, `TorchSurv` assume that the shape is equal to 1, resulting in the event density to be an exponential distribution solely parametrized by the scale.

  For illustrative purposes, we define a simple linear model that estimate two linear combinations of the covariates (log scale and log shape parameters).

  ```python
  >>> from torch import nn
  >>> model_weibull = nn.Sequential(nn.Linear(16, 2))
  >>> log_params = model_weibull(x)
  >>> print(log_params.shape)
  torch.Size([64, 2])
  ```

  Given the estimated log scale and log shape and the survival data, we calculate the current loss for the batch with:

  ```python
  >>> from torchsurv.loss.weibull import neg_log_likelihood
  >>> loss = neg_log_likelihood(log_params, event, time)
  >>> print(loss)
  tensor(82931.5078, grad_fn=<DivBackward0>)
  ```

  To evaluate the predictive performance of the model, we calculate subject-specific log hazard and survival function evaluated at all times with:

  ```python
  >>> from torchsurv.loss.weibull import log_hazard
  >>> from torchsurv.loss.weibull import survival_function
  >>> with torch.no_grad(): log_params = model_weibull(x)
  >>> log_hz = log_hazard(log_params, time)
  >>> print(log_hz.shape)
  torch.Size([64, 64])
  >>> surv = survival_function(log_params, time)
  >>> print(surv.shape)
  torch.Size([64, 64])
  ```

  We obtain the concordance index for this batch with:

  ```python
  >>> from torchsurv.metrics.cindex import ConcordanceIndex
  >>> cindex = ConcordanceIndex()
  >>> print(cindex(log_hz, event, time))
  tensor(0.4062)
  ```

  We obtain the AUC at a new time t = 50 for this batch with:

  ```python
  >>> from torchsurv.metrics.auc import Auc
  >>> new_time = torch.tensor(50.)
  >>> log_hz_t = log_hazard(log_params, time=new_time)
  >>> auc = Auc()
  >>> print(auc(log_hz_t, event, time, new_time=new_time))
  tensor([0.3509])
  ```

  We obtain the integrated brier-score with:

  ```python
  >>> from torchsurv.metrics.brier_score import BrierScore
  >>> brier_score = BrierScore()
  >>> bs = brier_score(surv, event, time)
  >>> print(brier_score.integral())
  tensor(0.4447)
  ```



  The table below compares the functionalities of `TorchSurv` with those of
  [auton-survival](https://proceedings.mlr.press/v182/nagpal22a.html),
  [pycox](http://jmlr.org/papers/v20/18-424.html),
  [torchlife](https://sachinruk.github.io/torchlife//index.html),
  [scikit-survival](https://jmlr.org/papers/v21/20-729.html),
  [lifelines](https://joss.theoj.org/papers/10.21105/joss.01317), and
  [deepsurv](https://bmcmedresmethodol.biomedcentral.com/articles/10.1186/s12874-018-0482-1).
  While several libraries offer survival modelling functionalities, no existing library provides the flexibility to use a custom PyTorch-based neural networks to define the survival model parameters.

  The outputs of both the log-likelihood functions and the evaluation metrics functions have **undergone thorough comparison with benchmarks generated** using `Python` and `R` packages. The comparisons (at time of publication) are summarised in the [Related packages summary](https://opensource.nibr.com/torchsurv/benchmarks.html).

  ![Survival analysis libraries in Python](docs/source/table_python_benchmark.png)
  ![Survival analysis libraries in Python](docs/source/table_python_benchmark_legend.png)

  Survival analysis libraries in R. For obtaining the evaluation metrics, packages `survival`, `riskRegression`, `SurvMetrics` and `pec` require the fitted model object as input (a specific object format) and `RisksetROC` imposes a smoothing method. Packages `timeROC`, `riskRegression` and pec force the user to choose a form for subject-specific
  weights (e.g., inverse probability of censoring weighting (IPCW)). Packages `survcomp` and `SurvivalROC` do not implement the general AUC but the censoring-adjusted AUC estimator proposed by Heagerty et al. (2000).

  ![Survival analysis libraries in R](docs/source/table_r_benchmark.png)



  We value contributions from the community to enhance and improve this project. If you'd like to contribute, please consider the following:

  1. Create Issues: If you encounter bugs, have feature requests, or want to suggest improvements, please create an [issue](https://github.com/Novartis/torchsurv/issues) in the GitHub repository. Make sure to provide detailed information about the problem, including code for reproducibility, or enhancement you're proposing.

  2. Fork and Pull Requests: If you're willing to address an existing issue or contribute a new feature, fork the repository, create a new branch, make your changes, and then submit a pull request. Please ensure your code follows our coding conventions and include tests for any new functionality.

  By contributing to this project, you agree to license your contributions under the same license as this project.



  * [Thibaud Coroller](mailto:thibaud.coroller@novartis.com?subject=TorchSurv) (**Novartis**): `(creator, maintainer)`
  * [Mélodie Monod](mailto:monod.melodie@gmail.com?subject=TorchSurv) (**Imperial College London**): `(creator, maintainer)`
  * [Peter Krusche](mailto:peter.krusche@novartis.com?subject=TorchSurv) (**Novartis**): `(author, maintainer)`
  * [Qian Cao](mailto:qian.cao@fda.hhs.gov?subject=TorchSurv) (**FDA**): `(author, maintainer)`

  If you have any questions, suggestions, or feedback, feel free to reach out the developement team [us](https://opensource.nibr.com/torchsurv/AUTHORS.html).



  If you use this project in academic work or publications, we appreciate citing it using the following BibTeX entry:

  ```
  @misc{monod2024torchsurv,
        title={TorchSurv: A Lightweight Package for Deep Survival Analysis},
        author={M{\'{e}}lodie Monod and Peter Krusche and Qian Cao and Berkman Sahiner and Nicholas Petrick and David Ohlssen and Thibaud Coroller},
        year={2024},
        eprint={2404.10761},
        archivePrefix={arXiv},
        primaryClass={cs.LG},
        doi={https://doi.org/10.48550/arXiv.2404.10761}
  }
  ```

rpm_license:
  The MIT License (MIT)  Copyright (c) 2023 Novartis Pharmaceuticals Corporation  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 708a60c848fea8e0bd3a597fc64efcfc7200adf58ef541e2b234c46ec4f026d6
name: python-torizon-templates-utils-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for torizon-templates-utils
url: https://github.com/torizon/vscode-torizon-templates
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-torizon-templates-utils-0.0.1-1.src.rpm
location_href: Packages/python-torizon-templates-utils-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  This package contains a set of utilities to help the scripts that generate the Torizon OS applications and containers.

  If you want to know more about check [Toradex developer website](https://developer.toradex.com/torizon/application-development/ide-extension/).


pkgId: 7c4f76858b516a61afb645ee21f439f6048e6b226bc1c45f1ceb07c21a534fc8
name: python-tox-uv-help
arch: noarch
version: 1.16.2
epoch: 0
release: 1
summary: Development documents and examples for tox-uv
url: https://github.com/tox-dev/tox-uv
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tox-uv-1.16.2-1.src.rpm
location_href: Packages/python-tox-uv-help-1.16.2-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI version](https://badge.fury.io/py/tox-uv.svg)](https://badge.fury.io/py/tox-uv)
  [![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/tox-uv.svg)](https://pypi.python.org/pypi/tox-uv/)
  [![check](https://github.com/tox-dev/tox-uv/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/tox-uv/actions/workflows/check.yaml)
  [![Downloads](https://static.pepy.tech/badge/tox-uv/month)](https://pepy.tech/project/tox-uv)

  **tox-uv** is a `tox` plugin, which replaces `virtualenv` and pip with `uv` in your `tox` environments. Note that you
  will get both the benefits (performance) or downsides (bugs) of `uv`.

  <!--ts-->

  - [How to use](#how-to-use)
  - [tox environment types provided](#tox-environment-types-provided)
  - [uv.lock support](#uvlock-support)
    - [extras](#extras)
    - [with_dev](#with_dev)
    - [External package support](#external-package-support)
  - [Environment creation](#environment-creation)
    - [uv_seed](#uv_seed)
    - [uv_python_preference](#uv_python_preference)
  - [Package installation](#package-installation)
    - [uv_resolution](#uv_resolution)
    <!--te-->



  Install `tox-uv` into the environment of your tox, and it will replace `virtualenv` and `pip` for all runs:

  ```bash
  uv tool install tox --with tox-uv # use uv to install
  tox --version # validate you are using the installed tox
  tox r -e py312 # will use uv
  tox --runner virtualenv r -e py312 # will use virtualenv+pip
  ```



  This package will provide the following new tox environments:

  - `uv-venv-runner` is the ID for the tox environments [runner](https://tox.wiki/en/4.12.1/config.html#runner) for
    environments not using a lock file.
  - `uv-venv-lock-runner` is the ID for the tox environments [runner](https://tox.wiki/en/4.12.1/config.html#runner) for
    environments using `uv.lock` (note we can’t detect the presence of the `uv.lock` file to enable this because that
    would break environments not using the lock file - such as your linter).
  - `uv-venv-pep-517` is the ID for the PEP-517 packaging environment.
  - `uv-venv-cmd-builder` is the ID for the external cmd builder.



  If you want for a tox environment to use `uv sync` with a `uv.lock` file you need to change for that tox environment the
  `runner` to `uv-venv-lock-runner`. Furthermore, should in such environments you use the `extras` config to instruct `uv`
  to install the specified extras, for example:

  ```ini

  [testenv:fix]
  description = run code formatter and linter (auto-fix)
  skip_install = true
  deps =
      pre-commit-uv>=4.1.1
  commands =
      pre-commit run --all-files --show-diff-on-failure

  [testenv:type]
  runner = uv-venv-lock-runner
  description = run type checker via mypy
  commands =
      mypy {posargs:src}

  [testenv:dev]
  runner = uv-venv-lock-runner
  description = dev environment
  extras =
      dev
      test
      type
  commands =
      uv pip tree
  ```

  In this example:

  - `fix` will use the `uv-venv-runner` and use `uv pip install` to install dependencies to the environment.
  - `type` will use the `uv-venv-lock-runner` and use `uv sync` to install dependencies to the environment without any
    extra group.
  - `dev` will use the `uv-venv-lock-runner` and use `uv sync` to install dependencies to the environment with the `dev`,
    `test` and `type` extra groups.

  Note that when using `uv-venv-lock-runner`, _all_ dependencies will come from the lock file, controlled by `extras`.
  Therefore, options like `deps` are ignored (and all others
  [enumerated here](https://tox.wiki/en/stable/config.html#python-run) as Python run flags).



  A list of string that selects, which extra groups you want to install with `uv sync`. By default, it is empty.



  A boolean flag to toggle installation of the `uv` development dependencies. By default, it is false.



  Specify [PEP 735 – Dependency Groups](https://peps.python.org/pep-0735/) to install.



  A list of strings, containing additional flags to pass to uv sync (useful because some flags are not configurable via
  environment variables). For example, if you want to install the package in non editable mode and keep extra packages
  installed into the environment you can do:

  ```ini
  uv_sync_flags = --no-editable, --inexact
  ```



  Should tox be invoked with the [`--installpkg`](https://tox.wiki/en/stable/cli_interface.html#tox-run---installpkg) flag
  (the argument **must** be either a wheel or source distribution) the sync operation will run with `--no-install-project`
  and `uv pip install` will be used afterward to install the provided package.



  We use `uv venv` to create virtual environments. This process can be configured with the following options:



  This flag, set on a tox environment level, controls if the created virtual environment injects `pip`, `setuptools` and
  `wheel` into the created virtual environment or not. By default, it is off. You will need to set this if you have a
  project that uses the old legacy-editable mode, or your project doesn’t support the `pyproject.toml` powered isolated
  build model.



  This flag, set on a tox environment level, controls how `uv` select the Python interpreter.

  By default, `uv` will attempt to use Python versions found on the system and only download managed interpreters when
  necessary. However, It is possible to adjust `uv`'s Python version selection preference with the
  [python-preference](https://docs.astral.sh/uv/concepts/python-versions/#adjusting-python-version-preferences) option.



  We use `uv pip` to install packages into the virtual environment. The behavior of this can be configured via the
  following options:



  This flag, set on a tox environment level, informs `uv` of the desired [resolution strategy]:

  - `highest` - (default) selects the highest version of a package satisfying the constraints.
  - `lowest` - install the **lowest** compatible versions for all dependencies, both **direct** and **transitive**.
  - `lowest-direct` - opt for the **lowest** compatible versions for all **direct** dependencies, while using the
    **latest** compatible versions for all **transitive** dependencies.

  This is an `uv` specific feature that may be used as an alternative to frozen constraints for test environments if the
  intention is to validate the lower bounds of your dependencies during test executions.

  [resolution strategy]: https://github.com/astral-sh/uv/blob/0.1.20/README.md#resolution-strategy


pkgId: ec6afe7e921b3090831e618ce4a4f5582fd01bfd2e9a636c1bfbdf39584bf863
name: python-tp-but-ge2i-help
arch: noarch
version: 2025.0.3
epoch: 0
release: 1
summary: Development documents and examples for tp-but-ge2i
url: https://test.pypi.org/project/tp-but-ge2i/
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tp-but-ge2i-2025.0.3-1.src.rpm
location_href: Packages/python-tp-but-ge2i-help-2025.0.3-1.noarch.rpm
checksum_type: sha256
description:
  Ce package contient le sujet, les données et le notebook nécessaires pour le TP pandapower de 3ème année du BUT GE2I.


pkgId: abc9a2529260cc4cd979d511cddf78471eda456d368f8a146446774a89755661
name: python-tp53-help
arch: noarch
version: 0.3.0
epoch: 0
release: 1
summary: Development documents and examples for tp53
url: https://github.com/clintval/tp53
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tp53-0.3.0-1.src.rpm
location_href: Packages/python-tp53-help-0.3.0-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPi Release](https://badge.fury.io/py/tp53.svg)](https://badge.fury.io/py/tp53)
  [![CI](https://github.com/clintval/tp53/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/clintval/tp53/actions/workflows/tests.yml?query=branch%3Amain)
  [![Python Versions](https://img.shields.io/badge/python-3.11_|_3.12_|_3.13-blue)](https://github.com/clintval/typeline)
  [![basedpyright](https://img.shields.io/badge/basedpyright-checked-42b983)](https://docs.basedpyright.com/latest/)
  [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://docs.astral.sh/ruff/)

  Tools for programmatically annotating VCFs with the Seshat TP53 database.



  The package can be installed with `pip`:

  ```console
  pip install tp53
  ```



  Upload a VCF to the [Seshat TP53 annotation server](http://vps338341.ovh.net/) using a headless browser.

  ```bash
  ❯ python -m tp53.seshat.upload_vcf \
      --input "input.vcf" \
      --email "example@gmail.com"
  ```
  ```console
  INFO:tp53.seshat.upload_vcf:Uploading 0 %...
  INFO:tp53.seshat.upload_vcf:Uploading 53%...
  INFO:tp53.seshat.upload_vcf:Uploading 53%...
  INFO:tp53.seshat.upload_vcf:Uploading 60%...
  INFO:tp53.seshat.upload_vcf:Uploading 60%...
  INFO:tp53.seshat.upload_vcf:Uploading 66%...
  INFO:tp53.seshat.upload_vcf:Uploading 66%...
  INFO:tp53.seshat.upload_vcf:Uploading 80%...
  INFO:tp53.seshat.upload_vcf:Uploading 80%...
  INFO:tp53.seshat.upload_vcf:Upload complete!
  ```

  This tool is used to programmatically configure and upload batch variants in VCF format to the Seshat annotation server.
  The tool works by building a headless Chrome browser instance and then interacting with the Seshat website directly through simulated key presses and mouse clicks.
  Unfortunately, Seshat does not provide a native programmatic API and one could not be reverse engineered.
  Seshat also utilizes custom JavaScript in their form processing, so a lightweight approach of simply interacting with the HTML form elements was also not possible.



  Seshat will not let the user know why a VCF fails to annotate, but it has been observed that Seshat can fail to parse some of [VarDictJava](https://github.com/AstraZeneca-NGS/VarDictJava)'s structural variants (SVs) as valid variant records.
  One solution that has worked in the past is to remove SVs.
  The following command will exclude all variants with a non-empty SVTYPE INFO key:

  ```bash
  ❯ bcftools view in.vcf --exclude 'SVTYPE!="."' > out.noSV.vcf
  ```



  There are no terms and conditions posted on the Seshat annotation server's website, and there is no server-side `robots.txt` rule set.
  In lieu of usage terms, we strongly encourage all users of this script to respect the Seshat resource by adhering to the following best practice:

  - **Minimize Load**: Limit the rate of requests to the server
  - **Minimize Connections**: Limit the number of concurrent requests

  If you need to batch process dozens, or hundreds, of VCF callsets, you may consider improving this underlying Python script to randomize the user agent and IP address of your headless browser session to prevent from being labelled as a bot.



  This script relies on Google Chrome:

  ```console
  ❯ brew install --cask google-chrome
  ```

  Distributions of MacOS may require you to authenticate the Chrome driver ([link](https://stackoverflow.com/a/60362134)).



  See the [contributing guide](./CONTRIBUTING.md) for more information.



  - [Soussi, Thierry, et al. “Recommendations for Analyzing and Reporting TP53 Gene Variants in the High-Throughput Sequencing Era.” Human Mutation, vol. 35, no. 6, 2014, pp. 766–778., doi:10.1002/humu.22561](https://doi.org/10.1002/humu.22561)


pkgId: 79ef1e45eee0f5d43910ecfae3bd8edccf75aa962a061f204c3515e4fdb271bd
name: python-trackinglog-help
arch: noarch
version: 0.1.6.1
epoch: 0
release: 1
summary: Development documents and examples for trackinglog
url: https://github.com/shiyi-yinghao/trackinglog
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trackinglog-0.1.6.1-1.src.rpm
location_href: Packages/python-trackinglog-help-0.1.6.1-1.noarch.rpm
checksum_type: sha256
description:
  TrackLogging is a logging package for tracing function calls with error handling and email notification.



  You can install TrackingLog using pip:

  ```bash
  pip install trackinglog

  ```


  https://github.com/shiyi-yinghao/trackinglog


  https://pypi.org/project/trackinglog/



  0.1.0 Package Draft created

  0.1.1 Decorator get_log and directly object creator get_logger created. Added setup check decorator. Added p-functions(print and log).

  0.1.2 Added error handling. Added verbose option for decorator. Added called function name.

  0.1.3 Added profiler for both function level and line level. Updated error handling logic: reset verbose to False, but it will now raise error instead. Added class name to log. Added dependency pakages. Added resource performance tracking.

  0.1.4 Formatted the logging message with indentation. Add print to log feature. Refactor the get_log function.

  0.1.5 Added cache log cleaner.

  0.1.6 Updated Log config to Parameter config. Added inline log usage.



  Add public and private log

  Add Added email notification.

  Add Kafka message notification




  ```python
  import logging
  import trackinglog
  import inspect


  trackinglog.logger.setup(root_task_path='./logs')

  @trackinglog.logger.get_log('my_logger', verbose=1, enable_profiling="line")
  def my_function(log=None):  # Notice how the log parameter is expected
      log.info("This function does something important.")
      print("Function is executing...")
      

  my_function()  # Running the function will log start and end, using the specific logger

  ```


  ```python
  import logging
  import trackinglog
  import inspect

  trackinglog.logger.setup(root_task_path='./logs', log_config={'root_log_path':"./logs", '_cache_log_path':"./logs/cache", 'cache_log_num_limit':10, '_cache_log_day_limit':7},
                                                      email_credential={'username':"PLACEHOLDER", 'password':"PLACEHOLDER",  'root_emails_folder':"./logs/emails"},
                                                      lock_config={"lock_folder_path":"./logs/locks"})

  @trackinglog.logger.get_log('my_logger_cls', verbose=1, enable_profiling="line", print2log=True)
  class testclass:
      def __init__(self, a: int):
          self.a=a
      def p(self):
          self.log.info("class log")
          

      def count(self, n: int):
          for i in range(n):
              print(i)


  t=testclass(2.2)
  t.p()
  t.count(3)
  ```


  ```python
  trackinglog.logger.setup(root_task_path='./logs')

  def my_function():
      log=trackinglog.logger.get_logger('my_logger_func')
      log.info("This function does something important.")
      print("Function is executed")

  my_function()
  ```



  trackinglog.logger.setup(root_log_path='./logs')
  @trackinglog.logger.get_log('my_logger_cls', verbose=1, enable_profiling="function", print2log=True)


pkgId: 535ba327d80abed84988348873666692d79b09c55ab38c3e0b5a2f6c5f520b7f
name: python-tractorun-help
arch: noarch
version: 0.51.0
epoch: 0
release: 1
summary: Development documents and examples for tractorun
url: https://pypi.org/project/tractorun/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tractorun-0.51.0-1.src.rpm
location_href: Packages/python-tractorun-help-0.51.0-1.noarch.rpm
checksum_type: sha256
description:
  ![img.png](docs/_static/img.png)



  `tractorun` is a powerful tool for distributed ML operations on the [Tracto.ai](https://tracto.ai/) platform. It helps manage and run workflows across multiple nodes with minimal changes in the user's code.

  Besides machine learning, tractorun can also run arbitrary [gang operations](https://en.wikipedia.org/wiki/Gang_scheduling) on the Tracto.ai



  * Simple distributed training setup on JAX and PyTorch with minimal code changes
  * Convenient ways to run and configure: CLI, YAML config, and Python SDK
  * Integration with the Tracto.ai platform



  Install tractorun into your python3 environment:

  `pip install --upgrade tractorun`

  Configure the client to work with your cluster:
  ```shell
  mkdir ~/.yt
  cat <<EOF > ~/.yt
  "proxy"={
    "url"="$YT_PROXY";
  };
  "token"="$YT_TOKEN";
  EOF
  ```

  Please put your actual Tracto.ai cluster address to `$YT_PROXY` and your token to `$YT_TOKEN`.



  Run an example script:

  ```
  tractorun \
      --yt-path "//tmp/$USER/tractorun_getting_started" \
      --bind-local './examples/pytorch/lightning_mnist_ddp_script/lightning_mnist_ddp_script.py:/lightning_mnist_ddp_script.py' \
      --bind-local-lib ./tractorun \
      --docker-image cr.ai.nebius.cloud/crnf2coti090683j5ssi/tractorun/examples_runtime:2024-11-20-20-00-05 \
      python3 /lightning_mnist_ddp_script.py
  ```





  `tractorun --help`

  or with yaml config

  `tractorun --run-config-path config.yaml`

  You can find a relevant examples:
  * CLI arguments [example](https://github.com/tractoai/tractorun/tree/main/examples/pytorch/lightning_mnist_ddp_script).
  * YAML config [example](https://github.com/tractoai/tractorun/tree/main/examples/pytorch/lightning_mnist_ddp_script_config).



  SDK is convenient to use from Jupyter notebooks for development purposes.

  You can find a relevant example in [the repository](https://github.com/tractoai/tractorun/tree/main/examples/pytorch/lightning_mnist).

  WARNING: the local environment should be equal to the remote docker image on the TractoAI platform to use SDK.
  * This requirement is met in Jupyter Notebook on the Tracto.ai platform.
  * For local use, it is recommended to run the code locally in the same container as specified in the docker_image parameter in `tractorun`





  1. Wrap all training/inference code to a function.
  2. Initiate environment and Toolbox by `from tractorun.run.prepare_and_get_toolbox`

  An example of adapting the mnist training from the [PyTorch repository](https://github.com/pytorch/examples/blob/cdef4d43fb1a2c6c4349daa5080e4e8731c34569/mnist/mnist_simple/main.py): https://github.com/tractoai/tractorun/tree/main/examples/adoptation/mnist_simple/cli



  1. Wrap all training/inference code to a function with a `toolbox: tractorun.toolbox.Toolbox` parameter.
  2. Run this function by `tractorun.run.run`.

  An example of adapting the mnist training from the [PyTorch repository](https://github.com/pytorch/examples/blob/cdef4d43fb1a2c6c4349daa5080e4e8731c34569/mnist/main.py): https://github.com/tractoai/tractorun/tree/main/examples/adoptation/mnist_simple/sdk





  `tractorun.toolbox.Toolbox` provides extra integrations with the Tracto.ai platform:
  * Preconfigured client by `toolbox.yt_client`
  * Basic checkpoints by `toolbox.checkpoint_manager`
  * Control over the operation description in the UI by `toolbox.description_manager`
  * Access to coordination information by `toolbox.coordinator`



  Backends configure `tractorun` to work with a specific ML framework.

  Tractorun supports multiple backends:
  * [Tractorch](https://github.com/tractoai/tractorun/tree/main/tractorun/backend/tractorch) for PyTorch
    * [examples](https://github.com/tractoai/tractorun/tree/main/examples/pytorch)
  * [Tractorax](https://github.com/tractoai/tractorun/tree/main/tractorun/backend/tractorax) for Jax
    * [examples](https://github.com/tractoai/tractorun/tree/main/examples/jax)
  * [Generic](https://github.com/tractoai/tractorun/tree/main/tractorun/backend/generic)
    * non-specialized backend, can be used as a basis for other backends



  [Options reference](https://github.com/tractoai/tractorun/blob/main/docs/options.md) page provides an overview of all available options for `tractorun`, explaining their purpose and usage. Options can be defined by:
  * CLI parameters
  * yaml config
  * python options




  1. Install [pyenv](https://github.com/pyenv/pyenv)
  2. Create and activate new env `pyenv virtualenv 3.10 tractorun && pyenv activate tractorun`
  3. Install all dependencies: `pip install ."[all]`



  ```shell
  ./run_build generic
  ./run_build tractorch_tests
  ./run_build tractorax_tests
  ./run_build tensorproxy_tests
  ```
  and update images in `./run_tests` and `tests/utils.py`



  ```shell
  ./run_build examples_runtime --push
  ```

  and update the image in `./examples/run_example`



  To run tests on local YT run `pytest`
  ```shell
  ./run_tests all . -s
  ```

  To run tests on remote cluster
  ```shell
  ./run_tests general . -s
  ./run_tests tensorproxy . -s
  ```

  It is possible to provide extra `pytest` options
  ```shell
  ./run_tests generic test_sidecars.py
  ./run_tests generic test_sidecars.py::test_sidecar_run
  ```


  1. Run [Create release](https://github.com/tractoai/tractorun/actions/workflows/release.yaml)
  2. Run [Build and upload to external pypi](https://github.com/tractoai/tractorun/actions/workflows/pypi_external.yaml). Specify the latest tag from [the list](https://github.com/tractoai/tractorun/tags) to upload the latest version.


pkgId: d288de8b037e97453ac43387d140be9666d465c768021b4759c9ddca6d555c96
name: python-tradelocker-help
arch: noarch
version: 0.56.2
epoch: 0
release: 1
summary: Development documents and examples for tradelocker
url: https://pypi.org/project/tradelocker/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tradelocker-0.56.2-1.src.rpm
location_href: Packages/python-tradelocker-help-0.56.2-1.noarch.rpm
checksum_type: sha256
description:
  1. [Getting Started](#getting-started)
  2. [Installation](#installation)
  3. [Usage](#usage)
  4. [Contributing](#contributing)
  5. [License](#license)

  To use this Python wrapper, you'll need the username, password and the id of the server that you use to access TradeLocker.
  If you don't already have access, you need to find a broker that supports TradeLocker and create an account.

  This package requires Python 3.11 or later.
  The easiest way to install this package is using pip:
  ```shell
  pip install tradelocker
  ```

  Here's a simple example on how to use the TradeLocker Python API wrapper.
  The code below initializes a TLAPI object with authentication data.
  It then: fetches price history and latest price, creates an order that converts into a position, waits for 2 seconds, and finally closes the same position.
  ```python
  from tradelocker import TLAPI
  import time, random

  tl = TLAPI(environment = "https://demo.tradelocker.com", username = "user@email.com", password = "YOUR_PASS", server = "SERVER_NAME")
  symbol_name = "BTCUSD" # "RANDOM"
  all_instruments = tl.get_all_instruments()
  if symbol_name == "RANDOM":
  	instrument_id = int(random.choice(all_instruments['tradableInstrumentId']))
  else:
  	instrument_id = tl.get_instrument_id_from_symbol_name(symbol_name)
  price_history = tl.get_price_history(instrument_id, resolution="1D", start_timestamp=0, end_timestamp=0,lookback_period="5D")
  latest_price = tl.get_latest_asking_price(instrument_id)
  order_id = tl.create_order(instrument_id, quantity=0.01, side="buy", type_="market")
  if order_id:
  	print(f"Placed order with id {order_id}, sleeping for 2 seconds.")
  	time.sleep(2)
  	tl.close_position(order_id)
  	print(f"Closed order with id {order_id}.")
  else:
  	print("Failed to place order.")
  ```
  For more detailed examples, see the `examples` directory.

  To contribute to the development of this project, please create an issue, or a pull request.
  Steps to create a pull request:
  1. Clone the project.
  2. Create your feature branch (`git checkout -b feature/YourFeature`).
  3. Commit your changes (`git commit -am 'Add some feature'`).
  4. Push to the branch (`git push origin feature/YourFeature`).
  5. Create a new Merge Request.

  This project is licensed under the terms of the MIT license. See [LICENSE](https://github.com/ivosluganovic/tl/blob/main/LICENSE.txt) for more details.


pkgId: f7ce11d668b76afe862728643fd6d45609b3c4e643b95e172f71ee1010c51373
name: python-tradernet-sdk-help
arch: noarch
version: 1.0.1
epoch: 0
release: 1
summary: Development documents and examples for tradernet-sdk
url: https://tradernet.ru/tradernet-api/python-sdk
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tradernet-sdk-1.0.1-1.src.rpm
location_href: Packages/python-tradernet-sdk-help-1.0.1-1.noarch.rpm
checksum_type: sha256
description:
  Public Python API for TraderNet



  Installing tradernet with pip is straightforward:
  `python -m pip install tradernet-sdk`
  Instead of `python` you can use here and further `pypy3` depending on your preferences.



  Import the client library into your script:
  `from tradernet import TraderNetAPI`
  Initialize it with your credentials:
  `api = TraderNetAPI("public_key", "private_key")`
  or create a config file `tradernet.ini` with the following content:
  ```
  [auth]
  public   = public_key
  private  = private_key
  ```
  and initialize the client with `api = TraderNetAPI.from_config("tradernet.ini")`
  Call any of its public methods, for example:
  `api.user_info()`



  Usage of the trading interface is similar to common API. Import and instantiate `Trading` class:
  ```
  from tradernet import Trading


  order = Trading.from_config("tradernet.ini")
  ```
  Now let's buy 1 share of FRHC.US at the market price:
  ```
  order.buy("FRHC.US")
  ```



  Websocket API can be accessed via another class `TraderNetWSAPI`. It
  implements the asynchronous interface for TraderNet API, and its usage is a bit
  more complicated. First of all, password authentication is required to use it.
  It can be achieved by passing corresponding arguments to the constructor of the `TraderNetCore` class:
  `api = TraderNetCore(login="login", password="password")`
  or by updating the `tradernet.ini` file with `[sid]` section:
  ```
  [sid]
  login    = your_login
  password = your_password
  ```
  and then initializing the `TraderNetCore` instance with `api = TraderNetCore.from_config("tradernet.ini")`.
  Secondly, the `TraderNetWSAPI` class should be used as a context manager within a coroutine as in the example below:
  ```
  from asyncio import run
  from tradernet import TraderNetCore, TraderNetWSAPI


  async def main() -> None:  # coroutine
      api = TraderNetCore.from_config("tradernet.ini")
      async with TraderNetWSAPI(api) as wsapi:  # type: TraderNetWSAPI
          async for quote in wsapi.market_depth("FRHC.US"):
              print(quote)


  if __name__ == "__main__":
      run(main())
  ```



  There are several methods that are still requiring login and password authentication.
  They are located in the module `TraderNetSID`:
  ```
  from tradernet import TraderNetSID


  sid = TraderNetSID(login="login", password="password")
  tariffs = sid.get_tariffs_list()
  print(tariffs)
  ```



  One can import the core class to write their own methods:
  ```
  from tradernet import TraderNetCore


  class MyTNAPI(TraderNetCore):
      pass
  ```
  This allows using sophisticated request methods for TN API like
  `TraderNetCore.authorized_request`.

  One can have several instances of the API serving different purposes:
  ```
  config = TraderNetCore.from_config("tradernet.ini")
  order = Trading.from_instance(config)
  ```
  The instance `config` stores the credentials, and `order` can be used to trade and may be destroyed after trades completed while `config` is still can be used to instantiate other classes.



  The library also has the legacy `PublicApiClient.py` which provides almost
  the same functionality as most of TraderNet users used to:
  ```
  from tradernet import NtApi


  pub_ = "[public Api key]"
  sec_ = "[secret Api key]"
  cmd_ = "getPositionJson"
  res = NtApi(pub_, sec_, NtApi.V2)
  print(res.sendRequest(cmd_))
  ```
  The only difference is that one does not have to decode the content of the
  response as before.



  The notation of options in TraderNet now can easily be deciphered:
  ```
  from tradernet import TraderNetOption


  option = TraderNetOption("+FRHC.16SEP2022.C55")
  print(option)  # FRHC.US @ 55 Call 2022-09-16
  ```
  or the scary old notation:
  ```
  from tradernet import DasOption


  option = DasOption("+FRHC^C7F45.US")
  print(option)  # FRHC.US @ 45 Call 2022-07-15
  ```



  Another feature is to get handy pandas.DataFrame objects with market data:
  ```
  from pandas import DataFrame
  from tradernet import TraderNetSymbol, TraderNetAPI


  api = TraderNetAPI("public_key", "private_key", "login", "passwd")
  symbol = TraderNetSymbol("AAPL.US", api).get_data()
  market_data = DataFrame(
      symbol.candles,
      index=symbol.timestamps,
      columns=["high", "low", "open", "close"]
  )
  print(market_data.head().to_markdown())







  ```



  The package is licensed under permissive MIT License. See the `LICENSE` file in
  the top directory for the full license text.


pkgId: 965dded45e45f1b68b2e955ee90aefa4cba1dd987f2cef387724324db19c0df1
name: python-traffic-help
arch: noarch
version: 2.11.1
epoch: 0
release: 1
summary: Development documents and examples for traffic
url: https://pypi.org/project/traffic/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-traffic-2.11.1-1.src.rpm
location_href: Packages/python-traffic-help-2.11.1-1.noarch.rpm
checksum_type: sha256
description:
  ![A toolbox for processing and analysing air traffic data](./docs/_static/logo/logo_full.png)

  [![Documentation Status](https://github.com/xoolive/traffic/workflows/docs/badge.svg)](https://traffic-viz.github.io/)
  [![tests](https://github.com/xoolive/traffic/actions/workflows/run-tests.yml/badge.svg?branch=master&event=push)](https://github.com/xoolive/traffic/actions/workflows/run-tests.yml)
  [![Code Coverage](https://img.shields.io/codecov/c/github/xoolive/traffic.svg)](https://codecov.io/gh/xoolive/traffic)
  [![Checked with mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy.readthedocs.io/)
  ![License](https://img.shields.io/pypi/l/traffic.svg)
  [![Join the chat at https://gitter.im/xoolive/traffic](https://badges.gitter.im/xoolive/traffic.svg)](https://gitter.im/xoolive/traffic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  ![PyPI version](https://img.shields.io/pypi/v/traffic)
  [![PyPI downloads](https://img.shields.io/pypi/dm/traffic)](https://pypi.org/project/traffic)
  ![Conda version](https://img.shields.io/conda/vn/conda-forge/traffic)
  [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/traffic.svg)](https://anaconda.org/conda-forge/traffic)
  [![JOSS paper](http://joss.theoj.org/papers/10.21105/joss.01518/status.svg)](https://doi.org/10.21105/joss.01518)

  The traffic library helps to work with common sources of air traffic data.

  Its main purpose is to provide data analysis methods commonly applied to trajectories and airspaces. When a specific function is not provided, the access to the underlying structure is direct, through an attribute pointing to a pandas dataframe.

  The library also offers facilities to parse and/or access traffic data from open sources of ADS-B traffic like the [OpenSky Network](https://opensky-network.org/) or Eurocontrol DDR files. It is designed to be easily extendable to other sources of data.

  Static visualization (images) exports are accessible via Matplotlib/Cartopy. More dynamic visualization frameworks are easily accessible in Jupyter environments with [ipyleaflet](http://ipyleaflet.readthedocs.io/) and [altair](http://altair-viz.github.io/); or through exports to other formats, including CesiumJS or Google Earth.



  **Full installation instructions are to be found in the [documentation](https://traffic-viz.github.io/installation.html).**

  - If you are not familiar/comfortable with your Python environment, please install the latest `traffic` release in a new, fresh conda environment.

    ```sh
    conda create -n traffic -c conda-forge python=3.12 traffic
    ```

  - Adjust the Python version you need (>=3.10) and append packages you need for working efficiently, such as Jupyter Lab, xarray, PyTorch or more.
  - Then activate the environment every time you need to use the `traffic` library:

    ```sh
    conda activate traffic
    ```

  **Warning!** Dependency resolution may be tricky, esp. if you use an old conda environment where you overwrote `conda` libraries with `pip` installs. **Please only report installation issues in new, fresh conda environments.**

  If conda fails to resolve an environment in a reasonable time, consider using a [Docker image](https://traffic-viz.github.io/user_guide/docker.html) with a working installation.

  For troubleshooting, refer to the appropriate [documentation section](https://traffic-viz.github.io/troubleshooting/installation.html).



  [![JOSS
  badge](http://joss.theoj.org/papers/10.21105/joss.01518/status.svg)](https://doi.org/10.21105/joss.01518)

  - Like [other researchers before](https://scholar.google.com/scholar?cites=18420568209924139259&scisbd=1), if you find this project useful for your research and use it in an academic work, you may cite it as:

    ```bibtex
    @article{olive2019traffic,
        author={Xavier {Olive}},
        journal={Journal of Open Source Software},
        title={traffic, a toolbox for processing and analysing air traffic data},
        year={2019},
        volume={4},
        pages={1518},
        doi={10.21105/joss.01518},
        issn={2475-9066},
    }
    ```

  - Additionally, you may consider adding a star to the repository. This token of appreciation is often interpreted as positive feedback and improves the visibility of the library.



  [![Documentation Status](https://github.com/xoolive/traffic/workflows/docs/badge.svg)](https://traffic-viz.github.io/)
  [![Join the chat at https://gitter.im/xoolive/traffic](https://badges.gitter.im/xoolive/traffic.svg)](https://gitter.im/xoolive/traffic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

  Documentation available at <https://traffic-viz.github.io/>
  Join the Gitter chat for assistance: https://gitter.im/xoolive/traffic



  [![tests](https://github.com/xoolive/traffic/actions/workflows/run-tests.yml/badge.svg?branch=master&event=push)](https://github.com/xoolive/traffic/actions/workflows/run-tests.yml)
  [![Code Coverage](https://img.shields.io/codecov/c/github/xoolive/traffic.svg)](https://codecov.io/gh/xoolive/traffic)
  [![Codacy Badge](https://img.shields.io/codacy/grade/eea673ed15304f1b93490726295d6de0)](https://www.codacy.com/manual/xoolive/traffic)
  [![Checked with mypy](https://img.shields.io/badge/mypy-checked-blue.svg)](https://mypy.readthedocs.io/)

  Unit and non-regression tests are written in the `tests/` directory. You may run `pytest` from the root directory.

  Tests are checked on [Github Actions](https://github.com/xoolive/traffic/actions/workflows/run-tests.yml) platform upon each commit. Latest status and coverage are displayed with standard badges hereabove.

  In addition to unit tests, code is checked against:

  - linting and formatting with [ruff](https://beta.ruff.rs/docs/);
  - static typing with [mypy](https://mypy.readthedocs.io/)

  [pre-commit](https://pre-commit.com/) hooks are available in the repository.



  Any input, feedback, bug report or contribution is welcome.

  - Should you encounter any [issue](https://github.com/xoolive/traffic/issues/new), you may want to file it in the [issue](https://github.com/xoolive/traffic/issues/new) section of this repository.
  - If you intend to [contribute to traffic](https://traffic-viz.github.io/installation.html#contribute-to-traffic) or file a pull request, the best way to ensure continuous integration does not break is to reproduce an environment with the same exact versions of all dependency libraries. Please follow the [appropriate section](https://traffic-viz.github.io/installation.html#contribute-to-traffic) in the documentation.

    Let us know what you want to do just in case we're already working on an implementation of something similar. This way we can avoid any needless duplication of effort. Also, please don't forget to add tests for any new functions.


pkgId: b14d97a2c969699fd7d6ace618146ba01a7ff620a3dc0efba266dd8382065a50
name: python-trafiklab-sl-help
arch: noarch
version: 1.0.0
epoch: 0
release: 1
summary: Development documents and examples for trafiklab-sl
url: https://pypi.org/project/trafiklab-sl/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trafiklab-sl-1.0.0-1.src.rpm
location_href: Packages/python-trafiklab-sl-help-1.0.0-1.noarch.rpm
checksum_type: sha256
description:
  [![version](https://img.shields.io/pypi/v/trafiklab-sl)](https://pypi.org/project/trafiklab-sl)
  [![python version](https://img.shields.io/pypi/pyversions/trafiklab-sl)](https://github.com/NecroKote/trafiklab-sl)
  [![license](https://img.shields.io/github/license/necrokote/trafiklab-sl)](https://github.com/NecroKote/trafiklab-sl/blob/main/LICENSE.txt)

  A data model for Storstockholms Lokaltrafik (SL) data.

  Also contains an async client for fetching data from the [Trafiklab API](https://www.trafiklab.se/api/).



  Install using `pip install -U trafiklab-sl`



  To install the package for development, clone the repository and run:
  ```shell
  python -m venv .venv
  source .venv/bin/activate
  pip install -e '.[dev,test]'
  ```



  The client is based on the `aiohttp` library and is async. It is used to fetch data from the Trafiklab API.
  The library supports following SL APIs:
  - [SL Deviatons API](https://www.trafiklab.se/api/trafiklab-apis/sl/deviations/)
  - [SL Transport API](https://www.trafiklab.se/api/trafiklab-apis/sl/transport/)
    - "Departures from Site"
    - "Sites"
  - [SL Stop lookup API](https://www.trafiklab.se/api/trafiklab-apis/sl/stop-lookup/)

  More APIs will be added in the future.



  Here is an example of how to use the client to get upcoming train departures at Stockholm Central (site Id 1002).

  ```python
  import asyncio
  import aiohttp

  from tsl.clients.stoplookup import StopLookupClient
  from tsl.clients.transport import TransportClient
  from tsl.models.common import TransportMode


  async def main():
      async with aiohttp.ClientSession() as session:

          
          lookup_client = StopLookupClient("your-SL-Platsuppslag-api-key", session)
          stops = await lookup_client.get_stops("Stockholm Central")
          if (central_station := next(iter(stops), None)) is None:
              raise RuntimeError(r"Could not find Stockholm Central. Weird ¯\_(ツ)_/¯")

          
          transport_api_siteid = central_station.SiteId.transport_siteid

          
          client = TransportClient(session)
          reponse = await client.get_site_departures(transport_api_siteid, transport=TransportMode.TRAIN)

      print(f"Upcoming trains at {central_station.Name}:")
      for departure in sorted(reponse.departures, key=lambda d: d.expected):
          print(
              f"[{departure.line.designation}] platform {departure.stop_point.designation}"
              f" to {departure.destination} ({departure.display})"
          )


  asyncio.run(main())
  ```



  Both bug reports and pull requests are appreciated.

rpm_license:
  Copyright (c) 2024 Mikalai Kukhta and individual contributors.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: a1da051ef71b4dc77722e5526bc77e167f584550417b57bd05658c599eadbdbc
name: python-trailml-help
arch: noarch
version: 1.2.0
epoch: 0
release: 1
summary: Development documents and examples for trailml
url: https://trail-ml.com
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trailml-1.2.0-1.src.rpm
location_href: Packages/python-trailml-help-1.2.0-1.noarch.rpm
checksum_type: sha256
description:
  Trail brings more transparency to your ML experiments.
  Start by using MLflow to track experiments and follow the steps below.



  Install Trail from PyPI via ```pip install trailml```



  ```python
  import mlflow
  from trail import Trail

  with mlflow.start_run() as run:
      with Trail():
        ...your training code...
  ```



  Primary path: ```trailconfig.yml```
  Secondary path: ```~/.config/trail.yml```

  ```yaml
  username: <YOUR_USERNAME>
  password: <YOUR_PASSWORD>
  projects:
      id: 1234ABC
      parentExperimentId: ABCD123
  ```



  - username
  - password

  Project-specific options are required if not overwritten at runtime.

  If the project is started with missing configuration file, you will be guided through configuration file creation process. If you want to change your configuration file after initial creation, ```scripts/create_config``` can be run to edit the configuration file via command line.


pkgId: b82d98b0ddccb4a74a26f615748836d61ab4dfd8c1102454367a98ee4d46d076
name: python-trainy-policy-nightly-help
arch: noarch
version: 0.1.0.dev20241213104531
epoch: 0
release: 1
summary: Development documents and examples for trainy-policy-nightly
url: https://pypi.org/project/trainy-policy-nightly/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trainy-policy-nightly-0.1.0.dev20241213104531-1.src.rpm
location_href: Packages/python-trainy-policy-nightly-help-0.1.0.dev20241213104531-1.noarch.rpm
checksum_type: sha256
description:
  This is a package that defines the Skypilot policies necessary for running on Trainy clusters. The purpose of the policy is to

  - mutate tasks to add the necessary labels/annotations (kueue, networking, etc.) per cloud provider
  - set the available k8s clusters to be those that are visible via tailscale in the allowed k8s cluster contexts

  For users, they set in `~/.sky/config.yaml`

  ```bash
  admin_policy: trainy.policy.DynamicKubernetesContextsUpdatePolicy
  ```

  and install
  ```bash
  pip install "trainy-skypilot-nightly[kubernetes]"
  pip install trainy-policy-nightly
  ```

  [Skypilot Admin Policies](https://skypilot.readthedocs.io/en/latest/cloud-setup/policy.html)


pkgId: a6a49b97fe6a05067f0da219eaf47337ab6c7bdade26ebe3d08cbbf47ff970bd
name: python-transformer-lens-help
arch: noarch
version: 2.10.0
epoch: 0
release: 1
summary: Development documents and examples for transformer-lens
url: https://pypi.org/project/transformer-lens/
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-transformer-lens-2.10.0-1.src.rpm
location_href: Packages/python-transformer-lens-help-2.10.0-1.noarch.rpm
checksum_type: sha256
description:
  <!-- Status Icons -->
  [![Pypi](https://img.shields.io/pypi/v/transformer-lens?color=blue)](https://pypi.org/project/transformer-lens/)
  ![Pypi Total Downloads](https://img.shields.io/pepy/dt/transformer_lens?color=blue) ![PyPI -
  License](https://img.shields.io/pypi/l/transformer_lens?color=blue) [![Release
  CD](https://github.com/TransformerLensOrg/TransformerLens/actions/workflows/release.yml/badge.svg)](https://github.com/TransformerLensOrg/TransformerLens/actions/workflows/release.yml)
  [![Tests
  CD](https://github.com/TransformerLensOrg/TransformerLens/actions/workflows/checks.yml/badge.svg)](https://github.com/TransformerLensOrg/TransformerLens/actions/workflows/checks.yml)
  [![Docs
  CD](https://github.com/TransformerLensOrg/TransformerLens/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/TransformerLensOrg/TransformerLens/actions/workflows/pages/pages-build-deployment)

  A Library for Mechanistic Interpretability of Generative Language Models. Maintained by [Bryce Meyer](https://github.com/bryce13950) and created by [Neel Nanda](https://neelnanda.io/about)

  [![Read the Docs
  Here](https://img.shields.io/badge/-Read%20the%20Docs%20Here-blue?style=for-the-badge&logo=Read-the-Docs&logoColor=white&link=https://TransformerLensOrg.github.io/TransformerLens/)](https://TransformerLensOrg.github.io/TransformerLens/)

  This is a library for doing [mechanistic
  interpretability](https://distill.pub/2020/circuits/zoom-in/) of GPT-2 Style language models. The
  goal of mechanistic interpretability is to take a trained model and reverse engineer the algorithms
  the model learned during training from its weights.

  TransformerLens lets you load in 50+ different open source language models, and exposes the internal
  activations of the model to you. You can cache any internal activation in the model, and add in
  functions to edit, remove or replace these activations as the model runs.





  ```shell
  pip install transformer_lens
  ```



  ```python
  import transformer_lens


  model = transformer_lens.HookedTransformer.from_pretrained("gpt2-small")


  logits, activations = model.run_with_cache("Hello World")
  ```



  * [Introduction to the Library and Mech
    Interp](https://arena3-chapter1-transformer-interp.streamlit.app/[1.2]_Intro_to_Mech_Interp)
  * [Demo of Main TransformerLens Features](https://neelnanda.io/transformer-lens-demo)



  Research done involving TransformerLens:

  <!-- If you change this also change docs/source/content/gallery.md -->
  * [Progress Measures for Grokking via Mechanistic
    Interpretability](https://arxiv.org/abs/2301.05217) (ICLR Spotlight, 2023) by Neel Nanda, Lawrence
    Chan, Tom Lieberum, Jess Smith, Jacob Steinhardt
  * [Finding Neurons in a Haystack: Case Studies with Sparse
    Probing](https://arxiv.org/abs/2305.01610) by Wes Gurnee, Neel Nanda, Matthew Pauly, Katherine
    Harvey, Dmitrii Troitskii, Dimitris Bertsimas
  * [Towards Automated Circuit Discovery for Mechanistic
    Interpretability](https://arxiv.org/abs/2304.14997) by Arthur Conmy, Augustine N. Mavor-Parker,
    Aengus Lynch, Stefan Heimersheim, Adrià Garriga-Alonso
  * [Actually, Othello-GPT Has A Linear Emergent World Representation](https://neelnanda.io/othello)
    by Neel Nanda
  * [A circuit for Python docstrings in a 4-layer attention-only
    transformer](https://www.alignmentforum.org/posts/u6KXXmKFbXfWzoAXn/a-circuit-for-python-docstrings-in-a-4-layer-attention-only)
    by Stefan Heimersheim and Jett Janiak
  * [A Toy Model of Universality](https://arxiv.org/abs/2302.03025) (ICML, 2023) by Bilal Chughtai,
    Lawrence Chan, Neel Nanda
  * [N2G: A Scalable Approach for Quantifying Interpretable Neuron Representations in Large Language
    Models](https://openreview.net/forum?id=ZB6bK6MTYq) (2023, ICLR Workshop RTML) by Alex Foote, Neel
    Nanda, Esben Kran, Ioannis Konstas, Fazl Barez
  * [Eliciting Latent Predictions from Transformers with the Tuned
    Lens](https://arxiv.org/abs/2303.08112) by Nora Belrose, Zach Furman, Logan Smith, Danny Halawi,
    Igor Ostrovsky, Lev McKinney, Stella Biderman, Jacob Steinhardt

  User contributed examples of the library being used in action:

  * [Induction Heads Phase Change
    Replication](https://colab.research.google.com/github/ckkissane/induction-heads-transformer-lens/blob/main/Induction_Heads_Phase_Change.ipynb):
    A partial replication of [In-Context Learning and Induction
    Heads](https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html)
    from Connor Kissane
  * [Decision Transformer
    Interpretability](https://github.com/jbloomAus/DecisionTransformerInterpretability): A set of
    scripts for training decision transformers which uses transformer lens to view intermediate
    activations, perform attribution and ablations. A write up of the initial work can be found
    [here](https://www.lesswrong.com/posts/bBuBDJBYHt39Q5zZy/decision-transformer-interpretability).

  Check out [our demos folder](https://github.com/TransformerLensOrg/TransformerLens/tree/main/demos) for
  more examples of TransformerLens in practice



  Mechanistic interpretability is a very young and small field, and there are a _lot_ of open
  problems. This means there's both a lot of low-hanging fruit, and that the bar for entry is low - if
  you would like to help, please try working on one! The standard answer to "why has no one done this
  yet" is just that there aren't enough people! Key resources:

  * [A Guide to Getting Started in Mechanistic Interpretability](https://neelnanda.io/getting-started)
  * [ARENA Mechanistic Interpretability Tutorials](https://arena3-chapter1-transformer-interp.streamlit.app/) from
    Callum McDougall. A comprehensive practical introduction to mech interp, written in
    TransformerLens - full of snippets to copy and they come with exercises and solutions! Notable
    tutorials:
    * [Coding GPT-2 from
      scratch](https://arena3-chapter1-transformer-interp.streamlit.app/[1.1]_Transformer_from_Scratch), with
      accompanying video tutorial from me ([1](https://neelnanda.io/transformer-tutorial)
      [2](https://neelnanda.io/transformer-tutorial-2)) - a good introduction to transformers
    * [Introduction to Mech Interp and
      TransformerLens](https://arena3-chapter1-transformer-interp.streamlit.app/[1.2]_Intro_to_Mech_Interp): An
      introduction to TransformerLens and mech interp via studying induction heads. Covers the
      foundational concepts of the library
    * [Indirect Object
      Identification](https://arena3-chapter1-transformer-interp.streamlit.app/[1.3]_Indirect_Object_Identification):
      a replication of interpretability in the wild, that covers standard techniques in mech interp
      such as [direct logit
      attribution](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=disz2gTx-jooAcR0a5r8e7LZ),
      [activation patching and path
      patching](https://www.lesswrong.com/posts/xh85KbTFhbCz7taD4/how-to-think-about-activation-patching)
  * [Mech Interp Paper Reading List](https://neelnanda.io/paper-list)
  * [200 Concrete Open Problems in Mechanistic
    Interpretability](https://neelnanda.io/concrete-open-problems)
  * [A Comprehensive Mechanistic Interpretability Explainer](https://neelnanda.io/glossary): To look
    up all the jargon and unfamiliar terms you're going to come across!
  * [Neel Nanda's Youtube channel](https://www.youtube.com/channel/UCBMJ0D-omcRay8dh4QT0doQ): A range
    of mech interp video content, including [paper
    walkthroughs](https://www.youtube.com/watch?v=KV5gbOmHbjU&list=PL7m7hLIqA0hpsJYYhlt1WbHHgdfRLM2eY&index=1),
    and [walkthroughs of doing
    research](https://www.youtube.com/watch?v=yo4QvDn-vsU&list=PL7m7hLIqA0hr4dVOgjNwP2zjQGVHKeB7T)



  [![Contributing
  Guide](https://img.shields.io/badge/-Contributing%20Guide-blue?style=for-the-badge&logo=GitHub&logoColor=white)](https://TransformerLensOrg.github.io/TransformerLens/content/contributing.html)

  If you have issues, questions, feature requests or bug reports, please search the issues to check if
  it's already been answered, and if not please raise an issue!

  You're also welcome to join the open source mech interp community on
  [Slack](https://join.slack.com/t/opensourcemechanistic/shared_invite/zt-2n26nfoh1-TzMHrzyW6HiOsmCESxXtyw).
  Please use issues for concrete discussions about the package, and Slack for higher bandwidth
  discussions about eg supporting important new use cases, or if you want to make substantial
  contributions to the library and want a maintainer's opinion. We'd also love for you to come and
  share your projects on the Slack!

  | :exclamation:  HookedSAETransformer Removed   |
  |-----------------------------------------------|

  Hooked SAE has been removed from TransformerLens in version 2.0. The functionality is being moved to
  [SAELens](http://github.com/jbloomAus/SAELens). For more information on this release, please see the
  accompanying
  [announcement](https://transformerlensorg.github.io/TransformerLens/content/news/release-2.0.html)
  for details on what's new, and the future of TransformerLens.



  This library was created by **[Neel Nanda](https://neelnanda.io)** and is maintained by **[Bryce Meyer](https://github.com/bryce13950)**.

  The core features of TransformerLens were heavily inspired by the interface to [Anthropic's
  excellent Garcon tool](https://transformer-circuits.pub/2021/garcon/index.html). Credit to Nelson
  Elhage and Chris Olah for building Garcon and showing the value of good infrastructure for enabling
  exploratory research!



  I (Neel Nanda) used to work for the [Anthropic interpretability team](transformer-circuits.pub), and
  I wrote this library because after I left and tried doing independent research, I got extremely
  frustrated by the state of open source tooling. There's a lot of excellent infrastructure like
  HuggingFace and DeepSpeed to _use_ or _train_ models, but very little to dig into their internals
  and reverse engineer how they work. **This library tries to solve that**, and to make it easy to get
  into the field even if you don't work at an industry org with real infrastructure! One of the great
  things about mechanistic interpretability is that you don't need large models or tons of compute.
  There are lots of important open problems that can be solved with a small model in a Colab notebook!



  Please cite this library as:

  ```BibTeX
  @misc{nanda2022transformerlens,
      title = {TransformerLens},
      author = {Neel Nanda and Joseph Bloom},
      year = {2022},
      howpublished = {\url{https://github.com/TransformerLensOrg/TransformerLens}},
  }
  ```


pkgId: 2cdeadc4ddbb276f10d5f59e6d5e90277bd9a8d6bd84df3e6660e3e849c45f16
name: python-transformers-help
arch: noarch
version: 4.47.1
epoch: 0
release: 1
summary: Development documents and examples for transformers
url: https://github.com/huggingface/transformers
rpm_license: Apache 2.0 License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-transformers-4.47.1-1.src.rpm
location_href: Packages/python-transformers-help-4.47.1-1.noarch.rpm
checksum_type: sha256
description:
  <!---
  Copyright 2020 The HuggingFace Team. All rights reserved.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

  <p align="center">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/transformers-logo-dark.svg">
      <source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/transformers-logo-light.svg">
      <img alt="Hugging Face Transformers Library" src="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/transformers-logo-light.svg" width="352" height="59" style="max-width: 100%;">
    </picture>
    <br/>
    <br/>
  </p>

  <p align="center">
      <a href="https://circleci.com/gh/huggingface/transformers"><img alt="Build" src="https://img.shields.io/circleci/build/github/huggingface/transformers/main"></a>
      <a href="https://github.com/huggingface/transformers/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/huggingface/transformers.svg?color=blue"></a>
      <a href="https://huggingface.co/docs/transformers/index"><img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/transformers/index.svg?down_color=red&down_message=offline&up_message=online"></a>
      <a href="https://github.com/huggingface/transformers/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/transformers.svg"></a>
      <a href="https://github.com/huggingface/transformers/blob/main/CODE_OF_CONDUCT.md"><img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg"></a>
      <a href="https://zenodo.org/badge/latestdoi/155220641"><img src="https://zenodo.org/badge/155220641.svg" alt="DOI"></a>
  </p>

  <h4 align="center">
      <p>
          <b>English</b> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_zh-hans.md">简体中文</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_zh-hant.md">繁體中文</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_ko.md">한국어</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_es.md">Español</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_ja.md">日本語</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_hd.md">हिन्दी</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_ru.md">Русский</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_pt-br.md">Рortuguês</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_te.md">తెలుగు</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_fr.md">Français</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_de.md">Deutsch</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_vi.md">Tiếng Việt</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_ar.md">العربية</a> |
          <a href="https://github.com/huggingface/transformers/blob/main/i18n/README_ur.md">اردو</a> |
      </p>
  </h4>

  <h3 align="center">
      <p>State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow</p>
  </h3>

  <h3 align="center">
      <a href="https://hf.co/course"><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/course_banner.png"></a>
  </h3>

  🤗 Transformers provides thousands of pretrained models to perform tasks on different modalities such as text, vision, and audio.

  These models can be applied on:

  * 📝 Text, for tasks like text classification, information extraction, question answering, summarization, translation, and text generation, in over 100 languages.
  * 🖼️ Images, for tasks like image classification, object detection, and segmentation.
  * 🗣️ Audio, for tasks like speech recognition and audio classification.

  Transformer models can also perform tasks on **several modalities combined**, such as table question answering, optical character recognition, information extraction from scanned documents, video classification, and visual question answering.

  🤗 Transformers provides APIs to quickly download and use those pretrained models on a given text, fine-tune them on your own datasets and then share them with the community on our [model hub](https://huggingface.co/models). At the same time, each python module defining an architecture is fully standalone and can be modified to enable quick research experiments.

  🤗 Transformers is backed by the three most popular deep learning libraries — [Jax](https://jax.readthedocs.io/en/latest/), [PyTorch](https://pytorch.org/) and [TensorFlow](https://www.tensorflow.org/) — with a seamless integration between them. It's straightforward to train your models with one before loading them for inference with the other.



  You can test most of our models directly on their pages from the [model hub](https://huggingface.co/models). We also offer [private model hosting, versioning, & an inference API](https://huggingface.co/pricing) for public and private models.

  Here are a few examples:

  In Natural Language Processing:
  - [Masked word completion with BERT](https://huggingface.co/google-bert/bert-base-uncased?text=Paris+is+the+%5BMASK%5D+of+France)
  - [Named Entity Recognition with Electra](https://huggingface.co/dbmdz/electra-large-discriminator-finetuned-conll03-english?text=My+name+is+Sarah+and+I+live+in+London+city)
  - [Text generation with Mistral](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2)
  - [Natural Language Inference with RoBERTa](https://huggingface.co/FacebookAI/roberta-large-mnli?text=The+dog+was+lost.+Nobody+lost+any+animal)
  - [Summarization with BART](https://huggingface.co/facebook/bart-large-cnn?text=The+tower+is+324+metres+%281%2C063+ft%29+tall%2C+about+the+same+height+as+an+81-storey+building%2C+and+the+tallest+structure+in+Paris.+Its+base+is+square%2C+measuring+125+metres+%28410+ft%29+on+each+side.+During+its+construction%2C+the+Eiffel+Tower+surpassed+the+Washington+Monument+to+become+the+tallest+man-made+structure+in+the+world%2C+a+title+it+held+for+41+years+until+the+Chrysler+Building+in+New+York+City+was+finished+in+1930.+It+was+the+first+structure+to+reach+a+height+of+300+metres.+Due+to+the+addition+of+a+broadcasting+aerial+at+the+top+of+the+tower+in+1957%2C+it+is+now+taller+than+the+Chrysler+Building+by+5.2+metres+%2817+ft%29.+Excluding+transmitters%2C+the+Eiffel+Tower+is+the+second+tallest+free-standing+structure+in+France+after+the+Millau+Viaduct)
  - [Question answering with DistilBERT](https://huggingface.co/distilbert/distilbert-base-uncased-distilled-squad?text=Which+name+is+also+used+to+describe+the+Amazon+rainforest+in+English%3F&context=The+Amazon+rainforest+%28Portuguese%3A+Floresta+Amaz%C3%B4nica+or+Amaz%C3%B4nia%3B+Spanish%3A+Selva+Amaz%C3%B3nica%2C+Amazon%C3%ADa+or+usually+Amazonia%3B+French%3A+For%C3%AAt+amazonienne%3B+Dutch%3A+Amazoneregenwoud%29%2C+also+known+in+English+as+Amazonia+or+the+Amazon+Jungle%2C+is+a+moist+broadleaf+forest+that+covers+most+of+the+Amazon+basin+of+South+America.+This+basin+encompasses+7%2C000%2C000+square+kilometres+%282%2C700%2C000+sq+mi%29%2C+of+which+5%2C500%2C000+square+kilometres+%282%2C100%2C000+sq+mi%29+are+covered+by+the+rainforest.+This+region+includes+territory+belonging+to+nine+nations.+The+majority+of+the+forest+is+contained+within+Brazil%2C+with+60%25+of+the+rainforest%2C+followed+by+Peru+with+13%25%2C+Colombia+with+10%25%2C+and+with+minor+amounts+in+Venezuela%2C+Ecuador%2C+Bolivia%2C+Guyana%2C+Suriname+and+French+Guiana.+States+or+departments+in+four+nations+contain+%22Amazonas%22+in+their+names.+The+Amazon+represents+over+half+of+the+planet%27s+remaining+rainforests%2C+and+comprises+the+largest+and+most+biodiverse+tract+of+tropical+rainforest+in+the+world%2C+with+an+estimated+390+billion+individual+trees+divided+into+16%2C000+species)
  - [Translation with T5](https://huggingface.co/google-t5/t5-base?text=My+name+is+Wolfgang+and+I+live+in+Berlin)

  In Computer Vision:
  - [Image classification with ViT](https://huggingface.co/google/vit-base-patch16-224)
  - [Object Detection with DETR](https://huggingface.co/facebook/detr-resnet-50)
  - [Semantic Segmentation with SegFormer](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512)
  - [Panoptic Segmentation with Mask2Former](https://huggingface.co/facebook/mask2former-swin-large-coco-panoptic)
  - [Depth Estimation with Depth Anything](https://huggingface.co/docs/transformers/main/model_doc/depth_anything)
  - [Video Classification with VideoMAE](https://huggingface.co/docs/transformers/model_doc/videomae)
  - [Universal Segmentation with OneFormer](https://huggingface.co/shi-labs/oneformer_ade20k_dinat_large)

  In Audio:
  - [Automatic Speech Recognition with Whisper](https://huggingface.co/openai/whisper-large-v3)
  - [Keyword Spotting with Wav2Vec2](https://huggingface.co/superb/wav2vec2-base-superb-ks)
  - [Audio Classification with Audio Spectrogram Transformer](https://huggingface.co/MIT/ast-finetuned-audioset-10-10-0.4593)

  In Multimodal tasks:
  - [Table Question Answering with TAPAS](https://huggingface.co/google/tapas-base-finetuned-wtq)
  - [Visual Question Answering with ViLT](https://huggingface.co/dandelin/vilt-b32-finetuned-vqa)
  - [Image captioning with LLaVa](https://huggingface.co/llava-hf/llava-1.5-7b-hf)
  - [Zero-shot Image Classification with SigLIP](https://huggingface.co/google/siglip-so400m-patch14-384)
  - [Document Question Answering with LayoutLM](https://huggingface.co/impira/layoutlm-document-qa)
  - [Zero-shot Video Classification with X-CLIP](https://huggingface.co/docs/transformers/model_doc/xclip)
  - [Zero-shot Object Detection with OWLv2](https://huggingface.co/docs/transformers/en/model_doc/owlv2)
  - [Zero-shot Image Segmentation with CLIPSeg](https://huggingface.co/docs/transformers/model_doc/clipseg)
  - [Automatic Mask Generation with SAM](https://huggingface.co/docs/transformers/model_doc/sam)




  Transformers is more than a toolkit to use pretrained models: it's a community of projects built around it and the
  Hugging Face Hub. We want Transformers to enable developers, researchers, students, professors, engineers, and anyone
  else to build their dream projects.

  In order to celebrate the 100,000 stars of transformers, we have decided to put the spotlight on the
  community, and we have created the [awesome-transformers](./awesome-transformers.md) page which lists 100
  incredible projects built in the vicinity of transformers.

  If you own or use a project that you believe should be part of the list, please open a PR to add it!



  <a target="_blank" href="https://huggingface.co/enterprise">
      <img alt="Hugging Face Enterprise Hub" src="https://github.com/user-attachments/assets/247fb16d-d251-4583-96c4-d3d76dda4925">
  </a><br>



  To immediately use a model on a given input (text, image, audio, ...), we provide the `pipeline` API. Pipelines group together a pretrained model with the preprocessing that was used during that model's training. Here is how to quickly use a pipeline to classify positive versus negative texts:

  ```python
  >>> from transformers import pipeline


  >>> classifier = pipeline('sentiment-analysis')
  >>> classifier('We are very happy to introduce pipeline to the transformers repository.')
  [{'label': 'POSITIVE', 'score': 0.9996980428695679}]
  ```

  The second line of code downloads and caches the pretrained model used by the pipeline, while the third evaluates it on the given text. Here, the answer is "positive" with a confidence of 99.97%.

  Many tasks have a pre-trained `pipeline` ready to go, in NLP but also in computer vision and speech. For example, we can easily extract detected objects in an image:

  ``` python
  >>> import requests
  >>> from PIL import Image
  >>> from transformers import pipeline


  >>> url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png"
  >>> image_data = requests.get(url, stream=True).raw
  >>> image = Image.open(image_data)


  >>> object_detector = pipeline('object-detection')
  >>> object_detector(image)
  [{'score': 0.9982201457023621,
    'label': 'remote',
    'box': {'xmin': 40, 'ymin': 70, 'xmax': 175, 'ymax': 117}},
   {'score': 0.9960021376609802,
    'label': 'remote',
    'box': {'xmin': 333, 'ymin': 72, 'xmax': 368, 'ymax': 187}},
   {'score': 0.9954745173454285,
    'label': 'couch',
    'box': {'xmin': 0, 'ymin': 1, 'xmax': 639, 'ymax': 473}},
   {'score': 0.9988006353378296,
    'label': 'cat',
    'box': {'xmin': 13, 'ymin': 52, 'xmax': 314, 'ymax': 470}},
   {'score': 0.9986783862113953,
    'label': 'cat',
    'box': {'xmin': 345, 'ymin': 23, 'xmax': 640, 'ymax': 368}}]
  ```

  Here, we get a list of objects detected in the image, with a box surrounding the object and a confidence score. Here is the original image on the left, with the predictions displayed on the right:

  <h3 align="center">
      <a><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample.png" width="400"></a>
      <a><img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/coco_sample_post_processed.png" width="400"></a>
  </h3>

  You can learn more about the tasks supported by the `pipeline` API in [this tutorial](https://huggingface.co/docs/transformers/task_summary).

  In addition to `pipeline`, to download and use any of the pretrained models on your given task, all it takes is three lines of code. Here is the PyTorch version:
  ```python
  >>> from transformers import AutoTokenizer, AutoModel

  >>> tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")
  >>> model = AutoModel.from_pretrained("google-bert/bert-base-uncased")

  >>> inputs = tokenizer("Hello world!", return_tensors="pt")
  >>> outputs = model(**inputs)
  ```

  And here is the equivalent code for TensorFlow:
  ```python
  >>> from transformers import AutoTokenizer, TFAutoModel

  >>> tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")
  >>> model = TFAutoModel.from_pretrained("google-bert/bert-base-uncased")

  >>> inputs = tokenizer("Hello world!", return_tensors="tf")
  >>> outputs = model(**inputs)
  ```

  The tokenizer is responsible for all the preprocessing the pretrained model expects and can be called directly on a single string (as in the above examples) or a list. It will output a dictionary that you can use in downstream code or simply directly pass to your model using the ** argument unpacking operator.

  The model itself is a regular [Pytorch `nn.Module`](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) or a [TensorFlow `tf.keras.Model`](https://www.tensorflow.org/api_docs/python/tf/keras/Model) (depending on your backend) which you can use as usual. [This tutorial](https://huggingface.co/docs/transformers/training) explains how to integrate such a model into a classic PyTorch or TensorFlow training loop, or how to use our `Trainer` API to quickly fine-tune on a new dataset.



  1. Easy-to-use state-of-the-art models:
      - High performance on natural language understanding & generation, computer vision, and audio tasks.
      - Low barrier to entry for educators and practitioners.
      - Few user-facing abstractions with just three classes to learn.
      - A unified API for using all our pretrained models.

  1. Lower compute costs, smaller carbon footprint:
      - Researchers can share trained models instead of always retraining.
      - Practitioners can reduce compute time and production costs.
      - Dozens of architectures with over 400,000 pretrained models across all modalities.

  1. Choose the right framework for every part of a model's lifetime:
      - Train state-of-the-art models in 3 lines of code.
      - Move a single model between TF2.0/PyTorch/JAX frameworks at will.
      - Seamlessly pick the right framework for training, evaluation, and production.

  1. Easily customize a model or an example to your needs:
      - We provide examples for each architecture to reproduce the results published by its original authors.
      - Model internals are exposed as consistently as possible.
      - Model files can be used independently of the library for quick experiments.



  - This library is not a modular toolbox of building blocks for neural nets. The code in the model files is not refactored with additional abstractions on purpose, so that researchers can quickly iterate on each of the models without diving into additional abstractions/files.
  - The training API is not intended to work on any model but is optimized to work with the models provided by the library. For generic machine learning loops, you should use another library (possibly, [Accelerate](https://huggingface.co/docs/accelerate)).
  - While we strive to present as many use cases as possible, the scripts in our [examples folder](https://github.com/huggingface/transformers/tree/main/examples) are just that: examples. It is expected that they won't work out-of-the-box on your specific problem and that you will be required to change a few lines of code to adapt them to your needs.





  This repository is tested on Python 3.9+, Flax 0.4.1+, PyTorch 1.11+, and TensorFlow 2.6+.

  You should install 🤗 Transformers in a [virtual environment](https://docs.python.org/3/library/venv.html). If you're unfamiliar with Python virtual environments, check out the [user guide](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).

  First, create a virtual environment with the version of Python you're going to use and activate it.

  Then, you will need to install at least one of Flax, PyTorch, or TensorFlow.
  Please refer to [TensorFlow installation page](https://www.tensorflow.org/install/), [PyTorch installation page](https://pytorch.org/get-started/locally/#start-locally) and/or [Flax](https://github.com/google/flax#quick-install) and [Jax](https://github.com/google/jax#installation) installation pages regarding the specific installation command for your platform.

  When one of those backends has been installed, 🤗 Transformers can be installed using pip as follows:

  ```bash
  pip install transformers
  ```

  If you'd like to play with the examples or need the bleeding edge of the code and can't wait for a new release, you must [install the library from source](https://huggingface.co/docs/transformers/installation#installing-from-source).



  🤗 Transformers can be installed using conda as follows:

  ```shell script
  conda install conda-forge::transformers
  ```

  > **_NOTE:_** Installing `transformers` from the `huggingface` channel is deprecated.

  Follow the installation pages of Flax, PyTorch or TensorFlow to see how to install them with conda.

  > **_NOTE:_**  On Windows, you may be prompted to activate Developer Mode in order to benefit from caching. If this is not an option for you, please let us know in [this issue](https://github.com/huggingface/huggingface_hub/issues/1062).



  **[All the model checkpoints](https://huggingface.co/models)** provided by 🤗 Transformers are seamlessly integrated from the huggingface.co [model hub](https://huggingface.co/models), where they are uploaded directly by [users](https://huggingface.co/users) and [organizations](https://huggingface.co/organizations).

  Current number of checkpoints: ![](https://img.shields.io/endpoint?url=https://huggingface.co/api/shields/models&color=brightgreen)

  🤗 Transformers currently provides the following architectures: see [here](https://huggingface.co/docs/transformers/model_summary) for a high-level summary of each them.

  To check if each model has an implementation in Flax, PyTorch or TensorFlow, or has an associated tokenizer backed by the 🤗 Tokenizers library, refer to [this table](https://huggingface.co/docs/transformers/index#supported-frameworks).

  These implementations have been tested on several datasets (see the example scripts) and should match the performance of the original implementations. You can find more details on performance in the Examples section of the [documentation](https://github.com/huggingface/transformers/tree/main/examples).




  | Section | Description |
  |-|-|
  | [Documentation](https://huggingface.co/docs/transformers/) | Full API documentation and tutorials |
  | [Task summary](https://huggingface.co/docs/transformers/task_summary) | Tasks supported by 🤗 Transformers |
  | [Preprocessing tutorial](https://huggingface.co/docs/transformers/preprocessing) | Using the `Tokenizer` class to prepare data for the models |
  | [Training and fine-tuning](https://huggingface.co/docs/transformers/training) | Using the models provided by 🤗 Transformers in a PyTorch/TensorFlow training loop and the `Trainer` API |
  | [Quick tour: Fine-tuning/usage scripts](https://github.com/huggingface/transformers/tree/main/examples) | Example scripts for fine-tuning models on a wide range of tasks |
  | [Model sharing and uploading](https://huggingface.co/docs/transformers/model_sharing) | Upload and share your fine-tuned models with the community |



  We now have a [paper](https://www.aclweb.org/anthology/2020.emnlp-demos.6/) you can cite for the 🤗 Transformers library:
  ```bibtex
  @inproceedings{wolf-etal-2020-transformers,
      title = "Transformers: State-of-the-Art Natural Language Processing",
      author = "Thomas Wolf and Lysandre Debut and Victor Sanh and Julien Chaumond and Clement Delangue and Anthony Moi and Pierric Cistac and Tim Rault and Rémi Louf and Morgan Funtowicz and Joe Davison and Sam Shleifer and Patrick von Platen and Clara Ma and Yacine Jernite and Julien Plu and Canwen Xu and Teven Le Scao and Sylvain Gugger and Mariama Drame and Quentin Lhoest and Alexander M. Rush",
      booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
      month = oct,
      year = "2020",
      address = "Online",
      publisher = "Association for Computational Linguistics",
      url = "https://www.aclweb.org/anthology/2020.emnlp-demos.6",
      pages = "38--45"
  }
  ```


pkgId: 8548190cb68b704c15c85386033076b2a6bc698db811e85a1d373864565053d4
name: python-translate-toolkit-help
arch: noarch
version: 3.14.3
epoch: 0
release: 1
summary: Development documents and examples for translate-toolkit
url: https://toolkit.translatehouse.org/
rpm_license: GPL-2.0-or-later
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-translate-toolkit-3.14.3-1.src.rpm
location_href: Packages/python-translate-toolkit-help-3.14.3-1.noarch.rpm
checksum_type: sha256
description:
  The Translate Toolkit is a set of software and documentation designed to help
  make the lives of localizers both more productive and less frustrating.  The
  Toolkit is part of the Translate project, hosted at
  <https://github.com/translate>.
  The software includes programs to convert localization formats to the common
  PO, and emerging XLIFF format.  There are also programs to check and manage PO
  and XLIFF files.  Online documentation includes guides on using the tools,
  running a localization project and how to localize various projects from
  OpenOffice.org to Mozilla.
  At its core the software contains a set of classes for handling various
  localization storage formats: DTD, properties, OpenOffice.org GSI/SDF,
  CSV, MO, Qt .ts, TMX, TBX, WordFast txt, Gettext .mo, Windows RC, and
  of course PO and XLIFF.  It also provides scripts to convert between
  these formats.
  Also part of the Toolkit are Python programs to create word counts, merge
  translations and perform various checks on translation files.


pkgId: 9127d8149b5984bd59aa5137f65a84d8601c830a48e23b8dc57ff19f10236595
name: python-transmission-rpc-help
arch: noarch
version: 7.0.11
epoch: 0
release: 1
summary: Development documents and examples for transmission-rpc
url: https://github.com/Trim21/transmission-rpc
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-transmission-rpc-7.0.11-1.src.rpm
location_href: Packages/python-transmission-rpc-help-7.0.11-1.noarch.rpm
checksum_type: sha256
description:
  [![PyPI](https://img.shields.io/pypi/v/transmission-rpc)](https://pypi.org/project/transmission-rpc/)
  [![Documentation Status](https://readthedocs.org/projects/transmission-rpc/badge/)](https://transmission-rpc.readthedocs.io/)
  [![ci](https://github.com/Trim21/transmission-rpc/workflows/ci/badge.svg)](https://github.com/Trim21/transmission-rpc/actions)
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/transmission-rpc)](https://pypi.org/project/transmission-rpc/)
  [![Codecov branch](https://img.shields.io/codecov/c/github/Trim21/transmission-rpc/master)](https://codecov.io/gh/Trim21/transmission-rpc/branch/master)



  `transmission-rpc` is a python wrapper on top of [transmission](https://github.com/transmission/transmission) JSON RPC protocol,
  hosted on GitHub at [github.com/trim21/transmission-rpc](https://github.com/trim21/transmission-rpc)

  Support 2.40 (released 2011-10-05) <= transmission version <= 4.0.6 (released 2024-05-29),
  should works fine with newer rpc version but some new feature may be missing.



  `transmission-rpc` follow [Semantic Versioning](https://semver.org/),
  report an issue if you found unexpected API break changes at same major version.



  ```console
  pip install transmission-rpc -U
  ```



  <https://transmission-rpc.readthedocs.io/en/stable/>



  All kinds of PRs (docs, feature, bug fixes and eta...) are most welcome.



  At first, you need to install [python>=3.10](https://python.org/), and [task](https://taskfile.dev/) (or you can also run command in `taskfile.yaml` directly).

  It's recommended to python3.10 as local development python version.

  ```shell
  python -m venv .venv
  source .venv/bin/activate
  pip install -e '.[dev]'

  pre-commit install
  ```



  ```shell
  task lint
  ```



  You need to have a transmission daemon running

  then add a `.env` file

  ```shell
  export TR_HOST="..."
  export TR_PORT="..."
  export TR_USER="..."
  export TR_PASS="..."
  ```

  ```shell
  task test
  ```



  `transmission-rpc` is licensed under the MIT license.


pkgId: 6cc736293cf791cd02bc50ce7c2fb89a8b16b0731fb20af8464524b1c708a9b5
name: python-tratreetra-help
arch: noarch
version: 0.1
epoch: 0
release: 1
summary: Development documents and examples for tratreetra
url: https://github.com/alexeyev/tratreetra
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tratreetra-0.1-1.src.rpm
location_href: Packages/python-tratreetra-help-0.1-1.noarch.rpm
checksum_type: sha256
description:
  Given
  * the sentence in the language of interest (LRL, e.g. Kyrgyz),
  * the translation of the sentence to the more resourced language (e.g. Turkish),
  * the dependency parser (UD) for the more resourced language (e.g. Stanza-UD_BOUN-BERT),
  * the alignment model of your liking (source language should be the language of interest),
  * the morphological analyzer including PoS tags (Universal Tagset) for the language of interest (e.g. `apertium-kir`; note that it must not modify the tokenization),

  generate a dependency tree for the sentence in the target language.

  Clearly, it's far from perfect, but may still be useful to speed up the manual treebank annotation. Please see the paper for more details.



  We have provided some bindings to the popular libraries in [tratreetra/models.py](tratreetra/models.py); the appropriate
  versions of these libraries should be installed, please consult the respective docstrings.

  The example code in [example/example.py](example/example.py) reproduces one of the results from the paper:

  * `Stanza-IMST-charlm`
  * `SimAlign-XLMR`
  * `apertium-kir` (without morphological disambiguation)
  * Translation via `ChatGPT4o`

  Please see more details in the [example/README](example/README.md).



  The paper is still in print, the preprint on arXiv will be made available soon.

  Meanwhile, if you use our tool, we'll be grateful if you cite it as follows:

  ```bibtex
  @article{atkn2025syntax,
      author = {Alekseev, Anton and Tillabaeva, Alina and Kabaeva, Gulnara Dzh. and Nikolenko, Sergey I.},
      title = {{Syntactic Transfer to Kyrgyz Using the Treebank Translation Method (in print)}},
      journal = {To appear in the Journal of Mathematical Sciences},
      publisher = {Springer},
      year = {2025}
  }
  ```



  * Thoughtful approach to data structures
  * Profile the code
  * Upload to pypi
  * Tests
  * Redesign logging here and in apertium2ud


pkgId: 39ffbc24cec504360fd09ec82bab79cfd784d26b21b02595441f3c7f3205eb0c
name: python-tread-contracts-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for tread-contracts
url: https://pypi.org/project/tread-contracts/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tread-contracts-0.1.1-1.src.rpm
location_href: Packages/python-tread-contracts-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  This project is using the following tools:
  * [`pipx`](https://pipx.pypa.io/stable/installation/)
  * [`poetry`](https://python-poetry.org/docs/)

  You can install these as follows:

  ```shell
  > brew install pipx
  > pipx ensurepath
  > pipx install poetry
  > poetry completions bash >> ~/.bash_completion
  ```

  With `poetry`, you can install dependencies as follows. Note that if you do not have a virtual env active, `poetry` will automatically create and manage one for you, specific to this project.

  ```
  > poetry install
  ```



  You can run simple tests as follows. These will run on the Sepolia Base testnet by default.

  ```shell



  > python -m test_client.main auto

  > python -m test_client.main auto false
  ```





  Reading a record or writing an attestations requires a trader ID. We are using 0xABCD as a mock trader ID for these examples.



  ```shell
  > python -m test_client.main read-info

  Attestations contract 0xB4f9A1f1347b7D8eb97dC70672576BB96E0510e0:
    data group members: 0x64D8672534A169B0340fA10F6340CE45aE36d0e7
    epoch length: 600 seconds
    epoch zero start: 0 (1969-12-31 19:00:00 local)
    Current epoch number: 2880124
    Current epoch 2880124 starts at 1728074400 (2024-10-04 16:40:00 local) and ends at 1728075000 (2024-10-04 16:50:00 local)
  ```



  ```shell
  > python -m test_client.main write-data 0xABCD 0 0x1234 mock-cid

  Submitted transaction 0x2280079a88ae3af1923feeb40e0938862d7f141c1c87d31d5da0ca189c1010c7. Waiting for confirmation...
  Transaction confirmed in block 16153093
  ```



  ```shell
  > python -m test_client.main read-data 0xABCD 0

  Consensus for epoch 0:
    Merkle root: 0x0000000000000000000000000000000000000000000000000000000000001234
    CID: mock-cid
  ```



  ```shell
  >  python -m test_client.main create-group 0x64D8672534A169B0340fA10F6340CE45aE36d0e7 1

  Submitting and waiting for transaction...
  Created risk group 1

  > python -m test_client.main read-group 1

  Risk group 1:
    members: ['0x64D8672534A169B0340fA10F6340CE45aE36d0e7']
    threshold: 1

  > python -m test_client.main create-parameter mock-name mock-desc

  Submitting and waiting for transaction...
  Created risk parameter 0

  > python -m test_client.main read-parameter 0

  Risk parameter 0:
    name: mock-name
    description: mock-desc

  > python -m test_client.main write-risk 0xABCD 0 0 1 123

  Submitted transaction 0xb9d1ae7fd71d43a456a62fcffba7aae0542671e66eef410136be547d803c7205. Waiting for confirmation...
  Transaction confirmed in block 16153127

  > python -m test_client.main read-risk 0xABCD 0 0 1

  Consensus for epoch 0:
    Risk value: 1234
  ```


pkgId: a60321674e6f4dfe3fd309b549cef780d5c9749f7f1ed1df40bf9ecaf09e87bf
name: python-tree-ls-help
arch: noarch
version: 0.0.6
epoch: 0
release: 1
summary: Development documents and examples for tree-ls
url: https://pypi.org/project/tree-ls/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tree-ls-0.0.6-1.src.rpm
location_href: Packages/python-tree-ls-help-0.0.6-1.noarch.rpm
checksum_type: sha256
description:
  Tree-LS, dizin yapÄ±sÄ±nÄ± aÄŸaÃ§ benzeri bir ÅŸekilde yazdÄ±ran bir komut satÄ±rÄ± aracÄ±dÄ±r.



  ```bash
  pip install tree-ls


pkgId: d08ad85ebaa424a81d3a5f88e9a1c58bda9a812900c82db1b9cac77c62b3f1f6
name: python-tree-sitter-objc-debuginfo
arch: aarch64
version: 3.0.2
epoch: 0
release: 1
summary: Debug information for package python-tree-sitter-objc
url: https://github.com/tree-sitter-grammars/tree-sitter-objc
rpm_license: MIT
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-tree-sitter-objc-3.0.2-1.src.rpm
location_href: Packages/python-tree-sitter-objc-debuginfo-3.0.2-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug information for package python-tree-sitter-objc.
  Debug information is useful when developing applications that use this
  package or when debugging this package.


pkgId: a30121a376ce3db2a843b9f17603211b24f0e989fe5d2277d5eb5239e05f3f07
name: python-tree-sitter-objc-debugsource
arch: aarch64
version: 3.0.2
epoch: 0
release: 1
summary: Debug sources for package python-tree-sitter-objc
url: https://github.com/tree-sitter-grammars/tree-sitter-objc
rpm_license: MIT
rpm_group: Development/Debug
rpm_buildhost: localhost
rpm_sourcerpm: python-tree-sitter-objc-3.0.2-1.src.rpm
location_href: Packages/python-tree-sitter-objc-debugsource-3.0.2-1.aarch64.rpm
checksum_type: sha256
description:
  This package provides debug sources for package python-tree-sitter-objc.
  Debug sources are useful when developing applications that use this
  package or when debugging this package.


pkgId: 773dd5f58f0a1b21b20122e8ca365f23f0360f7ab69d8b50cde45a8a701dde67
name: python-tree-sitter-objc-help
arch: aarch64
version: 3.0.2
epoch: 0
release: 1
summary: Development documents and examples for tree-sitter-objc
url: https://github.com/tree-sitter-grammars/tree-sitter-objc
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tree-sitter-objc-3.0.2-1.src.rpm
location_href: Packages/python-tree-sitter-objc-help-3.0.2-1.aarch64.rpm
checksum_type: sha256
description:
  [![CI][ci]](https://github.com/tree-sitter-grammars/tree-sitter-objc/actions/workflows/ci.yml)
  [![discord][discord]](https://discord.gg/w7nTvsVJhm)
  [![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
  [![crates][crates]](https://crates.io/crates/tree-sitter-objc)
  [![npm][npm]](https://www.npmjs.com/package/tree-sitter-objc)
  [![pypi][pypi]](https://pypi.org/project/tree-sitter-objc)


  [Objective C](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html)
  grammar for [tree-sitter](https://tree-sitter.github.io)

  [ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter-grammars/tree-sitter-objc/ci.yml?logo=github&label=CI
  [discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
  [matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
  [npm]: https://img.shields.io/npm/v/tree-sitter-objc?logo=npm
  [crates]: https://img.shields.io/crates/v/tree-sitter-objc?logo=rust
  [pypi]: https://img.shields.io/pypi/v/tree-sitter-objc?logo=pypi&logoColor=ffd242


pkgId: 8ed720701a5b10c67073630c4014ccaf92197876540f78e274c6afef5b4c4025
name: python-treefy-help
arch: noarch
version: 0.1
epoch: 0
release: 1
summary: Development documents and examples for treefy
url: https://github.com/devenkapadia/treefy.git
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-treefy-0.1-1.src.rpm
location_href: Packages/python-treefy-help-0.1-1.noarch.rpm
checksum_type: sha256
description:
  Treefy is a simple yet flexible Python library designed to help you easily work with binary trees. It allows you to define custom functions and perform a variety of tree operations like insertion, traversal, height calculation, and more.



  - **BinaryTree** class for working with binary trees.
  - **TreeNode** class to represent individual nodes.
  - **Custom function registration** allowing users to define and use custom functions.
  - **Tree Operations**:
    - Preorder, Inorder, and Postorder traversals.
    - Level order traversal (breadth-first search).
    - Height calculation of the tree.
    - Drawing a textual representation of the tree.
  - **Attach Subtree**: Attach a whole tree/subtree as a left or right child.
  - **Support for DSA Problems**: You can register custom DSA functions like "maximum path sum" or "LCA" (Lowest Common Ancestor) and solve problems dynamically.



  With this project, there is one test.py, which includes the usage of BinaryTree class, how to add nodes, traversals etc
  In addition to that, there are two custom functions provided: Max Path Sum and LCA for your reference



  Clone the repository or download the source files and place them in your project directory. Alternatively, you can install it via pip (if the package is uploaded to PyPI):

  ```bash
  pip install treefy


pkgId: e2d625c9189c3df19cf539be206dede8137a1aa956bf29a18b92f27d5d4c7ee8
name: python-treesimulator-help
arch: noarch
version: 0.2.1
epoch: 0
release: 1
summary: Development documents and examples for treesimulator
url: https://github.com/evolbioinfo/treesimulator
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-treesimulator-0.2.1-1.src.rpm
location_href: Packages/python-treesimulator-help-0.2.1-1.noarch.rpm
checksum_type: sha256
description:
  Simulation of rooted phylogenetic trees under a given Multitype Birth–Death (MTBD) model, with or without contact tracing (CT).

  [//]: # ([![DOI:10.1093/sysbio/syad059]&#40;https://zenodo.org/badge/DOI/10.1093/sysbio/syad059.svg&#41;]&#40;https://doi.org/10.1093/sysbio/syad059&#41;)
  [![GitHub release](https://img.shields.io/github/v/release/evolbioinfo/treesimulator.svg)](https://github.com/evolbioinfo/treesimulator/releases)
  [![PyPI version](https://badge.fury.io/py/treesimulator.svg)](https://pypi.org/project/treesimulator/)
  [![PyPI downloads](https://shields.io/pypi/dm/treesimulator)](https://pypi.org/project/treesimulator/)
  [![Docker pulls](https://img.shields.io/docker/pulls/evolbioinfo/treesimulator)](https://hub.docker.com/r/evolbioinfo/treesimulator/tags)


  The MTBD models were introduced by Stadler & Bonhoeffer [[_Philos. Trans. R. Soc. B_ 2013]](https://royalsocietypublishing.org/doi/10.1098/rstb.2012.0198).

  An MTBD model with m states has

  m(m-1) state transition rate parameters:
  * μ<sub>ij</sub> -- transition rate from state i to state j (1 ≤ i, j ≤ m; i ≠ j), where μ<sub>ij</sub> ≥ 0

  m<sup>2</sup> transmission rate parameters:
  * λ<sub>ij</sub> -- transmission rate from state i (donor) to state j (recipient) (1 ≤ i, j ≤ m), where λ<sub>ij</sub> ≥ 0

  m removal (becoming non-infectious) rate parameters:
  * ψ<sub>i</sub> -- removal rate of state i (1 ≤ i ≤ m), where ψ<sub>i</sub> ≥ 0

  m sampling probability upon removal parameters:
  * p<sub>i</sub> -- probability to sample the pathogen of an individual in state i upon removal (1 ≤ i ≤ m), where 0 < p<sub>i</sub> ≤ 1


  Contact tracing adds two parameters to the initial MTBD model:

  * υ -- probability to notify contacts upon sampling
  * φ -- notified contact removal and sampling rate: φ >> ψ<sub>i</sub> ∀i (1 ≤ i ≤ m). The pathogen of a notified contact is sampled automatically (with a probability of 1) upon removal.


  We pay particular interest to the classical BD model, the BD Exposed-Infectious (BDEI) model,
  and BD with superspreading (BDSS),
  as they are described in [[Voznica _et al._ 2021]]((https://www.biorxiv.org/content/10.1101/2021.03.11.435006v1)), and to their -CT versions.



  3 parameters:
  * λ -- transmission rate
  * ψ -- removal rate
  * p -- sampling probability upon removal

  Epidemiological parameters:
  * R<sub>0</sub>=λ/ψ -- reproduction number
  * 1/ψ -- infectious time



  5 parameters:
  * λ -- transmission rate
  * ψ -- removal rate
  * p -- sampling probability upon removal
  * υ -- probability to notify contacts upon sampling
  * φ -- notified contact removal and sampling rate: φ >> ψ


  Epidemiological parameters:
  * R<sub>0</sub>=λ/ψ -- reproduction number
  * 1/ψ -- infectious time
  * 1/φ -- notified contact removal time


  2 states:
  * E, exposed, i.e. infected but not yet infectious
  * I, infectious

  4 parameters:
  * μ -- transition rate from E to I (becoming infectious)
  * λ -- transmission rate from I to E
  * ψ -- removal rate of I
  * p -- sampling probability upon removal

  Epidemiological parameters:
  * R<sub>0</sub>=λ/ψ -- reproduction number
  * 1/ψ -- infectious time
  * 1/μ -- incubation period



  2 states:
  * E, exposed, i.e. infected but not yet infectious
  * I, infectious

  6 parameters:
  * μ -- transition rate from E to I (becoming infectious)
  * λ -- transmission rate from I to E
  * ψ -- removal rate of I
  * p -- sampling probability upon removal
  * υ -- probability to notify contacts upon sampling
  * φ -- notified contact removal and sampling rate: φ >> ψ

  Epidemiological parameters:
  * R<sub>0</sub>=λ/ψ -- reproduction number
  * 1/ψ -- infectious time
  * 1/μ -- incubation period
  * 1/φ -- notified contact removal time


  2 compartments:
  * N, standard infectious individual
  * S, superspreader

  6 parameters:
  * λ<sub>nn</sub> -- transmission rate from N to N
  * λ<sub>ns</sub> -- transmission rate from N to S
  * λ<sub>sn</sub> -- transmission rate from S to N
  * λ<sub>ss</sub> -- transmission rate from S to S

      (with a constraint that λ<sub>ss</sub>/λ<sub>ns</sub>=λ<sub>sn</sub>/λ<sub>nn</sub>)
  * ψ -- removal rate of S and of N (the same)
  * p -- sampling probability upon removal (the same for N and S)

  Epidemiological parameters:
  * R<sub>0</sub>=(λ<sub>nn</sub> + λ<sub>ss</sub>)/ψ -- reproduction number
  * 1/ψ -- infectious time
  * X=λ<sub>ss</sub>/λ<sub>ns</sub>=λ<sub>sn</sub>/λ<sub>nn</sub> -- super-spreading transmission ratio
  * f=λ<sub>ss</sub>/(λ<sub>sn</sub> + λ<sub>ss</sub>) -- super-spreading fraction


  2 states:
  * N, standard infectious individual
  * S, superspreader

  8 parameters:
  * λ<sub>nn</sub> -- transmission rate from N to N
  * λ<sub>ns</sub> -- transmission rate from N to S
  * λ<sub>sn</sub> -- transmission rate from S to N
  * λ<sub>ss</sub> -- transmission rate from S to S

      (with a constraint that λ<sub>ss</sub>/λ<sub>ns</sub>=λ<sub>sn</sub>/λ<sub>nn</sub>)
  * ψ -- removal rate of S and of N (the same)
  * p -- sampling probability upon removal (the same for N and S)
  * υ -- probability to notify contacts upon sampling
  * φ -- notified contact removal and sampling rate: φ >> ψ

  Epidemiological parameters:
  * R<sub>0</sub>=(λ<sub>nn</sub> + λ<sub>ss</sub>)/ψ -- reproduction number
  * 1/ψ -- infectious time
  * X=λ<sub>ss</sub>/λ<sub>ns</sub>=λ<sub>sn</sub>/λ<sub>nn</sub> -- super-spreading transmission ratio
  * f=λ<sub>ss</sub>/(λ<sub>sn</sub> + λ<sub>ss</sub>) -- super-spreading fraction
  * 1/φ -- notified contact removal time




  There are 4 alternative ways to run __treesimulator__ on your computer:
  with [docker](https://www.docker.com/community-edition),
  [apptainer](https://apptainer.org/),
  in Python3, or via command line (requires installation with Python3).




  You could either install python (version 3.6 or higher) system-wide and then install treesimulator via pip:
  ```bash
  sudo apt install -y python3 python3-pip python3-setuptools python3-distutils
  pip3 install treesimulator
  ```

  or alternatively, you could install python (version 3.6 or higher) and treesimulator via [conda](https://conda.io/docs/) (make sure that conda is installed first).

  (Optional) to install treesimulator in a new conda environment (e.g., called _phyloenv_ below), first create and activate the environment:
  ```bash
  conda create --name phyloenv python=3.6
  conda activate phyloenv
  ```

  Install treesimulator with conda
  ```bash
  conda install treesimulator
  ```



  If you installed __treesimulator__ in a conda environment (here named _phyloenv_), do not forget to first activate it, e.g.

  ```bash
  conda activate phyloenv
  ```



  The following command simulates a tree with 200-500 tips under the BD model, with λ=0.5, ψ=0.25, p=0.5,
  and saves it to the file tree.nwk, while saving the parameters to the comma-separated file params.csv:
  ```bash
  generate_bd --min_tips 200 --max_tips 500 \
  --la 0.5 --psi 0.25 --p 0.5 \
  --nwk tree.nwk --log params.csv
  ```
  The following command simulates a tree with 200-500 tips under the BD-CT model, with λ=0.5, ψ=0.25, p=0.5, φ=2.5, υ=0.2,
  and allowing to notify only the most recent contact of each sampled index case.
  The simulated tree is saved to the file tree.nwk, while the model parameters are saved to the comma-separated file params.csv:
  ```bash
  generate_bd --min_tips 200 --max_tips 500 \
  --la 0.5 --psi 0.25 --p 0.5 \
  --phi 2.5 --upsilon 0.2 --max_notified_contacts 1 \
  --nwk tree.nwk --log params.csv
  ```
  To see detailed options, run:
  ```bash
  generate_bd --help
  ```


  The following command simulates a tree with 200-500 tips under the BDEI model, with μ=1, λ=0.5, ψ=0.25, p=0.5,
  and saves it to the file tree.nwk, while saving the parameters to the comma-separated file params.csv:
  ```bash
  generate_bdei --min_tips 200 --max_tips 500 \
  --mu 1 --la 0.5 --psi 0.25 --p 0.5 \
  --nwk tree.nwk --log params.csv
  ```
  The following command simulates a tree with 200-500 tips under the BDEI-CT model, with μ=1, λ=0.5, ψ=0.25, p=0.5, φ=2.5, υ=0.2,
  and allowing to notify only the most recent contact of each sampled index case.
  The simulated tree is saved to the file tree.nwk, while the model parameters are saved to the comma-separated file params.csv:
  ```bash
  generate_bdei --min_tips 200 --max_tips 500 \
  --mu 1 --la 0.5 --psi 0.25 --p 0.5 \
  --phi 2.5 --upsilon 0.2 --max_notified_contacts 1 \
  --nwk tree.nwk --log params.csv
  ```
  To see detailed options, run:
  ```bash
  generate_bdei --help
  ```



  The following command simulates a tree with 200-500 tips under the BDSS model,
  with λ<sub>nn</sub>=0.1, λ<sub>ns</sub>=0.3, λ<sub>sn</sub>=0.5, λ<sub>ss</sub>=1.5, ψ=0.25, p=0.5,
  and saves it to the file tree.nwk, while saving the parameters to the comma-separated file params.csv:
  ```bash
  generate_bdss --min_tips 200 --max_tips 500 \
  --la_nn 0.1 --la_ns 0.3 --la_sn 0.5 --la_ss 1.5 --psi 0.25 --p 0.5 \
  --nwk tree.nwk --log params.csv
  ```
  The following command simulates a tree with 200-500 tips under the BDSS-CT model,
  with λ<sub>nn</sub>=0.1, λ<sub>ns</sub>=0.3, λ<sub>sn</sub>=0.5, λ<sub>ss</sub>=1.5, ψ=0.25, p=0.5, φ=2.5, υ=0.2,
  and allowing to notify only the most recent contact of each sampled index case.
  The simulated tree is saved to the file tree.nwk, while the model parameters are saved to the comma-separated file params.csv:
  ```bash
  generate_bdss --min_tips 200 --max_tips 500 \
  --la_nn 0.1 --la_ns 0.3 --la_sn 0.5 --la_ss 1.5 --psi 0.25 --p 0.5 \
  --phi 2.5 --upsilon 0.2 --max_notified_contacts 1 \
  --nwk tree.nwk --log params.csv
  ```
  To see detailed options, run:
  ```bash
  generate_bdss --help
  ```


  The following command simulates a tree with 200-500 tips under a generic MTBD model, with two states A and B,
  with μ<sub>aa</sub>=0.5, μ<sub>ab</sub>=0.6, μ<sub>ba</sub>=0.7, μ<sub>bb</sub>=0.8,
  λ<sub>aa</sub>=0.1, λ<sub>ab</sub>=0.2, λ<sub>ba</sub>=0.3, λ<sub>bb</sub>=0.4,
  ψ<sub>a</sub>=0.05, ψ<sub>b</sub>=0.08,
  p=<sub>a</sub>0.15, p=<sub>b</sub>0.65,
  and saves it to the file tree.nwk, while saving the parameters to the comma-separated file params.csv:
  ```bash
  generate_mtbd --min_tips 200 --max_tips 500 \
  --states A B \
  --transition_rates 0.5 0.6 0.7 0.8 \
  --transmission_rates 0.1 0.2 0.3 0.4 \
  --removal_rates 0.05 0.08 \
  --sampling_probabilities 0.15 0.65 \
  --nwk tree.nwk --log params.csv
  ```
  The following command simulates a tree with 200-500 tips under a generic MTBD model, with two states A and B,
  with μ<sub>aa</sub>=0.5, μ<sub>ab</sub>=0.6, μ<sub>ba</sub>=0.7, μ<sub>bb</sub>=0.8,
  λ<sub>aa</sub>=0.1, λ<sub>ab</sub>=0.2, λ<sub>ba</sub>=0.3, λ<sub>bb</sub>=0.4,
  ψ<sub>a</sub>=0.05, ψ<sub>b</sub>=0.08,
  p=<sub>a</sub>0.15, p=<sub>b</sub>0.65,
  φ=2.5, υ=0.2,
  and allowing to notify only the most recent contact of each sampled index case.
  The simulated tree is saved to the file tree.nwk, while the model parameters are saved to the comma-separated file params.csv:
  ```bash
  generate_mtbd --min_tips 200 --max_tips 500 \
  --states A B \
  --transition_rates 0.5 0.6 0.7 0.8 \
  --transmission_rates 0.1 0.2 0.3 0.4 \
  --removal_rates 0.05 0.08 \
  --sampling_probabilities 0.15 0.65 \
  --phi 2.5 --upsilon 0.2 --max_notified_contacts 1 \
  --nwk tree.nwk --log params.csv
  ```
  To see detailed options, run:
  ```bash
  generate_mtbd --help
  ```



  To simulate trees with 200-500 tips under the above models and settings:

  ```python3
  from treesimulator.generator import generate
  from treesimulator import save_forest
  from treesimulator.mtbd_models import Model, BirthDeathModel, BirthDeathExposedInfectiousModel, BirthDeathWithSuperSpreadingModel, CTModel


  bd_model = BirthDeathModel(p=0.5, la=0.5, psi=0.25)
  print(bd_model.get_epidemiological_parameters())
  [bd_tree], _, _ = generate(bd_model, min_tips=200, max_tips=500)
  save_forest([bd_tree], 'BD_tree.nwk')
  bdpn_model = CTModel(model=bd_model, upsilon=0.2, notified_removal_rate=2.5)
  [bdpn_tree], _, _ = generate(bdpn_model, min_tips=200, max_tips=500)
  save_forest([bdpn_tree], 'BDCT_tree.nwk')


  bdei_model = BirthDeathExposedInfectiousModel(p=0.5, mu=1, la=0.5, psi=0.25)
  print(bdei_model.get_epidemiological_parameters())
  [bdei_tree], _, _ = generate(bdei_model, min_tips=200, max_tips=500)
  save_forest([bdei_tree], 'BDEI_tree.nwk')
  bdeipn_model = CTModel(model=bdei_model, upsilon=0.2, notified_removal_rate=2.5)
  [bdeipn_tree], _, _ = generate(bdeipn_model, min_tips=200, max_tips=500)
  save_forest([bdeipn_tree], 'BDEICT_tree.nwk')


  bdss_model = BirthDeathWithSuperSpreadingModel(p=0.5, la_nn=0.1, la_ns=0.3, la_sn=0.5, la_ss=1.5, psi=0.25)
  print(bdss_model.get_epidemiological_parameters())
  [bdss_tree], _, _ = generate(bdss_model, min_tips=200, max_tips=500)
  save_forest([bdss_tree], 'BDSS_tree.nwk')
  bdsspn_model = CTModel(model=bdss_model, upsilon=0.2, notified_removal_rate=2.5)
  [bdsspn_tree], _, _ = generate(bdsspn_model, min_tips=200, max_tips=500)
  save_forest([bdsspn_tree], 'BDSSCT_tree.nwk')


  mtbd_model = Model(states=['A', 'B'], transition_rates=[[0.5, 0.6], [0.7, 0.8]],
                     transmission_rates=[[0.1, 0.2], [0.3, 0.4]],
                     removal_rates=[0.05, 0.08], ps=[0.15, 0.65])
  [mtbd_tree], _, _ = generate(mtbd_model, min_tips=200, max_tips=500)
  save_forest([mtbd_tree], 'MTBD_tree.nwk')
  mtbdpn_model = CTModel(model=mtbd_model, upsilon=0.2, notified_removal_rate=2.5)
  [mtbdpn_tree], _, _ = generate(mtbdpn_model, min_tips=200, max_tips=500)
  save_forest([mtbdpn_tree], 'MTBDCT_tree.nwk')
  ```



  Once [apptainer](https://apptainer.org/docs/user/latest/quick_start.html#installation) is installed,
  run the following command:

  ```bash
  apptainer run docker://evolbioinfo/treesimlator
  ```

  This will launch a terminal session within the container,
  in which you can run treesimulator following the instructions for the command line ("Basic usage in a command line") above.


pkgId: 99842c42a8c84d56e4ffa5ba941288d01aac8769a96aff60f5feeab92f71aaf6
name: python-tremolo-help
arch: noarch
version: 0.0.850
epoch: 0
release: 1
summary: Development documents and examples for tremolo
url: https://github.com/nggit/tremolo
rpm_license: MIT License
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tremolo-0.0.850-1.src.rpm
location_href: Packages/python-tremolo-help-0.0.850-1.noarch.rpm
checksum_type: sha256
description:
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=nggit_tremolo&metric=coverage)](https://sonarcloud.io/summary/new_code?id=nggit_tremolo)
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nggit_tremolo&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nggit_tremolo)

  Tremolo is a [stream-oriented](https://nggit.github.io/tremolo-docs/yield.html), asynchronous, programmable HTTP server written in pure Python. It can also serve as an [ASGI server](#asgi-server).

  Tremolo provides a common routing functionality to some unique features such as download/upload speed limiters, etc. While maintaining its simplicity and performance.

  Being built with a stream in mind, Tremolo tends to use `yield` instead of `return` in route handlers.

  ```python
  @app.route('/hello')
  async def hello_world(**server):
      yield b'Hello '
      yield b'world!'
  ```

  You can take advantage of this to serve/generate big files efficiently:

  ```python
  @app.route('/my/url/speedtest.bin')
  async def my_big_data(**server):
      response = server['response']
      buffer_size = 16384

      response.set_content_type('application/octet-stream')

      with open('/dev/random', 'rb') as f:
          chunk = True

          while chunk:
              chunk = f.read(buffer_size)
              yield chunk
  ```

  And other use cases…


  Tremolo is only suitable for those who value [minimalism](https://en.wikipedia.org/wiki/Minimalism_%28computing%29) and stability over features.

  With only **3k** lines of code, with **no dependencies** other than the [Python Standard Library](https://docs.python.org/3/library/index.html), it gives you:

  * HTTP/1.x with [WebSocket support](https://nggit.github.io/tremolo-docs/websocket.html)
  * Keep-Alive connections with [configurable limit](https://nggit.github.io/tremolo-docs/configuration.html#keepalive_connections)
  * Stream chunked uploads
  * [Stream multipart uploads](https://nggit.github.io/tremolo-docs/body.html#multipart)
  * Download/upload speed throttling
  * [Resumable downloads](https://nggit.github.io/tremolo-docs/resumable-downloads.html)
  * Framework features; routing, middleware, etc.
  * ASGI server
  * PyPy compatible


  Here is a complete *hello world* example in case you missed the usual `return`.

  ```python
  from tremolo import Application

  app = Application()

  @app.route('/hello')
  async def hello_world(**server):
      return 'Hello world!', 'latin-1'


  if __name__ == '__main__':
      app.run('0.0.0.0', 8000, debug=True)
  ```

  Well, `latin-1` on the right side is not required. The default is `utf-8`.

  You can save it as `hello.py` and just run it with `python3 hello.py`.

  Your first *hello world* page with Tremolo will be at http://localhost:8000/hello.


  Tremolo is an HTTP Server framework. You can build abstractions on top of it, say an ASGI server.

  In fact, Tremolo already has ASGI server (plus WebSocket) implementation.

  So you can immediately use existing [ASGI applications / frameworks](https://asgi.readthedocs.io/en/latest/implementations.html#application-frameworks), behind Tremolo (ASGI server).

  For example, If a minimal ASGI application with the name `example.py`:

  ```python
  async def app(scope, receive, send):
      assert scope['type'] == 'http'

      await send({
          'type': 'http.response.start',
          'status': 200,
          'headers': [
              (b'content-type', b'text/plain')
          ]
      })

      await send({
          'type': 'http.response.body',
          'body': b'Hello world!'
      })
  ```

  Then you can run as follows:

  ```
  python3 -m tremolo --debug --bind 127.0.0.1:8000 example:app
  ```

  To see more available options:

  ```
  python3 -m tremolo --help
  ```

  It's also possible to run the ASGI server programmatically ([example with uvloop](https://github.com/nggit/tremolo/blob/main/example_uvloop.py)):

  ```
  python3 example_uvloop.py
  ```


  The first thing to note is that Tremolo is a pure Python server framework.

  As a pure Python server framework, it is hard to find a comparison.
  Because most servers/frameworks today are full of steroids like `httptools`, `uvloop`, Rust, etc.

  You can try comparing with [Uvicorn](https://www.uvicorn.org/) with the following option (disabling steroids to be fair):

  ```
  uvicorn --loop asyncio --http h11 --log-level error example:app
  ```

  vs

  ```
  python3 -m tremolo --log-level ERROR example:app
  ```

  You will find that Tremolo is reasonably fast.

  However, it should be noted that bottlenecks often occur on the application side.
  Which means that in real-world usage, throughput reflects more on the application than the server.


  Tremolo utilizes `SO_REUSEPORT` (Linux 3.9+) to load balance worker processes.

  ```python
  app.run('0.0.0.0', 8000, worker_num=2)
  ```

  Tremolo can also listen to multiple ports in case you are using an external load balancer like Nginx / HAProxy.

  ```python
  app.listen(8001)
  app.listen(8002)

  app.run('0.0.0.0', 8000)
  ```

  You can even get higher concurrency with [PyPy](https://www.pypy.org/) or [uvloop](https://magic.io/blog/uvloop-blazing-fast-python-networking/):

  ```
  python3 -m tremolo --loop uvloop --log-level ERROR example:app
  ```

  See: [--loop](https://nggit.github.io/tremolo-docs/configuration.html#loop)


  ```
  python3 -m pip install --upgrade tremolo
  ```


  Just run `python3 alltests.py` for all tests. Or individual *test_\*.py* in the [tests/](https://github.com/nggit/tremolo/tree/main/tests) folder, for example `python3 tests/test_cli.py`.

  If you also want measurements with [coverage](https://coverage.readthedocs.io/):

  ```
  coverage run alltests.py
  coverage combine
  coverage report
  coverage html # to generate html reports
  ```


  MIT License


pkgId: 3194da6ca301457c2e137179322654317a911a863eff9f509d54468b791aa485
name: python-tricc-oo-help
arch: noarch
version: 1.1.5
epoch: 0
release: 1
summary: Development documents and examples for tricc-oo
url: https://github.com/SwissTPH/tricc
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tricc-oo-1.1.5-1.src.rpm
location_href: Packages/python-tricc-oo-help-1.1.5-1.noarch.rpm
checksum_type: sha256
description:
  **Start Node**
  This node type represents the beginning of a process. It requires a label and can have attributes like process, parent, and form_id.

  **Activity Start Node**
  Marking the start of an activity, this node type needs both a label and a name. It can have attributes such as parent and instance.

  **Note Nodes**
  This node type are used for providing  information. Note nodes require both a label and a name,.

  **Selection Nodes**
  There are three types of selection nodes:
  - Select One: For single-choice selections
  - Select Multiple: For multiple-choice selections
  - Select Yes/No: For binary choices

  All these nodes require a label, name, and list_name. They can have attributes like required, save, filter, constraint, and constraint_message.

  **Numeric Input Nodes**
  Decimal and Integer nodes are used for numeric input. They require a label and name, and can have attributes like min, max, constraint, save, constraint_message, and required.

  **Text and Date Nodes**
  These nodes are for text input and date selection. Both require a label and name.

  **Calculation Nodes**
  Add, Count, and Calculate nodes are used for various calculations. They require a label and name, and can have save and expression attributes

  **Flow Control Nodes**
  Rhombus and Wait nodes are used for flow control. They require a reference, name, and label, and can have save and expression attributes.

  **Exclusive Node**
  This node type doesn't have any mandatory attributes or specific attributes defined.

  **Not Available Node**
  Used to indicate unavailability, this node requires a label, name, and list_name.

  **Link Nodes**
  Link Out and Link In nodes are used for creating connections. Link Out requires a reference, label, and name, while Link In only needs a label and name.

  **Go To Node**
  This node is used for navigation. It requires a link, label, and name, and can have an instance attribute.

  **End Nodes**
  End and Activity End nodes mark the conclusion of processes or activities.

  **Bridge Node**
  This node can have a label attribute but doesn't have any mandatory attributes.

  **Diagnosis Node**
  Used for diagnostic purposes, this node requires a name and label



  Node can be enriched with message and media, simply add the media on the draw.io andlink them with an edge

  **Image Node**
  Used to add image to a question

  **Hint Message Node**
  Used to add an hint message to a question, need a label

  **Help Message Node**
  Used to add an help message to a question, need a label



  **expression**
  replace the calcualte deducted by inputs

  **default**
  not supported yet

  **save**
  will create a calculate with the same name
  - obs: observation: save the option as a calcualte obs_[name of the option]
    - can be written obs.[othername].[snomedCode]
  - diag: diagnostic/classification save the option as a calcualte diag_[name of the option]
  - flag: calculate save the option as a calcualte is_[name of the option]




  The edge are in general labeless unless for :
      - after a select multiple: can setup quick rhombus for the number of choice selected, an opperator is required (<>=) in the edge label
      - after a yes/no quesiton:  'Yes', 'No', 'Follow' (translation can be added in the code )
      - before a calculate to put weight: integer only






  Activity instances: if there is more that 1 instance of a single actity then the 1+ activity will be displayed only if the previous one were not, to do that the GoTO node are replaced by a path and a rombhus, the path got to the activitvy and rhombus and the next node (if any) are attached to the rhombus that is use to wait that the activity

  the node following an 1+ activity will be display after the activy OR instead of the activity

  Select multiple: if followed by a calculate (rhombus included) the calculate will be equal to the number of selected option BUT opt_none
  if not a calculate then relevance will be used unless it is "required" then condition will be at least 1 selection

  the Rhombus act as an AND between its imputs and its reference BUT it is an OR beween the inputs
  (input1 OR input2 OR input3) AND reference





  the flow required at least 1 main start node, but in case of cdss output strategy , several could be used given that they have a 'process' atrribute

  here is the list of the CPG process, this will be the execution oder too:
  - **registration**,
  - **triage**,
  - **emergency-care**,
  - **local-urgent-care**,
  - **actue-tertiary-care**,
  - **history-and-physical**,
  - **diagnostic-testing**,
  - **determine-diagnosis**,
  - **provide-counseling**,
  - **dispense-medications**,
  - **monitor-and-follow-up-of-patient**,
  - **alerts-reminders-education**,
  - **discharge-referral-of-patient**,
  - **charge-for-service**,
  - **record-and-report**



  https://jgraph.github.io/drawio-tools/tools/convert.html

  option can have only incoming edge from images to be placed as option$








   - Non or No in an egde will generate a negate node
   - save adds a calcualte
   - a rhombus will generate a calcualte using the reference (can you the label as a test, either with comparaisin or option selected with [option label])



  Then we calculate based on the previous nodes: [get_prev_node_expression]
      - if a "fake" calculate (Rhombus, exclusion) then get the underlying expression (should not depend of Calcualte = true) [get_calculation_terms]
      - if a Select, manage it as a calculate too (should not depend of Calcualte = true) [get_calculation_terms]
      - else get the expression via  [get_calculation_terms] [get_prev_node_expression , calculate = False] -> get_node_expression for the prev node


pkgId: a802b98c4e5d9b1692e102c39d939a510867eea3e68b877c2b5c10576c10d37b
name: python-trig-help
arch: noarch
version: 0.1.0
epoch: 0
release: 1
summary: Development documents and examples for trig
url: https://pypi.org/project/trig/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trig-0.1.0-1.src.rpm
location_href: Packages/python-trig-help-0.1.0-1.noarch.rpm
checksum_type: sha256
description:
  `trig` is a package that provides a variety of common and lesser-known
  trigonometric functions.

  The included functions are:

  - sine (`sin`)
  - cosine (`cos`)
  - tangent (`tan`)
  - secant (`sec`)
  - cosecant (`csc`)
  - cotangent (`cot`)
  - versine (`ver`)
  - coversine (`cvs`)
  - vercosine (`vcs`)
  - covercosine (`cvc`)
  - haversine (`hvs`)
  - hacoversine (`hcv`)
  - havercosine (`hvc`)
  - hacovercosine (`hcc`)
  - exsecant (`exs`)
  - excosecant (`exc`)
  - chord (`crd`)

  each of which also has a hyperbolic (suffixed with `h`), inverse (prefixed
  with `a`) and inverse hyperbolic variant.


pkgId: 9e2c7c91ad7812aed21638d90aef152cfed04435f6d672a69287f0f8970761c5
name: python-trinityml-help
arch: noarch
version: 0.0.12
epoch: 0
release: 1
summary: Development documents and examples for trinityml
url: https://github.com/roosterhr/gg_python_sdk
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trinityml-0.0.12-1.src.rpm
location_href: Packages/python-trinityml-help-0.0.12-1.noarch.rpm
checksum_type: sha256
description:
  To install the Trinity package, run the following command:
  ```
  pip install trinityml
  ```


  ```
  export TRINITY_SECRET_KEY="your_secret_key"
  export TRINITY_PUBLIC_KEY="your_public_key"
  export TRINITY_HOST="http://your_trinity_host"
  ```


  To use the record function, ensure that you have properly set up your environment and then call the function as shown below:

  ```

  import trinityml


  trinityml.record(
      experiment_name=experiment_name,
      questions=questions,
      contexts=contexts,
      generated_prompts=generated_prompts,
      answers=answers,
      ground_truths=ground_truths,
      model_temperature=model_temperature,
      top_k=top_k,
      model_name=model_name,
      prompt_template=prompt_template
  )


pkgId: f19bbd8dc261571128119a0e39cbd17bc6bcec1c5a422b99921cd6af384b1eb2
name: python-trivialai-help
arch: noarch
version: 0.1.7
epoch: 0
release: 1
summary: Development documents and examples for trivialai
url: https://github.com/inaimathi/trivialai
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trivialai-0.1.7-1.src.rpm
location_href: Packages/python-trivialai-help-0.1.7-1.noarch.rpm
checksum_type: sha256
description:
  _(A set of `requests`-based, trivial bindings for AI models)_



  ```
  $ pip install pytrivialai
  $ python
  >>> from trivialai import claude, gcp, ollama, chatgpt
  >>>
  ```





  ```
  >>> client = ollama.Ollama("gemma2:2b", "http://localhost:11434/")
  >>> client.generate("This is a test message. Use the word 'platypus' in your response.", "Hello there! :D").content
  'Hey!  Did you know platypuses lay eggs and have webbed feet? Pretty cool, huh? 😁'
  >>> client.generate_json("This is a test message. Use the word 'platypus' in your response.", "Generate a list of animal names in JSON format. Return [Name] and no other commentary").content
  [{'name': 'Platypus'}, {'name': 'Eagle'}, {'name': 'Elephant'}, {'name': 'Giraffe'}, {'name': 'Lion'}, {'name': 'Tiger'}, {'name': 'Zebra'}, {'name': 'Dolphin'}, {'name': 'Whale'}, {'name': 'Bear'}, {'name': 'Wolf'}, {'name': 'Dog'}, {'name': 'Cat'}, {'name': 'Monkey'}]
  >>>
  ```



  ```
  >>> client = claude.Claude("claude-3-5-sonnet-20240620", os.environ["ANTHROPIC_API_KEY"])
  >>> client.generate("This is a test message. Use the word 'platypus' in your response.", "Hello there! :D").content
  "Hello! It's nice to meet you. I hope you're having a fantastic day. Since you mentioned using a specific word, I'll incorporate it here: Did you know that the platypus is one of the few mammals that can produce venom? It's quite an unusual and fascinating creature!"
  >>>
  ```



  ```
  >>> client = gcp.GCP("gemini-1.5-flash-001", "/path/to/your/gcp_creds.json", "us-central1")
  >>> client.generate("This is a test message. Use the word 'platypus' in your response.", "Hello there! :D").content
  "Hello! :D It's great to hear from you. Did you know platypuses are one of the few mammals that lay eggs? 🥚  They are truly fascinating creatures!  What can I help you with today? 😊"
  >>>
  ```



  ```
  >>> client = chatgpt.ChatGPT("gpt-3.5-turbo", os.environ["OPENAI_API_KEY"])
  >>> client.generate("This is a test message. Use the word 'platypus' in your response.", "Hello there! :D").content
  'Hello! How are you today? By the way, did you know the platypus is one of the few mammals that lays eggs?'
  >>>
  ```



  ```
  >>> from src.trivialai import tools
  >>> client = ollama.Ollama("gemma2:2b", "http://localhost:11434/")
  >>> tls = tools.Tools()
  >>> from typing import Optional, List
  >>> def _screenshot(url: str, selectors: Optional[List[str]] = None) -> None:
      "Takes a url and an optional list of selectors. Takes a screenshot"
      print(f"GOT {url}, {selectors}!")
  ... ... ...
  >>> tls.define(_screenshot)
  True





  >>> tls.list()
  [{'name': '_screenshot', 'type': {'url': <class 'str'>, 'selectors': typing.Optional[typing.List[str]]}, 'description': 'Takes a url and an optional list of selectors. Takes a screenshot'}]
  >>> res = client.generate_tool_call(tls, "This space intentionally left blank.",  "Take a screenshot of the Google website and highlight the search box")
  >>> res.content
  {'functionName': '_screenshot', 'args': {'url': 'https://www.google.com', 'selectors': ['#search']}}
  >>> tls.call(res.content)
  GOT https://www.google.com, ['#search']!
  >>>
  ```


pkgId: 98431bb3c91b14677fbf76e68cbda1c639e471c800a054303060455a8deab24a
name: python-trl-fpo-help
arch: noarch
version: 0.0.6
epoch: 0
release: 1
summary: Development documents and examples for trl-fpo
url: https://github.com/huggingface/trl
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trl-fpo-0.0.6-1.src.rpm
location_href: Packages/python-trl-fpo-help-0.0.6-1.noarch.rpm
checksum_type: sha256
description:
  <div style="text-align: center">
  <img src="https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/trl_banner_dark.png">
  </div>


  > Full stack library to fine-tune and align large language models.

  <p align="center">
      <a href="https://github.com/huggingface/trl/blob/main/LICENSE">
          <img alt="License" src="https://img.shields.io/github/license/huggingface/trl.svg?color=blue">
      </a>
      <a href="https://huggingface.co/docs/trl/index">
          <img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/trl/index.svg?down_color=red&down_message=offline&up_message=online">
      </a>
      <a href="https://github.com/huggingface/trl/releases">
          <img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/trl.svg">
      </a>
  </p>




  The `trl` library is a full stack tool to fine-tune and align transformer language and diffusion models using methods such as Supervised Fine-tuning step (SFT), Reward Modeling (RM) and the Proximal Policy Optimization (PPO) as well as Direct Preference Optimization (DPO).

  The library is built on top of the [`transformers`](https://github.com/huggingface/transformers) library and thus allows to use any model architecture available there.




  - **`Efficient and scalable`**:
      - [`accelerate`](https://github.com/huggingface/accelerate) is the backbone of `trl` which allows to scale model training from a single GPU to a large scale multi-node cluster with methods such as DDP and DeepSpeed.
      - [`PEFT`](https://github.com/huggingface/peft) is fully integrated and allows to train even the largest models on modest hardware with quantisation and methods such as LoRA or QLoRA.
      - [`unsloth`](https://github.com/unslothai/unsloth) is also integrated and allows to significantly speed up training with dedicated kernels.
  - **`CLI`**: With the [CLI](https://huggingface.co/docs/trl/clis) you can fine-tune and chat with LLMs without writing any code using a single command and a flexible config system.
  - **`Trainers`**: The Trainer classes are an abstraction to apply many fine-tuning methods with ease such as the [`SFTTrainer`](https://huggingface.co/docs/trl/sft_trainer), [`FPOTrainer`](https://huggingface.co/docs/trl/trainer#trl.FPOTrainer), [`RewardTrainer`](https://huggingface.co/docs/trl/reward_trainer), [`PPOTrainer`](https://huggingface.co/docs/trl/trainer#trl.PPOTrainer), [`CPOTrainer`](https://huggingface.co/docs/trl/trainer#trl.CPOTrainer), and [`ORPOTrainer`](https://huggingface.co/docs/trl/trainer#trl.ORPOTrainer).
  - **`AutoModels`**: The [`AutoModelForCausalLMWithValueHead`](https://huggingface.co/docs/trl/models#trl.AutoModelForCausalLMWithValueHead) & [`AutoModelForSeq2SeqLMWithValueHead`](https://huggingface.co/docs/trl/models#trl.AutoModelForSeq2SeqLMWithValueHead) classes add an additional value head to the model which allows to train them with RL algorithms such as PPO.
  - **`Examples`**: Train GPT2 to generate positive movie reviews with a BERT sentiment classifier, full RLHF using adapters only, train GPT-j to be less toxic, [StackLlama example](https://huggingface.co/blog/stackllama), etc. following the [examples](https://github.com/huggingface/trl/tree/main/examples).




  Install the library with `pip`:
  ```bash
  pip install trl
  ```


  If you want to use the latest features before an official release you can install from source:
  ```bash
  pip install git+https://github.com/huggingface/trl.git
  ```


  If you want to use the examples you can clone the repository with the following command:
  ```bash
  git clone https://github.com/huggingface/trl.git
  ```



  You can use TRL Command Line Interface (CLI) to quickly get started with Supervised Fine-tuning (SFT), Direct Preference Optimization (DPO) and test your aligned model with the chat CLI:

  **SFT:**

  ```bash
  trl sft --model_name_or_path facebook/opt-125m --dataset_name imdb --output_dir opt-sft-imdb
  ```

  **DPO:**

  ```bash
  trl dpo --model_name_or_path facebook/opt-125m --dataset_name trl-internal-testing/hh-rlhf-helpful-base-trl-style --output_dir opt-sft-hh-rlhf
  ```

  **Chat:**

  ```bash
  trl chat --model_name_or_path Qwen/Qwen1.5-0.5B-Chat
  ```

  Read more about CLI in the [relevant documentation section](https://huggingface.co/docs/trl/main/en/clis) or use `--help` for more details.



  For more flexibility and control over the training, you can use the dedicated trainer classes to fine-tune the model in Python.



  This is a basic example of how to use the `SFTTrainer` from the library. The `SFTTrainer` is a light wrapper around the `transformers` Trainer to easily fine-tune language models or adapters on a custom dataset.

  ```python

  from datasets import load_dataset
  from trl import SFTTrainer


  dataset = load_dataset("imdb", split="train")


  trainer = SFTTrainer(
      "facebook/opt-350m",
      train_dataset=dataset,
      dataset_text_field="text",
      max_seq_length=512,
  )


  trainer.train()
  ```



  This is a basic example of how to use the `RewardTrainer` from the library. The `RewardTrainer` is a wrapper around the `transformers` Trainer to easily fine-tune reward models or adapters on a custom preference dataset.

  ```python

  from transformers import AutoModelForSequenceClassification, AutoTokenizer
  from trl import RewardTrainer


  model = AutoModelForSequenceClassification.from_pretrained("gpt2", num_labels=1)
  tokenizer = AutoTokenizer.from_pretrained("gpt2")

  ...


  trainer = RewardTrainer(
      model=model,
      tokenizer=tokenizer,
      train_dataset=dataset,
  )


  trainer.train()
  ```



  This is a basic example of how to use the `PPOTrainer` from the library. Based on a query the language model creates a response which is then evaluated. The evaluation could be a human in the loop or another model's output.

  ```python

  import torch
  from transformers import AutoTokenizer
  from trl import PPOTrainer, PPOConfig, AutoModelForCausalLMWithValueHead, create_reference_model
  from trl.core import respond_to_batch


  model = AutoModelForCausalLMWithValueHead.from_pretrained('gpt2')
  ref_model = create_reference_model(model)

  tokenizer = AutoTokenizer.from_pretrained('gpt2')
  tokenizer.pad_token = tokenizer.eos_token


  ppo_config = PPOConfig(batch_size=1, mini_batch_size=1)


  query_txt = "This morning I went to the "
  query_tensor = tokenizer.encode(query_txt, return_tensors="pt")


  response_tensor  = respond_to_batch(model, query_tensor)


  ppo_trainer = PPOTrainer(ppo_config, model, ref_model, tokenizer)



  reward = [torch.tensor(1.0)]


  train_stats = ppo_trainer.step([query_tensor[0]], [response_tensor[0]], reward)
  ```



  `FPOTrainer` is a trainer that uses [Direct Preference Optimization algorithm](https://huggingface.co/papers/2305.18290). This is a basic example of how to use the `FPOTrainer` from the library. The `FPOTrainer` is a wrapper around the `transformers` Trainer to easily fine-tune reward models or adapters on a custom preference dataset.

  ```python

  from transformers import AutoModelForCausalLM, AutoTokenizer
  from trl import FPOTrainer


  model = AutoModelForCausalLM.from_pretrained("gpt2")
  tokenizer = AutoTokenizer.from_pretrained("gpt2")

  ...


  trainer = FPOTrainer(
      model=model,
      tokenizer=tokenizer,
      train_dataset=dataset,
  )


  trainer.train()
  ```



  If you want to contribute to `trl` or customizing it to your needs make sure to read the [contribution guide](https://github.com/huggingface/trl/blob/main/CONTRIBUTING.md) and make sure you make a dev install:

  ```bash
  git clone https://github.com/huggingface/trl.git
  cd trl/
  make dev
  ```




  The PPO implementation largely follows the structure introduced in the paper **"Fine-Tuning Language Models from Human Preferences"** by D. Ziegler et al. \[[paper](https://huggingface.co/papers/1909.08593), [code](https://github.com/openai/lm-human-preferences)].


  DPO is based on the original implementation of **"Direct Preference Optimization: Your Language Model is Secretly a Reward Model"** by E. Mitchell et al. \[[paper](https://huggingface.co/papers/2305.18290), [code](https://github.com/eric-mitchell/direct-preference-optimization)]




  ```bibtex
  @misc{vonwerra2022trl,
    author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang},
    title = {TRL: Transformer Reinforcement Learning},
    year = {2020},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/huggingface/trl}}
  }
  ```


pkgId: 1ce548693173932dd3b7180957d7338eef86918158ba6c1605783b8f4e69a954
name: python-trl-help
arch: noarch
version: 0.13.0
epoch: 0
release: 1
summary: Development documents and examples for trl
url: https://github.com/huggingface/trl
rpm_license: Apache 2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trl-0.13.0-1.src.rpm
location_href: Packages/python-trl-help-0.13.0-1.noarch.rpm
checksum_type: sha256
description:
  <div style="text-align: center">
  <img src="https://huggingface.co/datasets/trl-internal-testing/example-images/resolve/main/images/trl_banner_dark.png" alt="TRL Banner">
  </div>

  <hr> <br>

  <h3 align="center">
      <p>A comprehensive library to post-train foundation models</p>
  </h3>

  <p align="center">
      <a href="https://github.com/huggingface/trl/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/huggingface/trl.svg?color=blue"></a>
      <a href="https://huggingface.co/docs/trl/index"><img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/trl/index.svg?down_color=red&down_message=offline&up_color=blue&up_message=online"></a>
      <a href="https://github.com/huggingface/trl/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/trl.svg"></a>
  </p>



  TRL is a cutting-edge library designed for post-training foundation models using advanced techniques like Supervised Fine-Tuning (SFT), Proximal Policy Optimization (PPO), and Direct Preference Optimization (DPO). Built on top of the [🤗 Transformers](https://github.com/huggingface/transformers) ecosystem, TRL supports a variety of model architectures and modalities, and can be scaled-up across various hardware setups.



  - **Efficient and scalable**:
      - Leverages [🤗 Accelerate](https://github.com/huggingface/accelerate) to scale from single GPU to multi-node clusters using methods like DDP and DeepSpeed.
      - Full integration with [`PEFT`](https://github.com/huggingface/peft) enables training on large models with modest hardware via quantization and LoRA/QLoRA.
      - Integrates [Unsloth](https://github.com/unslothai/unsloth) for accelerating training using optimized kernels.

  - **Command Line Interface (CLI)**: A simple interface lets you fine-tune and interact with models without needing to write code.

  - **Trainers**: Various fine-tuning methods are easily accessible via trainers like [`SFTTrainer`](https://huggingface.co/docs/trl/sft_trainer), [`DPOTrainer`](https://huggingface.co/docs/trl/dpo_trainer), [`RewardTrainer`](https://huggingface.co/docs/trl/reward_trainer), [`ORPOTrainer`](https://huggingface.co/docs/trl/orpo_trainer) and more.

  - **AutoModels**: Use pre-defined model classes like [`AutoModelForCausalLMWithValueHead`](https://huggingface.co/docs/trl/models#trl.AutoModelForCausalLMWithValueHead) to simplify reinforcement learning (RL) with LLMs.





  Install the library using `pip`:

  ```bash
  pip install trl
  ```



  If you want to use the latest features before an official release, you can install TRL from source:

  ```bash
  pip install git+https://github.com/huggingface/trl.git
  ```



  If you want to use the examples you can clone the repository with the following command:

  ```bash
  git clone https://github.com/huggingface/trl.git
  ```



  You can use the TRL Command Line Interface (CLI) to quickly get started with Supervised Fine-tuning (SFT) and Direct Preference Optimization (DPO), or vibe check your model with the chat CLI:

  **SFT:**

  ```bash
  trl sft --model_name_or_path Qwen/Qwen2.5-0.5B \
      --dataset_name trl-lib/Capybara \
      --output_dir Qwen2.5-0.5B-SFT
  ```

  **DPO:**

  ```bash
  trl dpo --model_name_or_path Qwen/Qwen2.5-0.5B-Instruct \
      --dataset_name argilla/Capybara-Preferences \
      --output_dir Qwen2.5-0.5B-DPO
  ```

  **Chat:**

  ```bash
  trl chat --model_name_or_path Qwen/Qwen2.5-0.5B-Instruct
  ```

  Read more about CLI in the [relevant documentation section](https://huggingface.co/docs/trl/main/en/clis) or use `--help` for more details.



  For more flexibility and control over training, TRL provides dedicated trainer classes to post-train language models or PEFT adapters on a custom dataset. Each trainer in TRL is a light wrapper around the 🤗 Transformers trainer and natively supports distributed training methods like DDP, DeepSpeed ZeRO, and FSDP.



  Here is a basic example of how to use the `SFTTrainer`:

  ```python
  from trl import SFTConfig, SFTTrainer
  from datasets import load_dataset

  dataset = load_dataset("trl-lib/Capybara", split="train")

  training_args = SFTConfig(output_dir="Qwen/Qwen2.5-0.5B-SFT")
  trainer = SFTTrainer(
      args=training_args,
      model="Qwen/Qwen2.5-0.5B",
      train_dataset=dataset,
  )
  trainer.train()
  ```



  Here is a basic example of how to use the `RewardTrainer`:

  ```python
  from trl import RewardConfig, RewardTrainer
  from datasets import load_dataset
  from transformers import AutoModelForSequenceClassification, AutoTokenizer

  tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
  model = AutoModelForSequenceClassification.from_pretrained(
      "Qwen/Qwen2.5-0.5B-Instruct", num_labels=1
  )
  model.config.pad_token_id = tokenizer.pad_token_id

  dataset = load_dataset("trl-lib/ultrafeedback_binarized", split="train")

  training_args = RewardConfig(output_dir="Qwen2.5-0.5B-Reward", per_device_train_batch_size=2)
  trainer = RewardTrainer(
      args=training_args,
      model=model,
      processing_class=tokenizer,
      train_dataset=dataset,
  )
  trainer.train()
  ```



  `RLOOTrainer` implements a [REINFORCE-style optimization](https://huggingface.co/papers/2402.14740) for RLHF that is more performant and memory-efficient than PPO. Here is a basic example of how to use the `RLOOTrainer`:

  ```python
  from trl import RLOOConfig, RLOOTrainer, apply_chat_template
  from datasets import load_dataset
  from transformers import (
      AutoModelForCausalLM,
      AutoModelForSequenceClassification,
      AutoTokenizer,
  )

  tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
  reward_model = AutoModelForSequenceClassification.from_pretrained(
      "Qwen/Qwen2.5-0.5B-Instruct", num_labels=1
  )
  ref_policy = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
  policy = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")

  dataset = load_dataset("trl-lib/ultrafeedback-prompt")
  dataset = dataset.map(apply_chat_template, fn_kwargs={"tokenizer": tokenizer})
  dataset = dataset.map(lambda x: tokenizer(x["prompt"]), remove_columns="prompt")

  training_args = RLOOConfig(output_dir="Qwen2.5-0.5B-RL")
  trainer = RLOOTrainer(
      config=training_args,
      processing_class=tokenizer,
      policy=policy,
      ref_policy=ref_policy,
      reward_model=reward_model,
      train_dataset=dataset["train"],
      eval_dataset=dataset["test"],
  )
  trainer.train()
  ```



  `DPOTrainer` implements the popular [Direct Preference Optimization (DPO) algorithm](https://huggingface.co/papers/2305.18290) that was used to post-train Llama 3 and many other models. Here is a basic example of how to use the `DPOTrainer`:

  ```python
  from datasets import load_dataset
  from transformers import AutoModelForCausalLM, AutoTokenizer
  from trl import DPOConfig, DPOTrainer

  model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
  tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
  dataset = load_dataset("trl-lib/ultrafeedback_binarized", split="train")
  training_args = DPOConfig(output_dir="Qwen2.5-0.5B-DPO")
  trainer = DPOTrainer(model=model, args=training_args, train_dataset=dataset, processing_class=tokenizer)
  trainer.train()
  ```



  If you want to contribute to `trl` or customize it to your needs make sure to read the [contribution guide](https://github.com/huggingface/trl/blob/main/CONTRIBUTING.md) and make sure you make a dev install:

  ```bash
  git clone https://github.com/huggingface/trl.git
  cd trl/
  pip install -e .[dev]
  ```



  ```bibtex
  @misc{vonwerra2022trl,
    author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
    title = {TRL: Transformer Reinforcement Learning},
    year = {2020},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/huggingface/trl}}
  }
  ```



  This repository's source code is available under the [Apache-2.0 License](LICENSE).


pkgId: d8eb3d35358e8df20b1f7e929b2985b18960a44a43ee44b4dd6cf9cae19f817b
name: python-trontxsize-help
arch: noarch
version: 1.1.0
epoch: 0
release: 1
summary: Development documents and examples for trontxsize
url: https://github.com/bitcart/trontxsize
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trontxsize-1.1.0-1.src.rpm
location_href: Packages/python-trontxsize-help-1.1.0-1.noarch.rpm
checksum_type: sha256
description:
  [![CircleCI](https://circleci.com/gh/bitcart/trontxsize.svg?style=svg)](https://circleci.com/gh/bitcart/trontxsize)
  [![Codecov](https://img.shields.io/codecov/c/github/bitcart/trontxsize?style=flat-square)](https://codecov.io/gh/bitcart/trontxsize)
  [![PyPI version](https://img.shields.io/pypi/v/trontxsize.svg?style=flat-square)](https://pypi.python.org/pypi/trontxsize/)

  In Tron (TRX) network, fee calculation algorithm is complex. And the most complex part of it is that it depends on transaction size.

  But there's no method existing to calculate it

  This library does just this:

  ```python
  import trontxsize

  print(trontxsize.get_tx_size({"raw_data": ..., "signatures": [...])) # matches bandwidth you see in block explorer
  ```

  How does it work? The library pre-compiled a trimmed-down version of Tron protobuf and uses it directly to calculate transaction size



  Copyright (C) 2022 MrNaif2018

  Licensed under the [MIT License](LICENSE)


pkgId: a6556c7b7a6a35d80c84bc889731de496e93e09938e6337f40673ed4be4fbb7e
name: python-truefoundry-help
arch: noarch
version: 0.5.1
epoch: 0
release: 1
summary: Development documents and examples for truefoundry
url: https://pypi.org/project/truefoundry/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-truefoundry-0.5.1-1.src.rpm
location_href: Packages/python-truefoundry-help-0.5.1-1.noarch.rpm
checksum_type: sha256
description:
  TrueFoundry library to help you interact with the platform programmatically by

  - Interacting with the deployments side of TrueFoundry, enabling you to manage workspaces, deployments, applications, and view logs.
  - Providing experiment tracking capabilities, allowing you to track ML experiments and interact with ML repositories within TrueFoundry.

  You can access the health of your service, monitoring links, deployed endpoints and track metadata and artifacts by logging on to TrueFoundry's dashboard.



  To install the `TrueFoundry CLI`, you can use pip:

  ```bash
  pip install truefoundry
  ```

  To install the `TrueFoundry CLI` with Workflow deployment features, you can use pip:

  ```bash
  pip install truefoundry[workflow]
  ```



  https://github.com/truefoundry/getting-started-examples



  https://docs.truefoundry.com/


pkgId: 979a6792262dd82997cfa2954097f9a7ca3ed69805e44bb16c01306d4b60988b
name: python-truelayer-signing-help
arch: noarch
version: 0.3.6
epoch: 0
release: 1
summary: Development documents and examples for truelayer-signing
url: https://github.com/TrueLayer/truelayer-signing/tree/main/python
rpm_license: Apache-2.0 or MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-truelayer-signing-0.3.6-1.src.rpm
location_href: Packages/python-truelayer-signing-help-0.3.6-1.noarch.rpm
checksum_type: sha256
description:
  Python package to produce & verify TrueLayer API requests signatures.


  ```
  pip install truelayer-signing
  ```



  ```python
  tl_signature = sign_with_pem(KID, PRIVATE_KEY) \
      .set_method(HttpMethod.POST) \
      .set_path(path) \
      .add_header("Idempotency-Key", idempotency_key) \
      .set_body(body) \
      .sign()
  ```
  See [full example](./examples/sign-request/).


  The `verify_with_jwks` function may be used to verify webhook `Tl-Signature` header signatures.

  ```python

  jws_header = extract_jws_header(webhook_signature).jku


  ensure_jku_allowed(jku)
  jwks = fetch_jwks(jku)


  verify_with_jwks(jwks, jws_header) \
      .set_method(HttpMethod.POST) \
      .set_path(path) \
      .add_headers(headers) \
      .set_body(body) \
      .verify(tl_signature)
  ```

  See [webhook server example](./examples/webhook-server/).


pkgId: b9fd44bc2b72eb828c7a54b640f7d8f950d3f182520122ae80f407503cbfe07d
name: python-truffles-help
arch: noarch
version: 0.1.1
epoch: 0
release: 1
summary: Development documents and examples for truffles
url: https://pypi.org/project/truffles/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-truffles-0.1.1-1.src.rpm
location_href: Packages/python-truffles-help-0.1.1-1.noarch.rpm
checksum_type: sha256
description:
  [![ci/tests](https://github.com/shoco-team/truffles/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/shoco-team/truffles/actions/workflows/ci-tests.yml) [![cd/release](https://github.com/shoco-team/truffles/actions/workflows/release-please.yml/badge.svg)](https://github.com/shoco-team/truffles/actions/workflows/release-please.yml) [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://docs.astral.sh/ruff/) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)

  An open-source framework that extends [playwright](https://playwright.dev) with automatic element detection, validation and structuring. Further utilities such as global caching of selectors reduce latency and cost.

  > **Note:** Currently only supported with async playwright.

  <!--<div align="center">
  | | |
  | --- | --- |
  | CI/CD | [![ci/tests](https://github.com/shoco-team/truffles/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/shoco-team/truffles/actions/workflows/ci-tests.yml) [![cd/release](https://github.com/shoco-team/truffles/actions/workflows/release-please.yml/badge.svg)](https://github.com/shoco-team/truffles/actions/workflows/release-please.yml) |
  | Meta | [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://docs.astral.sh/ruff/) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) |
  </div>-->

  <!-- | Docs |  | -->
  <!-- | Package | [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/truffles.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/truffles/) [![PyPI - Installs](https://img.shields.io/pypi/dm/truffles.svg?color=blue&label=Installs&logo=pypi&logoColor=gold)](https://pypi.org/project/truffles/) | -->



  ```

  $ pip install truffles

  ```

  After installation you may need to run `playwright install`. A more extensive introduction to the package can be found [here](https://github.com/shoco-team/truffles/examples/extract_list.ipynb).


  A common workflow that is fully automated by `truffles` is data extraction from list elements:

  ```python
  import truffles
  from pydantic import BaseModel

  await truffles.start()


  class Product(BaseModel):
      title: str = Field(description = "The name of the product")
      price: float = Field(description = "The main listed price")



  task = truffles.tasks.ListingTask(
      page="https://example.com/products",
      schema=Product
  )

  results = await task.run()
  ```



  The `page.tools` and `locator.tools` currently extend playwright with automatic list detection and structured element extraction. This makes all `truffles` code
  * Natively integrated with [playwright](https://playwright.dev)

  * Reusable across websites

  * Much more robust to page content and structure changes


  ```python
  page = truffles.wrap(browser)
  page.goto("https://example.com/products")


  item_list = await page.tools.get_main_list() # automatically finds main list on page


  task_list = [
      loc.tools.to_structure(Product) # structures locator content according to Product
      for loc in locators
  ]
  await asyncio.gather(task_list)
  ```



  The repo contains tools that implement common patterns for web automation. They are commonly powered by LLMs and have been extensively tested. These are:
  - Automatic List Detection (see `get_main_list`)

  - Intelligent & Robust Data Extraction (see `to_structure`)

  - Advanced Assertions (_under development_)

  - Autonomous Pagination (_under development_)

  - Support for Image Data Extraction (_under development_)


  Truffles is designed to be easily extensible. You can implement your own tools by inheriting from `BaseTool` and implementing the `execute` method.
  ```python

  from truffles.tools import BaseTool

  class ValidateElementAlignment(BaseTool):

      def execute(self, alignment_rule, prompt = None):

          
          pass

  ```



  The `StoreManager` is internally used by tools to cache and retrieve reusable context in automations. This greatly reduces the amount of LLM calls required.

  It operates mostly in the shadows and is automatically initialized when `truffles.start` is called, but it can also be initialized and accessed manually.
  ```python
  from truffles.context import StoreManager

  StoreManager.initialize()
  ```

  In the future, a publicly accessible context will be available to further reduce costs.



  Current development focuses on:
  - Improving current tools
  - Extending the functionality
  - Optimizing performance of `StoreManager`


pkgId: 35bf9209e5ebbf0133e9e521de49405952b8fca175be00f20e5ea4a89e725f8b
name: python-truss-help
arch: noarch
version: 0.9.55
epoch: 0
release: 1
summary: Development documents and examples for truss
url: https://truss.baseten.co
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-truss-0.9.55-1.src.rpm
location_href: Packages/python-truss-help-0.9.55-1.noarch.rpm
checksum_type: sha256
description:
  **The simplest way to serve AI/ML models in production**

  [![PyPI version](https://badge.fury.io/py/truss.svg)](https://badge.fury.io/py/truss)
  [![ci_status](https://github.com/basetenlabs/truss/actions/workflows/release.yml/badge.svg)](https://github.com/basetenlabs/truss/actions/workflows/release.yml)



  * **Write once, run anywhere:** Package and test model code, weights, and dependencies with a model server that behaves the same in development and production.
  * **Fast developer loop:** Implement your model with fast feedback from a live reload server, and skip Docker and Kubernetes configuration with a batteries-included model serving environment.
  * **Support for all Python frameworks**: From `transformers` and `diffusers` to `PyTorch` and `TensorFlow` to `TensorRT` and `Triton`, Truss supports models created and served with any framework.

  See Trusses for popular models including:

  * 🦙 [Llama 2 7B](https://github.com/basetenlabs/truss-examples/tree/main/llama/llama-2-7b-chat) ([13B](https://github.com/basetenlabs/truss-examples/tree/main/llama/llama-2-13b-chat)) ([70B](https://github.com/basetenlabs/truss-examples/tree/main/llama/llama-2-70b-chat))
  * 🎨 [Stable Diffusion XL](https://github.com/basetenlabs/truss-examples/tree/main/stable-diffusion/stable-diffusion-xl-1.0)
  * 🗣 [Whisper](https://github.com/basetenlabs/truss-examples/tree/main/whisper/whisper-truss)

  and [dozens more examples](https://github.com/basetenlabs/truss-examples/).



  Install Truss with:

  ```
  pip install --upgrade truss
  ```



  As a quick example, we'll package a [text classification pipeline](https://huggingface.co/docs/transformers/main_classes/pipelines) from the open-source [`transformers` package](https://github.com/huggingface/transformers).



  To get started, create a Truss with the following terminal command:

  ```sh
  truss init text-classification
  ```

  When prompted, give your Truss a name like `Text classification`.

  Then, navigate to the newly created directory:

  ```sh
  cd text-classification
  ```



  One of the two essential files in a Truss is `model/model.py`. In this file, you write a `Model` class: an interface between the ML model that you're packaging and the model server that you're running it on.

  There are two member functions that you must implement in the `Model` class:

  * `load()` loads the model onto the model server. It runs exactly once when the model server is spun up or patched.
  * `predict()` handles model inference. It runs every time the model server is called.

  Here's the complete `model/model.py` for the text classification model:

  ```python
  from transformers import pipeline


  class Model:
      def __init__(self, **kwargs):
          self._model = None

      def load(self):
          self._model = pipeline("text-classification")

      def predict(self, model_input):
          return self._model(model_input)
  ```



  The other essential file in a Truss is `config.yaml`, which configures the model serving environment. For a complete list of the config options, see [the config reference](https://truss.baseten.co/reference/config).

  The pipeline model relies on [Transformers](https://huggingface.co/docs/transformers/index) and [PyTorch](https://pytorch.org/). These dependencies must be specified in the Truss config.

  In `config.yaml`, find the line `requirements`. Replace the empty list with:

  ```yaml
  requirements:
    - torch==2.0.1
    - transformers==4.30.0
  ```

  No other configuration is needed.



  Truss is maintained by [Baseten](https://baseten.co), which provides infrastructure for running ML models in production. We'll use Baseten as the remote host for your model.

  Other remotes are coming soon, starting with AWS SageMaker.



  To set up the Baseten remote, you'll need a [Baseten API key](https://app.baseten.co/settings/account/api_keys). If you don't have a Baseten account, no worries, just [sign up for an account](https://app.baseten.co/signup/) and you'll be issued plenty of free credits to get you started.



  With your Baseten API key ready to paste when prompted, you can deploy your model:

  ```sh
  truss push
  ```

  You can monitor your model deployment from [your model dashboard on Baseten](https://app.baseten.co/models/).



  After the model has finished deploying, you can invoke it from the terminal.

  **Invocation**

  ```sh
  truss predict -d '"Truss is awesome!"'
  ```

  **Response**

  ```json
  [
    {
      "label": "POSITIVE",
      "score": 0.999873161315918
    }
  ]
  ```



  Truss is backed by Baseten and built in collaboration with ML engineers worldwide. Special thanks to [Stephan Auerhahn](https://github.com/palp) @ [stability.ai](https://stability.ai/) and [Daniel Sarfati](https://github.com/dsarfati) @ [Salad Technologies](https://salad.com/) for their contributions.

  We enthusiastically welcome contributions in accordance with our [contributors' guide](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md).


pkgId: bcec7b0302b1b3453251cdeea097333722677f3caa24449f7982faac67f53829
name: python-tryton-help
arch: noarch
version: 7.4.2
epoch: 0
release: 1
summary: Development documents and examples for tryton
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tryton-7.4.2-1.src.rpm
location_href: Packages/python-tryton-help-7.4.2-1.noarch.rpm
checksum_type: sha256
description:
  The desktop client of Tryton.
  Tryton is business software, ideal for companies of any size, easy to use,
  complete and 100% Open Source.
  It provides modularity, scalability and security.


pkgId: 00edd8fb4ff3e3af73da597724afb2ada3820adfc1ad91cf6a2970ce4131f263
name: python-trytond-account-dunning-email-help
arch: noarch
version: 7.4.1
epoch: 0
release: 1
summary: Development documents and examples for trytond-account-dunning-email
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-account-dunning-email-7.4.1-1.src.rpm
location_href: Packages/python-trytond-account-dunning-email-help-7.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Account Dunning Email Module


  The *Account Dunning Email Module* allows dunning levels to be set up so that
  an email is sent when the dunnings are processed.


pkgId: 01b6682ee80c72afca70d12b0820809a68f1ff2d2a2d7d821f4dd9f834dc01aa
name: python-trytond-account-es-sii-help
arch: noarch
version: 7.4.1
epoch: 0
release: 1
summary: Development documents and examples for trytond-account-es-sii
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-account-es-sii-7.4.1-1.src.rpm
location_href: Packages/python-trytond-account-es-sii-help-7.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Acounts Spanish SII Module


  The *Account Spanish SII Module* allow to send invoices to the `SII
  <https://sede.agenciatributaria.gob.es/Sede/iva/suministro-inmediato-informacion.html>`_
  portal.
  This is legal requirement for some Spanish Companies.


pkgId: 3e84e651940fbf35fecaa7e406d3c976818381bbcacfa183870c7f493bb6bd21
name: python-trytond-account-help
arch: noarch
version: 7.4.1
epoch: 0
release: 1
summary: Development documents and examples for trytond-account
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-account-7.4.1-1.src.rpm
location_href: Packages/python-trytond-account-help-7.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Account Module


  The *Account Module* defines the fundamentals needed for basic double entry
  accounting.
  It also includes templates for the `basic universal chart of accounts
  <https://www.ifrs-gaap.com/basic-universal-coa>`_, balance sheet and income
  statement.


pkgId: 82f0fa770584a44f678ef12ae0f024db90b8ae0438f74a0a0e076e2485bfa926
name: python-trytond-account-invoice-help
arch: noarch
version: 7.4.2
epoch: 0
release: 1
summary: Development documents and examples for trytond-account-invoice
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-account-invoice-7.4.2-1.src.rpm
location_href: Packages/python-trytond-account-invoice-help-7.4.2-1.noarch.rpm
checksum_type: sha256
description:
  Account Invoice Module


  The *Account Invoice Module* adds the concept of invoicing to Tryton.
  It allows the creation of customer and supplier invoices, and can handle the
  payment terms related to the invoices and show when they have been paid.


pkgId: 8adee8ffd7efccc5bac48103c2f71a63e43ab7fe97980c5d363f544364d28614
name: python-trytond-help
arch: noarch
version: 7.4.2
epoch: 0
release: 1
summary: Development documents and examples for trytond
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-7.4.2-1.src.rpm
location_href: Packages/python-trytond-help-7.4.2-1.noarch.rpm
checksum_type: sha256
description:
  The server of Tryton.
  Tryton is business software, ideal for companies of any size, easy to use,
  complete and 100% Open Source.
  It provides modularity, scalability and security.


pkgId: 44524582e7d039f11b3d6704d57a61f4df90d87aabbad1b2a1f274f19292be52
name: python-trytond-notification-email-help
arch: noarch
version: 7.4.1
epoch: 0
release: 1
summary: Development documents and examples for trytond-notification-email
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-notification-email-7.4.1-1.src.rpm
location_href: Packages/python-trytond-notification-email-help-7.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Notification Email Module


  The *Notification Email Module* allows you to define email templates that will
  be sent to a list of recipients when a trigger is fired on a record event.


pkgId: f8125e970c7b8e30596b5a9e46262c6f364c78a3727939f218a3189794ec9242
name: python-trytond-sale-credit-limit-help
arch: noarch
version: 7.4.1
epoch: 0
release: 1
summary: Development documents and examples for trytond-sale-credit-limit
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-sale-credit-limit-7.4.1-1.src.rpm
location_href: Packages/python-trytond-sale-credit-limit-help-7.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Sale Credit Limit


  The sale_credit_limit module adds confirmed sale but not yet invoiced to the
  "Credit Amount" of the Party and check the credit limit of the party when
  confirming a sale.


pkgId: ff8bf61623ee1d63af23e621809a82ed2a889aeae83d8abb368a4e49c6c8d8ea
name: python-trytond-sale-supply-drop-shipment-help
arch: noarch
version: 7.4.1
epoch: 0
release: 1
summary: Development documents and examples for trytond-sale-supply-drop-shipment
url: http://www.tryton.org/
rpm_license: GPL-3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-trytond-sale-supply-drop-shipment-7.4.1-1.src.rpm
location_href: Packages/python-trytond-sale-supply-drop-shipment-help-7.4.1-1.noarch.rpm
checksum_type: sha256
description:
  Sale Supply Drop Shipment Model


  The Sale Supply Drop Shipment module adds a drop shipment option on product
  supplier if "supply on request" is selected.
  When selected, the purchase request and the linked purchase have the address of
  customer as Delivery Address; at the confirmation of the purchase a drop
  shipment is created and linked to both the purchase and the sale.

  Drop Shipment
  *************

  A drop shipment is used when products are sent directly from the supplier to
  the customer without going through the warehouse.
  It is mainly composed of a supplier, a customer and a list of moves.

  The drop shipment can be in one of this states:

  * Draft

    All moves are in draft.

  * Waiting

    All moves are in draft, the synchronization between the moves of the supplier
    and the moves to the customer has occurred.

  * Shipped

    All moves from the supplier are done.

  * Done

    All moves are in state Done.

  * Cancelled

    All moves are cancelled.


pkgId: b972535c14063c21940c65acbb5f99fd53185c55944f4107d4c10d8a56f8009a
name: python-tsbot-help
arch: noarch
version: 1.6.0
epoch: 0
release: 1
summary: Development documents and examples for tsbot
url: https://pypi.org/project/tsbot/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tsbot-1.6.0-1.src.rpm
location_href: Packages/python-tsbot-help-1.6.0-1.noarch.rpm
checksum_type: sha256
description:
  Asynchronous Python framework to build **TeamSpeak 3 Server Query** bots



  - Modern Python `async` and `await` syntax
  - Secure connection through SSH
  - Ease of use query building
  - Built-in and configurable ratelimiter if no access to `query_ip_allowlist.txt`



  ```python
  from __future__ import annotations

  import asyncio

  from tsbot import TSBot, TSCtx, query


  bot = TSBot(
      username="USERNAME",
      password="PASSWORD",
      address="ADDRESS",
  )


  @bot.command("hello")
  async def hello_world(bot: TSBot, ctx: TSCtx):
      await bot.respond(ctx, f"Hello {ctx['invokername']}!")


  @bot.on("cliententerview")
  async def poke_on_enter(bot: TSBot, ctx: TSCtx):
      poke_query = query("clientpoke").params(clid=ctx["clid"], msg="Welcome to the server!")
      await bot.send(poke_query)


  asyncio.run(bot.run())
  ```

  **Check out [📁examples](https://github.com/jykob/TSBot/blob/main/examples) for more**



  **Python 3.10 or higher is required**

  Installing with pip:

  ```shell

  python3 -m pip install tsbot


  py -3 -m pip install tsbot
  ```

rpm_license:
  MIT License  Copyright (c) 2024 jykob  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 5f5dac45680e11024ad140e3140213603a8703857a3e9a03bef97631eb4115ba
name: python-tt4l-help
arch: noarch
version: 0.0.4
epoch: 0
release: 1
summary: Development documents and examples for tt4l
url: https://github.com/fjklqq/tt4l
rpm_license: Apache-2.0
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tt4l-0.0.4-1.src.rpm
location_href: Packages/python-tt4l-help-0.0.4-1.noarch.rpm
checksum_type: sha256
description:
  ```shell
  pip install tt4l
  ```





  find supported tasks

  ```shell
  tt4l tasks
  ```

  | Args                             | Task Name                        | Short Description                                                                                                                                                                                                                                                                                             |
  |----------------------------------|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | text_classification              | Text Classification              | Text classification is a common NLP task that assigns a label or class to text.                                                                                                                                                                                                                               |
  | token_classification             | Token Classification             | Token classification assigns a label to individual tokens in a sentence. One of the most common task is Named Entity Recognition (NER)。                                                                                                                                                                       |
  | universal_information_extraction | Universal Information Extraction | The Unified Information Extraction Framework (UIE) for general information extraction achieves unified modeling of tasks such as entity extraction,   relationship extraction, event extraction, and sentiment analysis, and enables good transferability and generalization ability between different tasks. |

  Show task description.
  `tt4l desc [TASK_TYPE]`
  Eg:

  ```shell
  tt4l desc text_classification
  ```



  `tt4l init [TASK_TYPE]`

  Eg:

  ```shell
  tt4l init text_classification
  ```

  **Modify the corresponding configuration**



  `tt4l train [TASK_TYPE]`

  Eg:

  ```shell
  tt4l train text_classification_task.yaml
  ```



  `tt4l predict [YAML]`

  Eg:

  ```shell
  tt4l predict text_classification_task.yaml
  ```



  `tt4l inference [TASK_TYPE] [*args]`


pkgId: d16cd49b00e6173c449340ec05577b6d183a1d7f8f14c6de310a3101950cdc52
name: python-tuber-client-help
arch: noarch
version: 0.17
epoch: 0
release: 1
summary: Development documents and examples for tuber-client
url: https://pypi.org/project/tuber-client/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tuber-client-0.17-1.src.rpm
location_href: Packages/python-tuber-client-help-0.17-1.noarch.rpm
checksum_type: sha256
description:
  Tuber_ is a C++ server and Python client for exposing an instrumentation
  control plane across a network.
  On a client, you can write Python code like this:
     >>> some_resource.increment([1, 2, 3, 4, 5])
     [2, 3, 4, 5, 6]
  Python or (more usually) C++. The C++ implementation might look like this:
     class SomeResource {
     public:
         std::vector<int> increment(std::vector<int> x) {
             std::ranges::for_each(x, [](int &n) { n++; });
             return x;
         };
     };
  On the client side, Python needs to know where to find the server. On the
  server side, the C++ code must be registered with pybind11 (just as any other
  pybind11 code) and the tuber server.  Other than that, however, there is no
  ceremony and no boilerplate.
  Its main features and design principles are:
  - Pythonic call styles, including \*args, \*\*kwargs, and DocStrings.
  - JSON and CBOR support for efficient and friendly serialization of return
    values.
  - "Less-is-more" approach to code. For example, Tuber uses pybind11_ and C++ as
    a shim between C and Python, because the combination gives us the shortest
    and most expressive way to produce the results we want. It pairs excellently
    with orjson_ (as a JSON interface) or cbor2_ (as a CBOR interface), which
    efficiently serialize (for example) NumPy_ arrays created in C++ across the
    network.
  - Schema-less RPC using standard-ish protocols (HTTP 1.1, JSON, CBOR, and
    something like JSON-RPC_). Avoiding a schema allows server and client code to
    be independently and seamlessly up- and downgraded, with differences between
    exposed APIs only visible at the sites where RPC calls are made.
  - A mature, quick-ish, third-party, low-overhead, low-prerequisite embedded
    webserver. Tuber uses libhttpserver_, which in turn, is a C++ wrapper around
    the well-established libmicrohttpd_. We use the thread-per-connection
    configuration because a single keep-alive connection with a single client is
    the expected "hot path"; C10K_-style server architectures wouldn't be better.
  - High performance when communicating with RPC endpoints, using:
    - HTTP/1.1 Keep-Alive to avoid single-connection-per-request overhead.  See
      `this Wikipedia page
      <https://en.wikipedia.org/wiki/HTTP_persistent_connection#HTTP_1.1>`_ for
      details.
    - A call API that (optionally) allows multiple RPC calls to be combined and
      dispatched together.
    - Client-side caches for remote properties (server-side constants)
    - Python 3.x's aiohttp_/asyncio_ libraries to asynchronously dispatch across
      multiple endpoints (e.g. multiple boards in a crate, each of which is an
      independent Tuber endpoint.)
  - A friendly interactive experience using Jupyter_/IPython_-style REPL
    environments. Tuber servers export metadata that can be used to provide
    DocStrings and tab-completion for RPC resources.
  - The ability to serve a web-based UI using static JavaScript, CSS, and HTML.
  Anti-goals of this Tuber server include the following:
  - No authentication/encryption is used. For now, network security is strictly
    out-of-scope. (Yes, it feels naïve to write this in 2022.)
  - The additional complexity of HTTP/2 and HTTP/3 protocols are not justified.
    HTTP/1.1 keep-alive obviates much of the performance gains promised by
    connection multiplexing.
  - The performance gains possible using a binary RPC protocol do not justify the
    loss of a human-readable, browser-accessible JSON protocol.
  - The use of newer, better languages than C++ (server side) or Python (client
    side).  The instruments Tuber targets are likely to be a polyglot stew, and I
    am mindful that every additional language or runtime reduces the project's
    accessibility to newcomers.  Perhaps pybind11_ will be eclipsed by something
    in Rust one day - for now, the ability to make casual cross-language calls is
    essential to keeping Tuber small. (Exception: the orjson JSON library is a
    wonderful complement to tuber and I recommend using them together!)
  Although the Tuber server hosts an embedded Python interpreter and can expose
  embedded resources coded in ordinary Python, it is intended to expose C/C++
  code. The Python interpeter provides a convenient, Pythonic approach to
  attribute and method lookup and dispatch without the overhead of a fully
  interpreted embedded runtime.
  Tuber is licensed using the 3-clause BSD license (BSD-3-Clause). This software
  is intended to be useful, and its licensing is intended to be pragmatic. If
  licensing is a stumbling block for you, please contact me at
  `gsmecher@threespeedlogic.com <mailto:gsmecher@threespeedlogic.com>`_.

rpm_license:
  Copyright (c) 2023-2024 Graeme Smecher <gsmecher@threespeedlogic.com> All rights reserved.  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.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  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.


pkgId: f7a1c48a1716f7543ee212a8bf61b9ab43df3406a879a3b77c11758b1c7768c7
name: python-tues-help
arch: noarch
version: 3.2.0
epoch: 0
release: 1
summary: Development documents and examples for tues
url: https://pypi.org/project/tues/
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tues-3.2.0-1.src.rpm
location_href: Packages/python-tues-help-3.2.0-1.noarch.rpm
checksum_type: sha256
description:
  Run any remote command via ssh and sudo



   * Run `pip install tues`






  Tues expects a command to execute, followed by the name of a hostname provider and its arguments.

  Run `id` on localhost as user root, using the IPv4/IPv6 adresses is not required, just passing localhost three times would work as well, you are only prompted for a password once and the original sudo prompt is stripped from the output.
  The login user will be derived from your ssh configuration (or if you really need to, manually with the `--login-user`/`-l` switch), while the user specified by `-u` is the user to run the command as on the remote host.

  ```
  $ tues -u root id cl localhost 127.0.0.1 [::1]
  [::1/stdout]: uid=0(root) gid=0(root) groups=0(root)
  [127.0.0.1/stdout]: uid=0(root) gid=0(root) groups=0(root)
  [localhost/stdout]: uid=0(root) gid=0(root) groups=0(root)
  $
  ```

  There are switches to send output to a directory, one file per host (`-d <dir>`), run on multiple hosts at a time `-n <num>`, upload files to the remote host before executing the command `-f <file>` and also a mechanic to treat the executed command as a local script in `TUES_PATH` that needs to be uploaded to the host first.

  ```
  $ echo 'ls "$@"' > myls
  $ chmod +x myls
  $ echo foo > myfile
  $ mkdir output
  $ tues --path=. -d output -f myfile -s 'myls -la $TUES_FILE1' localhost 127.0.0.1
  Starting localhost
  Finished localhost
  Starting 127.0.0.1
  Finished 127.0.0.1
  $ cat output/*
  [127.0.0.1/stdout]: -rw-rw-r-- 1 mvb mvb 4 Jul 26 12:59 myfile
  [localhost/stdout]: -rw-rw-r-- 1 mvb mvb 4 Jul 26 12:59 myfile
  $
  ```

  Running with an output directory automatically enables verbose mode to show at least a bit of progress, while disabling prefixing because with one file per host, you probably won't need the prefix.
  For this simple example, we set `TUES_PATH` to `.` on the commandline, by default, scripts should be placed in `$HOME/.config/tues/scripts/`.



  When running from python, tues will behave mostly the same, with slight differences where it makes sense. In Python mode, we need to explicitly request output prefixing for example:

  ```python
  import tues

  tues.run(
      ["localhost", "127.0.0.1", "[::1]"],
      "id",
      user="root",
      prefix=True,
  )
  ```

  ```$ python3 tues.py
  Your remote sudo password:
  [localhost/stdout]: uid=0(root) gid=0(root) groups=0(root)
  [127.0.0.1/stdout]: uid=0(root) gid=0(root) groups=0(root)
  [::1/stdout]: uid=0(root) gid=0(root) groups=0(root)
  $
  ```

  Output is usually kept "clean" (except for the sudo output of course) for later processing:

  ```python
  import sys

  import tues

  runs = tues.run(
      ["localhost", "127.0.0.1", "[::1]"],
      "id",
      user="root",
      text=True,
      capture_output=True,
  )

  for run in runs:
      sys.stdout.write(run.stdout)
  ```

  The interface tries to mimic `subprocess.run` where possible, the fact that it can run a command on multiple hosts will always require details to be handle diffrently though.


  ```
  $ python3 tues.py
  Your remote sudo password:
  uid=0(root) gid=0(root) groups=0(root)
  uid=0(root) gid=0(root) groups=0(root)
  uid=0(root) gid=0(root) groups=0(root)
  $
  ```

  For a detailed description of the `run` Arguments, please [check out the docstring](https://github.com/wontfix-org/tues/blob/master/tues/__init__.py#L800) for now, while I procastinate on creating proper docs. :-(





  The `file` provider assumes all files passed on the commandline contain one host per line.



  The `cl` provider assumes all arguments passed on the commandline are hosts to connect to.



  Execute on all hosts matching a certain foreman expression.

  ```
  export FOREMAN_URL="https://user:password@foreman.domain/"
  tues "ls" fm "class = my::class"
  ```



  New providers may be added by putting a new executable with a name like "tues-provider-<name>"
  on your PATH. A provider is expected to return a newline seperated list of hosts.

  If the provider returns with an error, the output is considered to be an error message and/or
  it's help output. If '--help' is passed through to the provider the output is displayed no matter
  what exit code is used.

rpm_license:
  The MIT License (MIT)  Copyright (c) 2014-2023, Michael van Bracht and contributors.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


pkgId: 32edbd737419b164ec70d4a9f27d262f14db16c058afe94283fec795566a4c4d
name: python-tuneapi-help
arch: noarch
version: 0.6.0
epoch: 0
release: 1
summary: Development documents and examples for tuneapi
url: https://github.com/NimbleBoxAI/tuneapi
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tuneapi-0.6.0-1.src.rpm
location_href: Packages/python-tuneapi-help-0.6.0-1.noarch.rpm
checksum_type: sha256
description:
  This is **not** the official SDK for Tune AI. This is an open source python package used to build GenAI apps at Tune AI.


pkgId: e65e50eade1b01915c65fcf30b6eacd9dbcca6d90520c3ff7535b2076d36c3c5
name: python-tuningtron-help
arch: noarch
version: 0.0.16
epoch: 0
release: 1
summary: Development documents and examples for tuningtron
url: https://github.com/Equiron-AI/tuningtron
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tuningtron-0.0.16-1.src.rpm
location_href: Packages/python-tuningtron-help-0.0.16-1.noarch.rpm
checksum_type: sha256
description:
  **Tuningtron** is a library built on top of **Hugging Face Transformers**, designed to simplify the process of fine-tuning large language models (LLMs) for developers. It focuses on making LLM fine-tuning feasible even with limited computational resources, such as Nvidia GeForce RTX 3090 GPUs. The library supports training on both GPUs and CPUs, and it includes a feature for offloading model weights to the CPU when using a single GPU. With one **Nvidia GeForce RTX 3090 GPU** and **256 GB of RAM**, Tuningtron can handle fine-tuning models with up to approximately **70 billion** parameters.


  The Tuningtron library is compatible with the Ubuntu 22.04 operating system. To set up the required environment for this library, system tools must be installed using the command:
  ```console
  sudo apt install -y python3-pip ccache make cmake g++ mpich
  ```
  To create a Python virtual environment with a GPU, use the command:
  ```console
  conda env create -f environment.yml
  ```
  In the absence of a GPU, the environment can be set up with the command:
  ```console
  conda env create -f environment-cpu.yml
  ```
  These steps ensure that all necessary dependencies are correctly configured, allowing the Tuningtron library to function optimally.


  ```console
  pip install tuningtron
  ```


  The following commands allow you to update operating system drivers:
  ```console
  sudo rm -r /var/lib/dkms/nvidia
  sudo dpkg -P --force-all $(dpkg -l | grep "nvidia-" | grep -v lib | awk '{print $2}')
  sudo ubuntu-drivers install
  ```


  When fine-tuning models with a large number of parameters, it might be necessary to increase the operating system's swap space. This can be done using the following steps:

  ```console
  sudo swapoff -a
  sudo fallocate -l 50G
  sudo chmod 600
  sudo mkswap /swapfile
  sudo swapon /swapfile
  ```

  These commands will increase the swap space, providing additional virtual memory that can help manage the large memory requirements during model fine-tuning.

  Swap should be used only in case of extreme necessity, as it can significantly slow down the training process. To ensure that the system uses swap space minimally, you should add the following line to the **/etc/sysctl.conf file**: **vm.swappiness=1**. This setting minimizes the swappiness, making the system less likely to swap processes out of physical memory and thus relying more on RAM, which is much faster than swap space.


  - If a GPU is available, the Tuningtron library automatically leverages DeepSpeed to offload model weights to RAM. This optimization allows for efficient management of memory resources, enabling the fine-tuning of larger models even with limited GPU memory.
  - The Tuningtron library supports only a specific dataset format, which must include the following columns: "instruct", "input", and "output". These columns are essential for the proper functioning of the library, as they structure the data in a way that the model can interpret and learn from effectively. If the dataset contains a column named "text", the library will use only this column and the data within it as-is.
  - If the eval=True parameter is passed to the prepare_dataset method, the Tuningtron library will automatically use 10% of the data in the dataset as validation data, creating an evaluation dataset. This feature allows for easy splitting of the dataset, ensuring that a portion of the data is reserved for evaluating the model's performance during training, thereby facilitating better model assessment and tuning.
  - The Tuningtron library fundamentally avoids using quantization during the fine-tuning process to prevent any potential loss of quality. This approach ensures that the experiments remain straightforward and maintain the highest possible model accuracy.
  - For combining LoRA adapters, the Tuningtron library supports only the "cat" method. In this method, the LoRA matrices are concatenated, providing a straightforward and effective approach for merging adapters.


  The following LLM models are supported:
  - Cohere Family
  - Gemma Family
  - Qwen Family


  ```python
  import logging
  from tuningtron import Tuner

  logging.basicConfig(level=logging.INFO)

  tuner = Tuner("CohereForAI/c4ai-command-r-v01")

  tuner.prepare_dataset("equiron-ai/safety",
                        eval=False,  # use the entire dataset only for training
                        max_len_percentile=100)  # percentile cutting off the longest lines

  tuner.train("safety_adapter",
              rank=16,
              lora_alpha=32,
              batch_size=4,  # suitable for most cases, but should be reduced if there is not enough GPU memory
              gradient_steps=2)  # suitable for most cases, but should be reduced if there is not enough GPU memory
  ```


  ```python
  import logging
  from tuningtron import Tuner

  logging.basicConfig(level=logging.INFO)

  tuner = Tuner("CohereForAI/c4ai-command-r-v01")
  tuner.merge("model_with_safety", "safety_adapter")
  ```


  Model fine-tuning and combining adapters cannot be performed in the same bash script or Jupyter session. It is essential to separate the processes of fine-tuning and adapter merging. When using JupyterLab, you must restart the kernel after completing each of these processes to ensure proper execution and avoid conflicts.


  ```console
  python3 llama.cpp/convert-hf-to-gguf.py /path/to/model --outfile model.gguf --outtype f16
  llama.cpp/build/bin/llama-quantize model.gguf model_q5_k_m.gguf q5_k_m
  ```


  ```console
  llama.cpp/build/bin/llama-server -m model_q5_k_m.gguf -ngl 99 -fa -c 4096 --host 0.0.0.0 --port 8000
  ```


  Please note that the toolkit version must match the driver version. The driver version can be found using the nvidia-smi command.
  Аor example, to install toolkit for CUDA 12.4 you need to run the following commands:
  ```console
  CUDA_TOOLKIT_VERSION=12-4
  wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
  sudo dpkg -i cuda-keyring_1.1-1_all.deb
  sudo apt update
  sudo apt -y install cuda-toolkit-${CUDA_TOOLKIT_VERSION}
  echo -e '
  export CUDA_HOME=/usr/local/cuda
  export PATH=${CUDA_HOME}/bin:${PATH}
  export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH
  ' >> ~/.bashrc
  ```


pkgId: 32ea80252b96b8a11a92aa231fcf9922dabab192edda637b0810c418c0a36f5b
name: python-turbodl-help
arch: noarch
version: 0.0.2
epoch: 0
release: 1
summary: Development documents and examples for turbodl
url: https://github.com/henrique-coder/turbodl
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-turbodl-0.0.2-1.src.rpm
location_href: Packages/python-turbodl-help-0.0.2-1.noarch.rpm
checksum_type: sha256
description:
  ![PyPI - Version](https://img.shields.io/pypi/v/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
  ![PyPI - Downloads](https://img.shields.io/pypi/dm/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
  ![PyPI - Code Style](https://img.shields.io/badge/code%20style-ruff-blue?style=flat&logo=ruff&logoColor=blue&color=blue&link=https://github.com/astral-sh/ruff)
  ![PyPI - Format](https://img.shields.io/pypi/format/turbodl?style=flat&logo=pypi&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)
  ![PyPI - Python Compatible Versions](https://img.shields.io/pypi/pyversions/turbodl?style=flat&logo=python&logoColor=blue&color=blue&link=https://pypi.org/project/turbodl)

  TurboDL is an extremely smart and efficient download manager for various cases.

  - Built-in download acceleration.
  - Uses your connection speed to download even more efficiently.
  - Retries failed requests.
  - Automatically detects the file type, name, extension, and size.
  - Automatically handles redirects.
  - Shows a fancy and precise progress bar.

  <br>



  ```bash
  pip install -U turbodl  # Install the latest version of TurboDL
  ```



  ```python
  from turbodl import TurboDL
  from pathlib import Path  # Optional


  turbodl = TurboDL(
      max_connections='auto',
      connection_speed=80,
      show_progress_bar=True,
      custom_headers=None,
      timeout=None
  )

  turbodl.download(
      url='https://example.com/file',
      output_path=Path.cwd()
  )




  ```



  Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

  If you have a suggestion that would make this better, fork the repository and create a pull request. You can also simply open an issue and describe your ideas or report bugs. **Don't forget to give the project a star if you like it!**

  1. Fork the project;
  2. Create your feature branch ・ `git checkout -b feature/{feature_name}`;
  3. Commit your changes ・ `git commit -m "{commit_message}"`;
  4. Push to the branch ・ `git push origin feature/{feature_name}`;
  5. Open a pull request, describing the changes you made and wait for a review.



  Please note that downloading copyrighted content from some services may be illegal in your country. This tool is designed for educational purposes only. Use at your own risk.


pkgId: ad5295708ef3402ccaf7e3da1ad8a9c616dfa72b594f9d6f9774b2a5de57bddb
name: python-turbotape-help
arch: noarch
version: 0.0.1
epoch: 0
release: 1
summary: Development documents and examples for turbotape
url: https://github.com/uwekamper/turbotape
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-turbotape-0.0.1-1.src.rpm
location_href: Packages/python-turbotape-help-0.0.1-1.noarch.rpm
checksum_type: sha256
description:
  A modern utility library for easily using the Podio API with Python.



  ```
  pip install turbotape
  ```



  Get your client ID und client secret from https://podio.com/settings/api

  Then run the following command:

  ```
  tpod init --client-id=<Podio-client-id> --client-secret=<Podio-client-secret>
  ```

  This will create a hidden file called `.turbotape_credentials.json` in the
  current working directory. The access token is valid for some hours.



  You can find die `item_id` of any Podio item by opening a Podio item detail view
  in the Webbrowser and then clicking on 'Actions' and 'Developer info':

  ![Click on Actions](docs/developer-info01.png)

  This will display among other things the item_id and the app_id:

  ![Click on dwActions](docs/developer-info02.png)

  Using the item_id you can now write a simple python programm that will read the details
  of one single item. Create file named `get_item_data.py` that contains the following Python code:

  ```python
  from turbotape.session import create_podio_session

  ITEM_ID=123456789 # <- Replace with your own item_id.


  def get_podio_item(item_id):
      
      podio = create_podio_session()

      
      item_url = f'https://api.podio.com/item/{item_id}'

      
      resp = podio.get(item_url)
      resp.raise_for_status()
      item_data = resp.json()
      return item_data


  if __name__ == '__main__':
      item_data = get_podio_item(ITEM_ID)
      
      print(f"Item-ID: {item_data['item_id']}")
      print(f"Item title: {item_data['title']}")

  ```

  Now run the program. The output should look like this:

  ```bash
  $ python ./get_item_data.py
  Item-ID: 123456789
  Item title: Bow of boat
  $ _
  ```



  Podio has very strict API limits. Because of this, turbotape includes an option to
  create a 'robust' session. If you create Podio session with the `robust` parameter,
  turbotape will wait when the API limit is reached and it will also retry the request
  when Podio returns a '504 Gateway timeout' error.

  ```python
  from turbotape.session import create_podio_session

  podio = create_podio_session(robust=True)
  ```

  Another hurdle is pagination. To download the data of a whole Podio app, we need to
  get the Podio items in smaller chunks:

  ```python
  from turbotape.session import create_podio_session
  from turbotape.helpers import iterate_resource

  app_id = 987654321 # <- Enter your own app_id here.

  podio = create_podio_session(robust=True)
  url = f'https://api.podio.com/item/app/{app_id}/filter/'

  for item in iterate_resource(client, url, 'POST', limit=250):
      print(item['item_id'])
  ```

  (The `limit` parameter can be anything from 1 to 500. On larger Podio apps it is wise to stay below
  300 and reduce the limit if you see that the Podio API returns a lot of HTTP 504 Errors.

  See https://developers.podio.com/doc/items/filter-items-4496747 for more info on the
  filter API endpoint.



  For this example to work [Pandas](https://pandas.pydata.org/) needs to be installed already.
  Often you want to get __all__ the data from one Podio app.

  ```python
  import turbotape.dataframe
  from turbotape.session import create_podio_session

  podio = create_podio_session(robust=True)
  app_id = 987654321 # <- Replace with your own app_id here.


  df = turbotape.dataframe.load_from_app(podio, app_id, labels=['Title', 'Description'])


  df = turbotape.dataframe.load_from_app(podio, app_id, external_ids=['title‘, 'description'])
  ```



  + https://github.com/finklabs/whaaaaat
  + http://click.pocoo.org/5/
  + https://github.com/asweigart/pyperclip
  + http://urwid.org/
  + http://npyscreen.readthedocs.io/introduction.html
  + https://help.podio.com/hc/en-us/community/posts/206886967-Updating-a-Calculation-Field-Script-via-the-API
  + https://requests-oauthlib.readthedocs.io/en/latest/
  + https://sedimental.org/glom_restructured_data.html
  + https://flit.readthedocs.io/en/latest/


pkgId: 51c3deabbfc68c5178242c0294c72a5fb0fd66be4b00fea86c541666cbf5b8d4
name: python-turms-help
arch: noarch
version: 0.8.4
epoch: 0
release: 1
summary: Development documents and examples for turms
url: https://jhnnsrs.github.io/turms
rpm_license: MIT
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-turms-0.8.4-1.src.rpm
location_href: Packages/python-turms-help-0.8.4-1.noarch.rpm
checksum_type: sha256
description:
  [![codecov](https://codecov.io/gh/jhnnsrs/turms/branch/master/graph/badge.svg?token=UGXEA2THBV)](https://codecov.io/gh/jhnnsrs/turms)
  [![PyPI version](https://badge.fury.io/py/turms.svg)](https://pypi.org/project/turms/)
  [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://pypi.org/project/turms/)
  ![Maintainer](https://img.shields.io/badge/maintainer-jhnnsrs-blue)
  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/turms.svg)](https://pypi.python.org/pypi/turms/)
  [![PyPI status](https://img.shields.io/pypi/status/turms.svg)](https://pypi.python.org/pypi/turms/)
  [![PyPI download month](https://img.shields.io/pypi/dm/turms.svg)](https://pypi.python.org/pypi/turms/)



  Turms is a `graphql-codegen` inspired code generator for python that generates typed and serializable python code from your graphql schema and documents. Just define your query in standard graphql syntax and let turms create fully typed queries/mutation and subscriptions, that you can use in your favourite IDE.

  Turms allows you to easily generate both server-side and client-side code for your GraphQL API.



  Can generate the following types from your graphql SDL schema:

  - Enums
  - Inputs
  - Objects
  - Scalars
  - Directives

  Sepcific generation supported for:

  - [x] Strawberry
  - [ ] Graphene



  Can generate the following pydantic models from your graphql documents:

  - Enums
  - Inputs
  - Scalars
  - Fragments
  - Operations



  - Fully typed, fully documented code generation
  - Schema and Document based code generation
  - Compatible with popular graphql libraries (strawberry, gql, rath, etc.)
  - Support for custom scalars, custom directives, ...
  - Powerful plugin system (e.g. custom Linting, custom formatting, etc.)
  - Operation functions like query, mutation, subscription (e.g. `data= get_capsules()`)
  - Compliant with graphl-config
  - Code migration support (trying to merge updates into existing code)



  ```bash
  pip install turms
  ```

  turms is a pure development library and will not introduce any dependency on itself into your
  code, so we recommend installing turms as a development dependency.

  ```bash
  poetry add -D turms

  ```

  As of now turms only supports python 3.9 and higher (as we rely on ast unparsing)



  Turms relies on and complies with [graphql-config](https://www.graphql-config.com/docs/user/user-introduction) and searches your current working dir for the graphql-config file.



  Based on pydantic models

  ```yaml
  projects:
    default:
      schema: http://api.spacex.land/graphql/
      documents: graphql/**.graphql
      extensions:
        turms: # path for configuration for turms
          out_dir: examples/api
          plugins: # path for plugin configuration
            - type: turms.plugins.enums.EnumsPlugin
            - type: turms.plugins.inputs.InputsPlugin
            - type: turms.plugins.fragments.FragmentsPlugin
            - type: turms.plugins.operation.OperationsPlugin
            - type: turms.plugins.funcs.FuncsPlugin
          processors:
            - type: turms.processor.black.BlackProcessor
            - type: turms.processor.isort.IsortProcessor
          scalar_definitions:
            uuid: str
            timestamptz: str
            Date: str
  ```



  Based on strawberry models

  ```yaml
  projects:
    default:
      schema: beasts.graphql
      extensions:
        turms:
          skip_forwards: true
          out_dir: api
          stylers:
            - type: turms.stylers.capitalize.CapitalizeStyler
            - type: turms.stylers.snake_case.SnakeCaseStyler
          plugins:
            - type: turms.plugins.strawberry.StrawberryPlugin # generates a strawberry schema
          processors:
            - type: turms.processors.disclaimer.DisclaimerProcessor
            - type: turms.processors.black.BlackProcessor
            - type: turms.processors.isort.IsortProcessor
            - type: turms.processors.merge.MergeProcessor # merges the formated schema with already defined functions
          scalar_definitions:
            uuid: str
            _Any: typing.Any
  ```



  Once you have configured turms you can generate your code by running

  ```bash
  turms gen
  ```



  In Etruscan religion, Turms (usually written as 𐌕𐌖𐌓𐌌𐌑 Turmś in the Etruscan alphabet) was the equivalent of Roman Mercury and Greek Hermes, both gods of trade and the **messenger** god between people and gods.



  Turms does _not_ come with a default transport layer but if you are searching for an Apollo-like GraphQL Client you can check out [rath](https://github.com/jhnnsrs/rath), that works especially well with turms.



  This github repository also contains some examples on how to use turms with popular libraries in the graphql ecosystem.


pkgId: c922441948407ea5b217f823ed59e8c9599fff671514686dfbd26b78b9e80cf1
name: python-tushare-help
arch: noarch
version: 1.4.14
epoch: 0
release: 1
summary: Development documents and examples for tushare
url: https://tushare.pro
rpm_license: BSD
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tushare-1.4.14-1.src.rpm
location_href: Packages/python-tushare-help-1.4.14-1.noarch.rpm
checksum_type: sha256
description:
  * easy to use as most of the data returned are pandas DataFrame objects
  * can be easily saved as csv, excel or json files
  * can be inserted into MySQL or Mongodb


pkgId: 79591e284d066f1d1fa4c95cf0ed5a99be285b40fbdf1f426b47be512ca00815
name: python-tutor-android-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-android
url: https://github.com/overhangio/tutor-android
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-android-19.0.0-1.src.rpm
location_href: Packages/python-tutor-android-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  This is a plugin to easily build an Android mobile application for your `Open edX <https://open.edx.org>`__ instance.


pkgId: 974c0a1c20d6470a9db454a088a5b8e8b2bf0672528d430d17c17499cbca9053
name: python-tutor-contrib-codejail-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-contrib-codejail
url: https://github.com/github/tutor-contrib-codejail
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-contrib-codejail-19.0.0-1.src.rpm
location_href: Packages/python-tutor-contrib-codejail-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  Tutor plugin that configures and runs a `Codejail Service`_ using a REST API. `Codejail`_ allows for the
  secure execution of untrusted code within sandboxes, providing a safe environment for running potentially dangerous code.


pkgId: aa8ffc0d39f0997895c0201147ff6e2db8ac7144b6e28977ae40ccd4af1e4235
name: python-tutor-contrib-drydock-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-contrib-drydock
url: https://github.com/edunext/drydock
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-contrib-drydock-19.0.0-1.src.rpm
location_href: Packages/python-tutor-contrib-drydock-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  Drydock is an opinionated tool offering a set of Tutor plugins aiming to provide features that enhance the operation of OpenedX installations in Kubernetes. It is developed by [Edunext](https://www.edunext.co/).
  - A set of Kubernetes Jobs that replace the current tutor jobs with [ArgoCD Sync Waves](https://argo-cd.readthedocs.io/en/stable/user-guide/sync-waves/) that allow for a more controlled deployment of openedx.
  - A set of Kustomization overrides adding [ArgoCD Sync Waves](https://argo-cd.readthedocs.io/en/stable/user-guide/sync-waves/) annotations to needed additional resources such as debug, workers or hpa.
  - Backup cronjobs that allow backup of the MySQL and MongoDB databases.
  - Integration of New Relic monitoring
  - Add a custom nginx and cert-manager configuration
  - Add a set of debug resources to help diagnose issues
  Extra plugins added:
  - Allows caddy to catch requests for multiple domains through `DRYDOCK_ENABLE_MULTITENANCY`
  - Add scorm matcher to caddy through `DRYDOCK_ENABLE_SCORM`
  - Patch for cms and lms worker pods to allow pod probes and lifecycle to work properly. Enabled via `DRYDOCK_POD_LIFECYCLE`


pkgId: 153a9b195e3de5613b58f939433cd68250e471b38a16459596097162141c5e57
name: python-tutor-contrib-mfe-extensions-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-contrib-mfe-extensions
url: https://github.com/edunext/tutor-contrib-mfe-extensions
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-contrib-mfe-extensions-19.0.0-1.src.rpm
location_href: Packages/python-tutor-contrib-mfe-extensions-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  This plugin is meant to be a collection of experimental changes to the
  tutor-mfe configuration. At the moment, it will be the testing ground for CDN support
  for MFEs.



  | Open edX release | Tutor version     | Tutor MFE Version                    | Plugin release |
  |------------------|-------------------|--------------------------------------|----------------|
  | Nutmeg           | `>=14.0, <15`     | `edunext/tutor-mfe@14.0.2.post1`     | 14.x.x         |
  | Olive            | `>=15.0, <16`     | `edunext/tutor-mfe@15.0.7.post2`     | 15.x.x         |
  | Palm             | `>=16.0, <17`     | `edunext/tutor-mfe@16.1.3.post1`     | 16.x.x         |
  | Quince           | `>=17.0, <18`     | `openedx/tutor-mfe@v17.0.1`          | 17.x.x         |
  | Redwood          | `>=18.0, <19`     | `tutor-mfe>17`                       | 18.x.x         |



  ```bash
  pip install tutor-contrib-mfe-extensions
  ```



  - `MFE_EXTENSIONS_CDN_URL` (default: `""`) - The URL of your CDN
    (e.g `https://d1234abcd.cloudfront.net/`)
  - `MFE_EXTENSIONS_BY_PATH` (default: `True`) - When enabled will
    add additional routes to caddy to enable routing each mfe through
    a path of the LMS (e.g. `https://{LMS_HOST}/learning`).



  The current deployment of tutor-mfe relies on a webserver
  ([caddy](https://caddyserver.com/)) to serve the MFE static files directly from
  a Docker container. To reduce the amount of IO the server is incurring while
  serving a high amount of traffic, we use a CDN to cache the javascript/css
  bundles of each MFE and simply serve a small index.html file through caddy.

  We use webpack's
  [`output.publicPath`](https://webpack.js.org/configuration/output/#outputpublicpath)
  to accomplish this. An important fix to make use of this was merged in fronted-platform
  [v5.5.1](https://github.com/openedx/frontend-platform/releases/tag/v5.5.1), so
  it's a prerequisite that your MFEs come with this version installed. This is the
  case for all the MFEs supported by default by Tutor from Quince on-wards.



  The value of `publicPath` is fixed at build time, therefore it's not possible to reuse
  the MFE docker image if we set it's value to a specific CDN endpoint.
  To avoid this limitation we use a script
  [`docker-entrypoint.sh`](tutormfe_extensions/templates/mfe/build/mfe/docker-entrypoint.sh)
  to dinamically change a placeholder value used in `publicPath` each time the container is
  started.

  Once you enable the plugin you can build an image with a _"dynamic"_ `publicPath`.
  By default the placeholder will be replaced by an empty string, which was the original value.
  In a Kubernetes environment it will be replaced with the value of `MFE_EXTENSIONS_CDN_URL`.



  This plugin adds additional routes to caddy that allows you to serve any MFE defined
  by using the `MFE_APP_` variables through the LMS domain using the path:
  `https://{LMS_HOST}/{{MFE_CUSTOM_MFE_APP.name}}` where `name` corresponds to the
  key of each item in the [`CORE_MFE_APPS` dict](https://github.com/overhangio/tutor-mfe/blob/v16.1.3/tutormfe/plugin.py#L48).

  This is done by using the patch `{{ patch("caddyfile-mfe-by-path") }}` this patch will
  add a caddy snippet that will route `/{{MFE_CUSTOM_MFE_APP.name}}` to the MFE container,
  by adding this patch to the `caddyfile-lms` patch we can serve the MFE apps through the
  LMS domain.

  There are several reason why you may want to serve the MFEs through LMS paths instead
  of subdomains, the main one is to enable multisite support: instead of using
  a single global configuration you can have per-site configuration relying on the
  MFE Config API, each MFE can retrieve the configuration of their corresponding LMS
  site simply by defaulting to their base domain.

  To enable the snippets in your caddy routes make sure `MFE_EXTENSIONS_BY_PATH` is set
  to `True` (the default) and if you are using an additional caddy patch to enable
  additional routes you can include the `caddyfile-mfe-by-path` patch to your block:

  ```
      
      {$default_site_port} {
          @favicon_matcher {
              path_regexp ^/favicon.ico$
          }
          rewrite @favicon_matcher /theming/asset/images/favicon.ico

          {{ patch("caddyfile-mfe-by-path")|indent(4) }} # Adding this line will include the routes for each MFE.

          
          request_body /api/profile_images/*/*/upload {
              max_size 1MB
          }
          request_body {
              max_size 4MB
          }
          import proxy "lms:8000"

      }
  ```



  This software is licensed under the terms of the AGPLv3.


pkgId: d6541b9eba7ff275acda1347423e3d0de3b22ebcaa98a13c179c983e549b6552
name: python-tutor-contrib-sentry-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-contrib-sentry
url: https://pypi.org/project/tutor-contrib-sentry/
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-contrib-sentry-19.0.0-1.src.rpm
location_href: Packages/python-tutor-contrib-sentry-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  A tutor plugin to integration Open edX with Sentry.



  ```shell
  pip install tutor-contrib-sentry
  ```



  ```shell
  tutor plugins enable sentry
  ```

  Make sure to rebuld the openedx docker image to install the sentry SDK



  This plugin supports the following settings:

  - `SENTRY_DSN`: The sentry DSN used for ingestion.
  - `SENTRY_IGNORED_ERRORS`: A list of rules with exceptions types to ignore, optionally
    you can ignore only specific exceptions that matches a list of regex.

  ```yaml
  SENTRY_IGNORED_ERRORS:

  - exc_class: AuthFailedError

  - exc_text:
    - .*Email or password is incorrect

  - exc_class: AuthFailedError
    exc_text:
    - .*Email or password is incorrect
  ```

  - `SENTRY_ENVIRONMENT`: The sentry environment. Defaults to `production`.
  - `SENTRY_EXTRA_ARGS`: A dictionary with extra arguments for the sentry SDK. e.g:

  ```yaml
  SENTRY_EXTRA_ARGS:
    traces_sample_rate: 1.0
    profiles_sample_rate: 0.0
  ```



  On production we recommend adjusting both `traces_sample_rate` and `profiles_sample_rate` as those
  can impact performance. See the [sentry configuration options](https://docs.sentry.io/platforms/python/configuration/options/) for more information.




  This software is licensed under the terms of the AGPLv3.


pkgId: 821735ae7d6a9cc8d8086120b81d1e68604f546634eab9176e0f46aef41ed17a
name: python-tutor-forum-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-forum
url: https://github.com/overhangio/tutor-forum
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-forum-19.0.0-1.src.rpm
location_href: Packages/python-tutor-forum-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  This plugin adds `discussion forums`_ to your `Open edX`_ platform, such that students
  can have conversations about the courses they are following right in your LMS.


pkgId: 8382d075956fddb4b881ea12f1e3b21dd699a1a9b57acef19afa7389aff0225b
name: python-tutor-indigo-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-indigo
url: https://github.com/overhangio/tutor-indigo
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-indigo-19.0.0-1.src.rpm
location_href: Packages/python-tutor-indigo-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  Indigo is an elegant, customizable theme for `Open edX <https://openedx.org>`__.
  You can view the theme in action at https://sandbox.openedx.edly.io.


pkgId: 2e3784b8aed9b4461acdcad12e767e94cd652c832bd815129726773d89697367
name: python-tutor-mfe-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-mfe
url: https://github.com/overhangio/tutor-mfe
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-mfe-19.0.0-1.src.rpm
location_href: Packages/python-tutor-mfe-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor. To learn more about MFEs, please check the `official Open edX documentation <https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html>`__.
  In addition, this plugin comes with a few MFEs which are enabled by default:
  - `Authn <https://github.com/openedx/frontend-app-authn/>`__
  - `Authoring <https://github.com/openedx/frontend-app-authoring/>`__
  - `Account <https://github.com/openedx/frontend-app-account/>`__
  - `Communications <https://github.com/openedx/frontend-app-communications/>`__
  - `Discussions <https://github.com/openedx/frontend-app-discussions/>`__
  - `Gradebook <https://github.com/openedx/frontend-app-gradebook/>`__
  - `Learner Dashboard <https://github.com/openedx/frontend-app-learner-dashboard/>`__
  - `Learning <https://github.com/openedx/frontend-app-learning/>`__
  - `ORA Grading <https://github.com/openedx/frontend-app-ora-grading/>`__
  - `Profile <https://github.com/openedx/frontend-app-profile/>`__
  Instructions for using each of these MFEs are given below.


pkgId: 88aaaccfe843d06c2442454818a91647b4cb96434ad5604f6a8a3583c6bfe645
name: python-tutor-notes-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-notes
url: https://docs.tutor.edly.io/
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-notes-19.0.0-1.src.rpm
location_href: Packages/python-tutor-notes-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  This is a plugin for `Tutor <https://docs.tutor.edly.io>`_ to easily add the `Open edX note-taking app <https://github.com/openedx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://docs.openedx.org/en/latest/educators/how-tos/course_development/exercise_tools/enable_notes.html>`_).


pkgId: 85d9c26c9e97fbf200c7e7c41ac7886802530d3e47004d0b5fccde48ed288a7d
name: python-tutor-xqueue-help
arch: noarch
version: 19.0.0
epoch: 0
release: 1
summary: Development documents and examples for tutor-xqueue
url: https://docs.tutor.edly.io/
rpm_license: AGPLv3
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tutor-xqueue-19.0.0-1.src.rpm
location_href: Packages/python-tutor-xqueue-help-19.0.0-1.noarch.rpm
checksum_type: sha256
description:
  This is a plugin for `Tutor <https://docs.tutor.edly.io>`_ that provides the Xqueue external grading system for Open edX platforms. If you don't know what it is, you probably don't need it.


pkgId: 4919e509f823ec36c13ad6f177a44e47a085bd968de82bde37074de3b26ccc5f
name: python-tuxbake-help
arch: noarch
version: 0.7.2
epoch: 0
release: 1
summary: Development documents and examples for tuxbake
url: https://tuxbake.org/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tuxbake-0.7.2-1.src.rpm
location_href: Packages/python-tuxbake-help-0.7.2-1.noarch.rpm
checksum_type: sha256
description:
  TuxBake, by [Linaro](https://www.linaro.org/), is a command line tool and
  Python library that provides portable and repeatable OE builds. TuxBake is a part of [TuxSuite](https://tuxsuite.com), a suite of tools and services to help developers do build and boot test Linux kernel and OE distros.

  [[_TOC_]]




  TuxBake is a python application to build OE Distros. It takes a json file as input which
  describes the layers needed to be downloaded, local_conf and bblayers_conf parameters along
  with machine, distro targets. It downloads the layers for with using either git protocols or
  the repo tool. It uses containers (both Docker and Podman) to provide a standardised build
  environments to do the build which can be easily reproduced by other users.



  There are several options for installing TuxBake (TuxMake is a prerequisite):
  ```
  pip3 install tuxmake
  git clone https://gitlab.com/Linaro/tuxbake
  cd tuxbake/
  pip3 install .
  ```

  The tools that needs to be installed on the host system are:
  ```
  docker or podman, git, repo
  ```



  ```
  {
    "container": "ubuntu-20.04",
    "distro": "rpb",
    "envsetup": "setup-environment",
    "machine": "dragonboard-845c",
    "extraconfigs": [],
    "sources": {
      "repo": {
        "branch": "qcom/dunfell",
        "manifest": "default.xml",
        "url": "https://github.com/96boards/oe-rpb-manifest.git"
      }
    },
    "target": "rpb-console-image rpb-console-image-test rpb-desktop-image rpb-desktop-image-test"
  }
  ```


  ```
  {
    "sources": {
      "git_trees": [
        {
          "url": "http://git.yoctoproject.org/git/poky",
          "branch": "honister"
        },
        {
          "url": "https://github.com/ndechesne/meta-qcom",
          "branch": "honister"
        }
      ]
    },
    "container": "ubuntu-20.04",
    "envsetup": "poky/oe-init-build-env",
    "extraconfigs": [],
    "distro": "poky",
    "machine": "dragonboard-845c",
    "target": "core-image-minimal",
    "bblayers_conf": [
    "BBLAYERS += \"../meta-qcom/\""
    ],
      "environment": {
    }
  ```




  The sources is a dictionary with single item. It could be either git_trees or repo.


  The git_trees is a list of dictionary object. Each dictionary
  object will have "url" and one of the following "branch", "ref"
  or the "sha" field.  If specifying the "ref" feild that should
  be in any of the formats:

  "ref": "refs/pull/number/head"
  "ref": "refs/pull/number/merge"
  "ref": "refs/tags/tag"

  Note: The "number" is the number of the pull request. and for
  merge requests in Gitlab, just change "pull" to
  "merge-requests".


  The repo field is a dictionary object. The dictionary should have "branch", "manifest" and "url" field describing where the manifests are hosted along with the branch and manifest file to be used in the build.


  This is the distro variable passed to OE build.


  This should be the absolute path to the download directory that is passed to OE build. NOTE: It will not work specifying the 'dl_dir' string with '~/' or '$HOME' in the path.


  This should be the absolute path to the sstate-cache directory that is passed to OE build. NOTE: It will not work specifying the 'sstate_dir' string with '~/' or '$HOME' in the path.


  This should start with 'file:///some/local/dir/sstate/PATH' and/or 'https://someserver.tld/share/sstate/PATH;downloadfilename=PATH' sstate-cache directory that is passed to OE build.


  This is path to the script relative to the source directory that needs to be sourced to setup bitbake build environment.


  This is a list of string and each entry corresponds to some extra configs that will be used while building the target.


  This is the machine variable passed to OE build.


  This the target passed to the bitbake command.


  This is the container used by Docker or Podman to do the build. We currently support ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, centos-8, debian-bullseye, debian-buster, debian-stretch, fedora-33, fedora-34, opensuse-leap-15.1, opensuse-leap-15.2


  This is a list of of string and each entry corresponds to a line in local.conf file. The list of string is converted to local.conf file.


  This is a list of of string and each entry corresponds to a line in bblayers.conf file. The list of string is converted to bblayers.conf file.


  This is a dictionary of environment variables which are set before calling bitbake.



  TuxBake takes the build-definition as input along with a source directory path where the code is downloaded.



  Build OE example:

      $ tuxbake --build-definition examples/oe-rpb.json --src-dir $PWD/oe/


pkgId: b19eb6ed749f3ff238b6ec5eadff96b7bdcd0da443b06136f01e79192b26af0e
name: python-tuxrun-help
arch: noarch
version: 0.75.0
epoch: 0
release: 1
summary: Development documents and examples for tuxrun
url: https://tuxsuite.com/
rpm_license: None
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tuxrun-0.75.0-1.src.rpm
location_href: Packages/python-tuxrun-help-0.75.0-1.noarch.rpm
checksum_type: sha256
description:
  <div align="center">
    <img src="docs/tuxrun_full.svg" alt="TuxRun Logo" width="40%" />
  </div>

  [![Pipeline Status](https://gitlab.com/Linaro/tuxrun/badges/master/pipeline.svg)](https://gitlab.com/Linaro/tuxrun/pipelines)
  [![coverage report](https://gitlab.com/Linaro/tuxrun/badges/master/coverage.svg)](https://gitlab.com/Linaro/tuxrun/commits/master)
  [![PyPI version](https://badge.fury.io/py/tuxrun.svg)](https://pypi.org/project/tuxrun/)
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
  [![PyPI - License](https://img.shields.io/pypi/l/tuxrun)](https://gitlab.com/Linaro/tuxrun/blob/master/LICENSE)

  [Documentation](https://tuxrun.org/) - [Repository](https://gitlab.com/Linaro/tuxrun) - [Issues](https://gitlab.com/Linaro/tuxrun/-/issues)

  TuxRun, by [Linaro](https://www.linaro.org/), is a command line tool for
  testing Linux on the following virtual devices, using curated test suites.

  * AVH
  * FVP
  * QEMU

  TuxRun is a part of [TuxSuite](https://tuxsuite.com), a suite of tools and
  services to help with Linux kernel development.

  [[_TOC_]]



  Testing the Linux kernel is as simple as using QEMU but it gets complicated
  when you want to support the following combinations:

  - Architectures (arm64, armv5, armv7, i386, mips32, mips32el, mips64, mips64el,
    ppc32, ppc64, ppc64le, riscv64, s390, sh4, sparc64, x86_64)

  - Emulation systems (QEMU or FVP or AVH)
  - Tests (every test suite has dependencies on the rootfs)

  Each of those items requires specific configuration and root file systems. In
  order to allow for reproducible tests, TuxRun uses containers runtimes (Docker
  or Podman).



  There are several options for installing TuxRun:

  - [From PyPI](docs/install-pypi.md)
  - [Run uninstalled](docs/run-uninstalled.md)



  To use TuxRun, compile your own linux kernel for arm64, for example using
  [TuxMake](https://tuxmake.org).

  Then call tuxrun:

  ```shell
  tuxrun --device qemu-arm64 --kernel /path/to/Image
  ```

  TuxRun will automatically start qemu-system with the right arguments and the
  right root filesystem.



  Known issues when booting on different virtual platforms.

  - [From issues](docs/issues.md)



  Boot test a mipsel kernel at https://mykernel.org/vmlinux:

  ```shell
  tuxrun --device qemu-mips32el \
         --kernel https://mykernel.org/vmlinux
  ```

  Running *ltp-smoke*:

  ```shell
  tuxrun --device qemu-mips32el \
         --kernel https://mykernel.org/vmlinux \
         --test ltp-smoke
  ```

  Using a custom root file system

  ```shell
  tuxrun --device qemu-mips32el \
         --kernel https://mykernel.org/vmlinux \
         --rootfs https://mykernel.org/rootfs.tar.xz
  ```


pkgId: 90699fd61a249677658c17130f9c29c0e8969d539f87a6fe1ca6d3492728f1fb
name: python-tw-dayoff-help
arch: noarch
version: 0.1.2
epoch: 0
release: 1
summary: Development documents and examples for tw-dayoff
url: https://dybts.us.kg
rpm_group: Unspecified
rpm_buildhost: localhost
rpm_sourcerpm: python-tw-dayoff-0.1.2-1.src.rpm
location_href: Packages/python-tw-dayoff-help-0.1.2-1.noarch.rpm
checksum_type: sha256
rpm_license:
  GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007  Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.  Preamble  The GNU General Public License is a free, copyleft license for software and other kinds of works.  The licenses for most software and other practical works are designed to take away your freedom to share and change the works.  By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.  We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors.  You can apply it to your programs, too.  When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.  To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights.  Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.  For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received.  You must make sure that they, too, receive or can get the source code.  And you must show them these terms so they know their rights.  Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.  For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software.  For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.  Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so.  This is fundamentally incompatible with the aim of protecting users' freedom to change the software.  The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable.  Therefore, we have designed this version of the GPL to prohibit the practice for those products.  If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.  Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary.  To prevent this, the GPL assures that patents cannot be used to render the program non-free.  The precise terms and conditions for copying, distribution and modification follow.  TERMS AND CONDITIONS  0. Definitions.  "This License" refers to version 3 of the GNU General Public License.  "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.  "The Program" refers to any copyrightable work licensed under this License.  Each licensee is addressed as "you".  "Licensees" and "recipients" may be individuals or organizations.  To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy.  The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.  A "covered work" means either the unmodified Program or a work based on the Program.  To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy.  Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.  To "convey" a work means any kind of propagation that enables other parties to make or receive copies.  Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.  An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License.  If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.  1. Source Code.  The "source code" for a work means the preferred form of the work for making modifications to it.  "Object code" means any non-source form of a work.  A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.  The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form.  A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.  The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities.  However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.  For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.  The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.  The Corresponding Source for a work in source code form is that same work.  2. Basic Permissions.  All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met.  This License explicitly affirms your unlimited permission to run the unmodified Program.  The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work.  This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.  You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force.  You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright.  Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.  Conveying under any other circumstances is permitted solely under the conditions stated below.  Sublicensing is not allowed; section 10 makes it unnecessary.  3. Protecting Users' Legal Rights From Anti-Circumvention Law.  No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.  When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.  4. Conveying Verbatim Copies.  You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.  You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.  5. Conveying Modified Source Versions.  You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:  a) The work must carry prominent notices stating that you modified it, and giving a relevant date.  b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7.  This requirement modifies the requirement in section 4 to "keep intact all notices".  c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.  This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged.  This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.  d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.  A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit.  Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.  6. Conveying Non-Source Forms.  You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:  a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.  b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.  c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source.  This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.  d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge.  You need not require recipients to copy the Corresponding Source along with the object code.  If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source.  Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.  e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.  A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.  A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling.  In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage.  For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product.  A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.  "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source.  The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.  If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information.  But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).  The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed.  Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.  Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.  7. Additional Terms.  "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law.  If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.  When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it.  (Additional permissions may be written to require their own removal in certain cases when you modify the work.)  You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.  Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:  a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or  b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or  c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or  d) Limiting the use for publicity purposes of names of licensors or authors of the material; or  e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or  f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.  All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10.  If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.  If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.  If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.  Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.  8. Termination.  You may not propagate or modify a covered work except as expressly provided under this License.  Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).  However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.  Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.  Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License.  If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.  9. Acceptance Not Required for Having Copies.  You are not required to accept this License in order to receive or run a copy of the Program.  Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance.  However, nothing other than this License grants you permission to propagate or modify any covered work.  These actions infringe copyright if you do not accept this License.  Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.  10. Automatic Licensing of Downstream Recipients.  Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.  You are not responsible for enforcing compliance by third parties with this License.  An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations.  If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.  You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.  For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.  11. Patents.  A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based.  The work thus licensed is called the contributor's "contributor version".  A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version.  For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.  Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.  In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement).  To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.  If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients.  "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.  If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.  A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License.  You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.  Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.  12. No Surrender of Others' Freedom.  If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all.  For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.  13. Use with the GNU Affero General Public License.  Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work.  The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.  14. Revised Versions of this License.  The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.  Each version is given a distinguishing version number.  If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.  If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.  Later license versions may give you additional or different permissions.  However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.  15. Disclaimer of Warranty.  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.  16. Limitation of Liability.  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  17. Interpretation of Sections 15 and 16.  If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.  END OF TERMS AND CONDITIONS  How to Apply These Terms to Your New Programs  If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.  To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.  Taiwan Day Off, A simple API to get Taiwan's day off information Copyright (C) 2024  Neko No Akuma  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>.  Also add information on how to contact you by electronic and paper mail.  If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:  Taiwan Day Off  Copyright (C) 2024  Neko No Akuma This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.  The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License.  Of course, your program's commands might be different; for a GUI interface, you would use an "about box".  You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.  The GNU General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Lesser General Public License instead of this License.  But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.


