Saravanan666/pypi-org huggingface dataset:
Package: torchkge
TorchKGE: Knowledge Graph embedding in Python and Pytorch.TorchKGE is a Python module for knowledge graph (KG) embedding relying solely on Pytorch. This package provides
researchers and engineers with a clean and efficient API to design and test new models. It features a KG data structure,
simple model interfaces and modules for negative sampling and model evaluation. Its main strength is a highly efficient
evaluation module for the  link prediction task,  a central application of KG embedding. It has beenobservedto be up
to five times faster thanAmpliGraphand twenty-four times faster thanOpenKE. Various KG embedding models are also already implemented. Special
attention has been paid to code efficiency and simplicity, documentation and API consistency. It is distributed using
PyPI under BSD license.CitationsIf you find this code useful in your research, please consider citing ourpaper(presented atIWKG-KDD2020):@inproceedings{arm2020torchkge,
    title={TorchKGE: Knowledge Graph Embedding in Python and PyTorch},
    author={Armand Boschin},
    year={2020},
    month={Aug},
    booktitle={International Workshop on Knowledge Graph: Mining Knowledge Graph for Deep Insights},
}Free software: BSD licenseDocumentation:https://torchkge.readthedocs.io.
Package: torchkin
torchkinA library for differentiable kinematicsGetting StartedPrerequisitesWestronglyrecommend you install torchkin in a venv or conda environment with Python 3.8-3.10.torchkin requirestorchinstallation. To install for your particular CPU/CUDA configuration, follow the instructions in the PyTorchwebsite.InstallingpypipipinstalltorchkinFrom sourceThe simplest way to install torchkin from source is by running the followinggitclonehttps://github.com/facebookresearch/theseus.git&&cdtheseus/torchkin
pipinstall-e.If you are interested in contributing to torchkin, also installpipinstall-r../requirements/dev.txt
pre-commitinstalland follow the more detailed instructions inCONTRIBUTING.ExampleAn inverse kinematics example is available inscript.importtorchimporttorchkinaskin# We can load a robot model from a URDF filedtype=torch.float64device="cuda"robot=kin.Robot.from_urdf_file(YOUR_URDF_FILE,dtype=dtype,device=device)# Print robot name, number of links and degrees of freedomprint(f"{robot.name}has{len(robot.get_links())}links and{robot.dof}degrees of freedom.\n")# Print joint id and nameforid,nameinenumerate(robot.joint_map):# A joint is not fixed if and only if id < robot.dofprint(f"joint{id}:{name}is{'not fixed'ifid<robot.dofelse'fixed'}")print("\n")# Print link id and nameforlinkinrobot.get_links():print(f"link{link.id}:{link.name}")# We can get differentiable forward kinematics functions for specific links# by using `get_forward_kinematics_fns`. This function creates three differentiable# functions for evaluating forward kinematics, body jacobian and spatial jacobian of# the selected links, in that order. The return types of these functions are as# follows:## - fk: return a tuple of link poses in the order of link names# - jfk_b: returns a tuple where the first is a list of link body jacobians, and the#          second is a tuple of link poses---both are in the order of link names# - jfk_s: same as jfk_b except returning the spatial jacobianslink_names=[LINK1,LINK2,LINK3]fk,jfk_b,jfk_s=kin.get_forward_kinematics_fns(robot=robot,link_names=link_names)batch_size=10# The joint states are in the order of the joint idsjoint_states=torch.rand(batch_size,robot.dof,dtype=dtype,device=device)# Get link poseslink_poses=fk(joint_states)# Get body jacobians and link posesjacs_b,link_poses=jfk_b(joint_states)# Get spatial jacobians and link posesjacs_s,link_poses=jfk_s(joint_states)Citing torchkinIf you use torchkin in your work, please cite thepaperwith the BibTeX below.@article{pineda2022theseus,title={{Theseus: A Library for Differentiable Nonlinear Optimization}},author={Luis Pineda and Taosha Fan and Maurizio Monge and Shobha Venkataraman and Paloma Sodhi and Ricky TQ Chen and Joseph Ortiz and Daniel DeTone and Austin Wang and Stuart Anderson and Jing Dong and Brandon Amos and Mustafa Mukadam},journal={Advances in Neural Information Processing Systems},year={2022}}Licensetorchkin is MIT licensed. See theLICENSEfor details.Additional InformationJoin the community onGithub Discussionsfor questions and sugesstions.UseGithub Issuesfor bugs and features.SeeCONTRIBUTINGif interested in helping out.
Package: torch-kmeans
torch_kmeansPyTorch implementations of KMeans, Soft-KMeans and Constrained-KMeanstorch_kmeans features implementations of the well known k-means algorithm
as well as its soft and constrained variants.All algorithms are completely implemented asPyTorchmodules
and can be easily incorporated in a PyTorch pipeline or model.
Therefore, they support execution on GPU as well as working on (mini-)batches of data.
Moreover, they also provide ascikit-learnstyle interface featuringmodel.fit(),model.predict()andmodel.fit_predict()functions.->view official documentationHighlightsFully implemented in PyTorch. (PyTorch and Numpy are the only package dependencies!)GPU support like native PyTorch.PyTorch script JIT compiled for most performance sensitive parts.Works with mini-batches of samples:each instance can have a different number of clusters.Constrained Kmeans works with cluster constraints like:a max number of samples per cluster or,a maximum weight per cluster, where each sample has an associated weight.SoftKMeans is a fully differentiable clustering procedure and
can readily be used in a PyTorch neural network model which requires backpropagation.Unit tested against the scikit-learn KMeans implementation.GPU execution enables very fast computation even for
large batch size or very high dimensional feature spaces
(seespeed comparison)InstallationSimply install from PyPIpip install torch-kmeansUsagePytorch style usageimporttorchfromtorch_kmeansimportKMeansmodel=KMeans(n_clusters=4)x=torch.randn((4,20,2))# (BS, N, D)result=model(x)print(result.labels)Scikit-learn style usageimporttorchfromtorch_kmeansimportKMeansmodel=KMeans(n_clusters=4)x=torch.randn((4,20,2))# (BS, N, D)model=model.fit(x)labels=model.predict(x)print(labels)orimporttorchfromtorch_kmeansimportKMeansmodel=KMeans(n_clusters=4)x=torch.randn((4,20,2))# (BS, N, D)labels=model.fit_predict(x)print(labels)ExamplesYou can find more examples and usage in thedetailed example notebooks.
Package: torch-layers
Copyright (c) 2019, Justus Schock
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Description: # Custom PyTorch layers[![Build Status](https://travis-ci.com/justusschock/torch_layers.svg?branch=master)](https://travis-ci.com/justusschock/torch_layers) [![codecov](https://codecov.io/gh/justusschock/torch_layers/branch/master/graph/badge.svg)](https://codecov.io/gh/justusschock/torch_layers)This repository implements various layers (either to replace deprecated layers of [torch](https://github.com/pytorch/pytorch) or to add useful new features or to encapsulate parts of the functional API into layers).Currently the following layers are implemented:[Conv2dWithSamePadding](torch_layers/conv_padding_same) [[docs]](https://justusschock.github.io/torch_layers/_api/_build/torch_layers/conv_padding_same.html)[ActivationConv](torch_layers/activation_conv) [[docs]](https://justusschock.github.io/torch_layers/_api/_build/torch_layers/activation_conv.html)[MaxPool2dSamePadding](torch_layers/maxpool_padding_same) [[docs]](https://justusschock.github.io/torch_layers/_api/_build/torch_layers/maxpool_padding_same.html)[Upsample](torch_layers/upsample) [[docs]](https://justusschock.github.io/torch_layers/_api/_build/torch_layers/upsample.html)[View](torch_layers/view) [[docs]](https://justusschock.github.io/torch_layers/_api/_build/torch_layers/view.html)## InstallationThis package can be installed via pip with:` pip install torch_layers `or from source via:` pip installgit+https://github.com/justusschock/torch_layers`Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Package: torchlearn
TorchLearnTorchLearn is a Python package that provides an additional layer on top of vanilla pytorch
in order to simplify and fasten the development and deployment of Machine Learning Training
pipelines.TorchLearn defines aTrainerabstraction that allows to define the processing logic as a
Directed Acyclic Graph (DAG) and only execute the nodes that are necessary to compute the
loss and metrics. An example of DAG definition and training is shown below:from functools import partial

from torch.nn import functional as F
from torch.optim import Adam

from torchlearn.processing.graph import ProcessingGraph
from torchlearn.metric.classification import ConfusionMatrix, Accuracy, Precision

def processing(model):
    return ProcessingGraph(
        inputs=("input", "target", "sample_weight")
        functions=(
            ("output", model, "input"),
            ("predicted", partial(torch.argmax, dim=-1), "output"),
            ("sample_loss", partial(F.cross_entropy, reduction="none"), ("output", "target")),
            ("weighted_loss", torch.prod, ("sample_loss", "sample_weight")),
            ("loss", torch.sum, "weighted_loss")
        )
)

cm = ConfusionMatrix(classes)
metrics = {"acc": Accuracy(cm), "precision": Precision(cm, 1)}

trainer = Trainer(model, Adam)
results = trainer.train(processing, epochs, train_loader, val_loader, metrics=metrics)
Package: torch-lfilter
torch_lfilterBring low pass filtering to PyTorch!This pytorch extension offers a PyTorch alternative for Scipy'slfilter- with gradient tracking.CPU tensors only (efficiently...)Although it's certainly the goal to implement an efficient CUDA
lfilter in C++, for now only the CPU version is implemented in C++.
That said, the implementation is reasonably fast and doing the
filtering on the CPU might be a viable option. Moreover, the
pure-python implementation works on all devices.InstallationThe library can be installed with pip:pip install torch_lfilterPlease note that no pre-built wheels exist. This means thatpipwill
attempt to install the library from source. Make sure you have the
necessary dependencies installed for your OS.DependenciesLinuxOn Linux, having PyTorch installed is often enough to be able install
the library (along with the typical developer tools for your
distribution). Run the following inside a conda environment:conda install pytorch -c pytorch
pip install torch_lfilterWindowsOn Windows, the installation process is a bit more involved as
typically the build dependencies are not installed. To install those,
downloadVisual Studio Community 2017fromhere.
During installation, go toWorkloadsand select the following
workloads:Desktop development with C++Python developmentThen go toIndividual Componentsand select the following
additional items:C++/CLI supportVC++ 2015.3 v14.00 (v140) toolset for desktopAfter installation, run the following commandsinsideax64 Native
Tools Command Prompt for VS 2017, after activating your conda
environment:conda install pytorch -c pytorch
pip install torch_lfilterLicense© Floris Laporte 2020,GPLv3
Package: torch-lib
torch_lib介绍torch_lib 是一个基于深度学习框架 PyTorch 的开源训练库，对训练 pipeline 提供了一系列标准化的流程和预定义的接口，用于简化训练代码的编写，提高开发效率。特性快速构建根据实际需要实现接口、配置参数，快速构建训练pipeline。完全可定制化torch_lib 使用组合模式构建一套标准的训练流程（具体详见xx部分）。除此之外，您还可以对这个流程进行自定义修改，灵活度相较于市面已有框架大幅度提高。清晰可视化torch_lib 支持清晰的控制台可视化功能，可以实现训练流程监控、模型结构预览等。渐进式torch_lib 与普通 PyTorch 代码完全兼容，您可以自由地使用 torch_lib 的部分实用工具或整个框架。快速上手此部分默认您已经熟悉 PyTorch 的基本训练流程。模型与数据集对于一个完整的 PyTorch 训练流程，模型和数据集的处理是必不可少的。在 torch_lib 中，此部分与 PyTorch 原生代码没有区别。fromtorch.nnimportModulefromtorch.utils.dataimportDataLoadermodel:Module=Model()# 标准PyTorch模型dataset:DataLoader=DataLoader()# 标准PyTorch数据集开始训练调用训练的过程分为三步：创建代理（Proxy）类、build 构建、train（eval、predict）。此示例适用单输入单输出任务，即数据集的格式为（输入数据，标签），如果想要进行更复杂的任务构建，请阅读完此章节后继续阅读xx章节。创建代理（Proxy）类根据尽量使用关联而不是继承的原则，代理类只是对模型的一些行为进行调用，最大程度解耦合。fromtorch_libimportProxy# 此部分将 PyTorch 模型包裹起来，device 参数用于指定训练设备，当然也可以后续再进行设置。proxy=Proxy(model,device='cpu')build构建使用 build 是为了方便进行一些通用不变的配置，比如评价指标（在训练、验证和测试的过程中往往使用相同的评价指标，因此只需要配置一次）。# 具体参数使用详见 API 文档。proxy.build(loss=None,# PyTorch 损失函数metrics=None,# torch_lib 评价指标optimizer=None,# PyTorch 优化器lr=None,# 学习率lr_decay=None,# 学习率衰减optimizer_options=None,lr_decay_options=None,data_parser=None# 用于多输入多输出的数据转换器)训练流程必要的参数有损失函数和优化器，因此只需配置这两项即可开始训练。fromtorch.nnimportCrossEntropyLossfromtorch.optim.adamimportAdam# 仅为示例，需要根据实际情况选择合适的损失函数和优化器。proxy.build(loss=CrossEntropyLoss(),optimizer=Adam(model.parameters(),lr=1e-4))开始训练 / 评估 / 预测（train / eval / predict）使用 build 配置好必要参数后，接下来就可以调用训练流程。此处仅以 train 为例。proxy.train(train_dataset=dataset,total_epochs=10)至此，torch_lib 配置和调用训练的基本流程就完成了。想要实现一些定制化流程和高级功能，可以继续阅读此文档的后续章节。高级使用想要熟练地使用 torch_lib 的高级功能，需要先理解 torch_lib 的一些核心概念。核心概念
Package: torchlibrosa
TorchLibrosa: PyTorch implementation of LibrosaThis codebase provides PyTorch implementation of some librosa functions. If users previously used for training cpu-extracted features from librosa, but want to add GPU acceleration during training and evaluation, TorchLibrosa will provide almost identical features to standard torchlibrosa functions (numerical difference less than 1e-5).Install$pipinstalltorchlibrosaExamples 1Extract Log mel spectrogram with TorchLibrosa.importtorchimporttorchlibrosaastlbatch_size=16sample_rate=22050win_length=2048hop_length=512n_mels=128batch_audio=torch.empty(batch_size,sample_rate).uniform_(-1,1)# (batch_size, sample_rate)# TorchLibrosa feature extractor the same as librosa.feature.melspectrogram()feature_extractor=torch.nn.Sequential(tl.Spectrogram(hop_length=hop_length,win_length=win_length,),tl.LogmelFilterBank(sr=sample_rate,n_mels=n_mels,is_log=False,# Default is true))batch_feature=feature_extractor(batch_audio)# (batch_size, 1, time_steps, mel_bins)Examples 2Extracting spectrogram, then log mel spectrogram, STFT and ISTFT with TorchLibrosa.importtorchimporttorchlibrosaastlbatch_size=16sample_rate=22050win_length=2048hop_length=512n_mels=128batch_audio=torch.empty(batch_size,sample_rate).uniform_(-1,1)# (batch_size, sample_rate)# Spectrogramspectrogram_extractor=tl.Spectrogram(n_fft=win_length,hop_length=hop_length)sp=spectrogram_extractor.forward(batch_audio)# (batch_size, 1, time_steps, freq_bins)# Log mel spectrogramlogmel_extractor=tl.LogmelFilterBank(sr=sample_rate,n_fft=win_length,n_mels=n_mels)logmel=logmel_extractor.forward(sp)# (batch_size, 1, time_steps, mel_bins)# STFTstft_extractor=tl.STFT(n_fft=win_length,hop_length=hop_length)(real,imag)=stft_extractor.forward(batch_audio)# real: (batch_size, 1, time_steps, freq_bins), imag: (batch_size, 1, time_steps, freq_bins) ## ISTFTistft_extractor=tl.ISTFT(n_fft=win_length,hop_length=hop_length)y=istft_extractor.forward(real,imag,length=batch_audio.shape[-1])# (batch_size, samples_num)Example 3Check the compability of TorchLibrosa to Librosa. The numerical difference should be less than 1e-5.python3torchlibrosa/stft.py--device='cuda'# --device='cpu' | 'cuda'ContactQiuqiang Kong,qiuqiangkong@gmail.comCite[1] Qiuqiang Kong, Yin Cao, Turab Iqbal, Yuxuan Wang, Wenwu Wang, and Mark D. Plumbley. "PANNs: Large-scale pretrained audio neural networks for audio pattern recognition." IEEE/ACM Transactions on Audio, Speech, and Language Processing 28 (2020): 2880-2894.External linksOther related repos include:torchaudio:https://github.com/pytorch/audioAsteroid-filterbanks:https://github.com/asteroid-team/asteroid-filterbanksKapre:https://github.com/keunwoochoi/kapre
Package: torchlife
TorchLifeSurvival Analysis using pytorchThis library takes a deep learning approach to Survival Analysis.Installpip install torchlifeHow to useWe need a dataframe that has a column named 't' indicating time, and 'e' indicating a death event.import pandas as pd
import numpy as np
url = "https://raw.githubusercontent.com/CamDavidsonPilon/lifelines/master/lifelines/datasets/rossi.csv"
df = pd.read_csv(url)
df.rename(columns={'week':'t', 'arrest':'e'}, inplace=True)df.head()<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}</style>tefinageracewexpmarparoprio0201027100131171018100182251019010113352012311111452001901013from torchlife.model import ModelHazard

model = ModelHazard('cox', lr=0.5)
model.fit(df)
λ, S = model.predict(df)epochtrain_lossvalid_losstime06.99395510.74121800:0018.77482314.73615500:0029.99143116.56443200:00310.99552717.17460400:00411.72318116.92038700:00512.06014215.98360300:00612.17407414.55391900:00712.03859712.68395000:00811.70232510.45213700:00911.2185027.98137700:001010.5701015.20952000:00119.8598594.03967800:00129.1550643.64337900:00138.5144762.74213300:00147.9156603.07441800:00157.4135482.58524500:00166.9678952.71038400:00176.5699572.54400900:00186.2150982.43351500:00195.8803222.34275000:00Let's plot the survival function for the 4th element in the dataframe:x = df.drop(['t', 'e'], axis=1).iloc[2]
t = np.arange(df['t'].max())
model.plot_survival_function(t, x)
Package: torchlikelihoods
TorchLikelihoodsA library for handling likelihoods in PyTorch for any type of dataInstallationRun the following to installpip install torchlikelihoodsUsagefromtorchlikelihoodsimportNormalLikelihoodimporttorchnum_samples,num_feats=100,5normal_data=torch.randn((num_samples,num_feats))lik=NormalLikelihood(domain_size=num_feats)scaler=lik.get_scaler()print(f"Domain size:{lik.domain_size()}")print(f"Params size:{lik.params_size()}")Do you want to get involved in the development?pipinstall-e.[dev]TestingTo run the tests:maketestpytest
Package: torchlite
TorchliteTorchlite is a high level library on top of popular machine learning frameworks such as
sklearn, Pytorch and Tensorflow.
It gives a high layer abstraction of repetitive code used in machine learning for day-to-day data science tasks.Installationpip install torchliteor if you want to run this lib directly to have access to the examples clone this repository and run:pip install -r requirements.txtto install the required dependencies.
By defaultPytorch 0.4.0+andTensorflow-GPU 1.8.0+are installed along with this library but it's recommended
to install them from source fromhereif you want to use thetorchlite.torchpackage and/or head over to theTensorflow install pageif you want to
use thetorchlite.tfpackage.DocumentationFor now the library has no complete documentation but you can quickly get to know how
it works by looking at the examples in theexamples-*folders. This library is still in
alpha and few APIs may change in the future. The only things which will evolve at the same
pace as the library are the examples, they are meant to always be up to date with
the library.Few examples will generates folders/files such as saved models or tensorboard logs.
To visualize the tensorboard logs download Tensorflow's tensorboard as well asPytorch's tensorboardif you're interested by
thetorchlite.torchpackage. Then execute:tensorboard --logdir=./tensorboardPackaging the project for Pypi deploypip install twine
pip install wheel
python setup.py sdist
python setup.py bdist_wheelCreate a pypi accountand create$HOME/.pypircwith:[pypi]
username = <username>
password = <password>Then upload the packages with:twine upload dist/*Or just:pypi_deploy.sh
Package: torchliter
TorchLiterA freely customizable and truly lightweight training tool for any pytorch projectsInstallpip install torchliterExample Usage:importtorchliterasluximporttorchimporttorch.nnasnnimporttorch.nn.functionalasFcart=lux.Cart()cart.model=nn.Linear(1,3)cart.train_loader=torch.utils.data.DataLoader([iforiinrange(100)],batch_size=5)cart.eval_loader=torch.utils.data.DataLoader([iforiinrange(100)],batch_size=5)cart.optimizer=torch.optim.AdamW(cart.model.parameters(),lr=1e-3,weight_decay=1e-5)deftrain_step(_,batch,**kwargs):image,target=batchlogits=_.model(image)loss=F.cross_entropy(logits,target)_.optimizer.zero_grad()loss.backward()_.optimizer.step()yield"cross entropy loss",loss.item()acc=(logits.max(-1).indices==target).float().mean()yield"train acc",acc.item()defeval_step(_,batch,**kwargs):image,target=batchwithtorch.no_grad():logits=_.model(image)acc=(logits.max(-1).indices==target).float().mean()yield"eval acc",acc.item()defhello(_):print("hello")train_buffers=lux.engine.AutoEngine.auto_buffers(train_step,lux.buffers.ExponentialMovingAverage)eval_buffers=lux.engine.AutoEngine.auto_buffers(eval_step,lux.buffers.ScalarSummaryStatistics)TestEngineClass=lux.engine.AutoEngine.build("TestEngine",train_step,eval_step,print_hello=hello)test_engine=TestEngineClass(**{**cart.kwargs,**train_buffers,**eval_buffers})
Package: torch-logger
torch_logger 🔥This minimalist package serves to log best values of performance metrics during the training of PyTorch models.
The idea is to automatically log the best value for each tracked metric such that it can be directly analyzed downstream (e.g. when using wandb) without the need to post-process the raw logged values to identify the overall best values and corresponding steps.Usage:>>> from torch_logger import BestValueLogger
>>> bv_log = BestValueLogger(
        {'val_loss': False, 'val_roc': True} # <-- provide flag if larger is better
    )Log values after each eval step:... 
>>> bv_log([val_loss, val_roc], step=0)
    ... 
>>> bv_log([val_loss, val_roc], step=1)
    ...  
>>> bv_log([val_loss, val_roc], step=2)Inspect the logger:>>> bv_log

::BestValueLogger::
Tracking the best values of the following metrics:
{
    "val_loss": false,
    "val_roc": true
}
(key: metric, value: bool if larger is better)
Best values and steps:
{
    "best_val_loss_value": 0.05,
    "best_val_loss_step": 2,
    "best_val_roc_value": 0.8,
    "best_val_roc_step": 1
}Update your experiment logger (e.g. wandb) with best_values at the end of training>>> wandb.log( bv_log.best_values )Logging values without stepsIn case you only wish to track values but not the corresponding steps, run:>>> bvl = BestValueLogger({'val_loss': False, 'val_roc':True}, log_step=False)Populate logger with metrics:>>> bvl([0.2,0.8], step=1)
>>> bvl([0.2,0.9], step=2)Inspect:>>> bvl
::BestValueLogger::
Tracking the best values of the following metrics:
{
    "val_loss": false,
    "val_roc": true
}
(key: metric, value: bool if larger is better)
Best values:
{
    "best_val_loss_value": 0.2,
    "best_val_roc_value": 0.9
}