Saravanan666/pypi-org huggingface dataset:
Package: modeller
UsageYou can use inheritance to create your model:class User(modeller.Model):
    id = ''
    _schema = {
        'type': 'object',
        'properties': {
            'name': { 'type': 'string' },
            'id': { 'type': 'integer' },
            'age': { 'type': 'integer' },
        },
        'required': [
            'name',
            'surname',
        ],
        # 'additionalProperties': False,
    }

# model will be validated after every instance
me = User(id=01, name='Tommy', surname='Der')

# you can also add additional properties
me.state = 'Italy'
me._validate()

print(me._json())

print(me._yaml())

print(me.surname)With the schema intypes/schema.yaml$schema:http://json-schema.org/schema#properties:name:type:stringsurname:type:stringage:type:integerrequired:-name-surname-ageyou can load a model with automatic validation, easy attribute access with dots and no exceptions while trying to access a property defined in the schema.importyamlimportmodelerschema=yaml.load(open('types/schema.yaml').read())Model=modeler.make_model(schema=schema,)Model(name='Tommaso',surname='De Rossi',age=19)DetailsModel validate itself as soon as instantiated, if you want to change this behavior overwrite_on_initmethod.
Model will return None if you try to access a property present in the json schema.propertiesbut not in the object.
Model will throw if you try to access a property not present in the object and not in the json schema.properties.
Package: model-lifecycle-tracker
model-trackerA simple data store keeping track of models and things1. Running locallyGet postgres up and running for local developmentIn the cell block below we pull down a postgres docker container and we set our password asdocker, though you can set it as whatever you'd like.docker pull postgres
 docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=docker -d postgresFlash database for quick devPGPASSWORD='docker' psql -h localhost -U postgres -c "drop database modeltracker" 
  && PGPASSWORD='docker' psql -h localhost -U postgres -c "create database modeltracker"2. Populating the basic type tablesIf you've installed this as a pip package in your virtual environment then you can navigate into your virtual environment, then lib, then your installed python version, then site packages, and finally into modeltracker (this step is not required if you have access to the source code)The path should look something like this:<virtualenv here>/lib/python3.xx/site-packages/modeltracker/Once you've reached that path, you can generate the basic table types with:python-mmodeltracker.mainSuppose you have been developing and wish to destroy all table contents:python-mmodeltracker.main-r3. Checking tables existence in local postgres databse instanceYou can then hop into your running postgres database instance with:docker exec -it some-postgres psql -U postgresDatabase dictTo keep track of what is being produced by the modeltrackerdatastore_type: Describes the datastore types, BQ or GCS for instance.feature_store_metrics: Describes the metrics relating to each model in the model_catalog_idjob: Describes tasks that have been runmodel_catalog: describes models and links to state_idmodel_output: describes location and datastore type of model_outputstate: Catalogue of statestask_type: Tracks tasks that occur
Package: modello
ModelloThis project aims to explore symbolic modeling with object orientated programming. The heavy lifting is done by thesympylibrary. This module just provides a class to derive models from.An example based onexamples/geometry.py:frommodelloimportInstanceDummy,ModellofromsympyimportsqrtclassRightAngleTriangle(Modello):a=InstanceDummy("a",real=True,positive=True)b=InstanceDummy("b",real=True,positive=True)c=sqrt(a**2+b**2)T=RightAngleTriangle("T",a=3,b=4)assertT.c==5T=RightAngleTriangle("T",b=4,c=5)assertT.a==3The best place to see how this can be used is to look in the examples directory, which still needs padding out.The functionality is covered by tests in bothtest_modello.pyand doctests+tests in the examples.InstallationThis can be installed using one of:# using pipenvpipenvinstallmodello# using pippipinstall--usermodello# using git+pipenvpipenvinstallgit+https://github.com/Code0x58/modello.git#egg=modello# using git+pippipinstall--usergit+https://github.com/Code0x58/modello.git#egg=modelloCurrently this requires Python 3.6+ but the version requirements can drop a couple of minor versions easily if there is interest. Python 2.7 isn't planned to be supported as the Modello class relies onPEP-3115.DevelopmentRun the tests and linting withpython setup.py test. Pushes have the test suite run against them, and will also publish a release if tagged thanks to GitHub Actions. You can reproduce the Actions locally usingact, e.g.TWINE_USERNAME= TWINE_PASSWORD= act.TODO:elaborate on tests/examplesthink about extending the functionality to allow for a more complete system of constraints, use the RightAngleTriangle example as a basework out patterns for labels/names on symbols so they render nicelyfor mypy, consider getting value from or removing itimplement a first attempt at nested models (named, rather than lists, which would be nice)think about the possibility of symbolic (instance) dummies to allow live updates to system rather than modello instantiation being final
Package: model-loads
model_loadsis an open-source Python package for pytorch load models easy.PyTorchis a Python package that provides two high-level features:Tensor computation (like NumPy) with strong GPU accelerationDeep neural networks built on a tape-based autograd systemIt's annoying to load cpu model to gpu devices or load multi-gpus trained model to single gpu devices sometimes, And this package try to simplify it.Table of ContentsTable of ContentsInstallationGetting StartedTODO listInstallationTo install load_models, you can do as follow:pip install model-loadsOr from sourcegit clone https://github.com/cwh94/model_loads.git
    cd load_models
    python setup.py bdist_egg
    python setup.py installGetting Startedload pth model to GPU deviceimport model_loads as lo
import torchvision.models as models

model = models.MobileNetV2()
model_path = "../examples/models/pth/mobilenet_v2-b0353104.pth"
model, _ = lo.load_models(model_path, model, use_gpu=True)
print(model)
print(type(model))load tar model(which contains state_dict and optimization info or accuracy) to CPU devicefrom models.tar.mobilenet_v2 import MobileNetV2

model = MobileNetV2()
model_path = "models/tar/checkpoint.pth.tar"

model, other_param = lo.load_models(model_path, model)
print(model)
print(other_param)load model to CPU deviceimport os

os.environ["CUDA_VISIBLE_DEVICES"] = ""

model = models.MobileNetV2()
model_path = "models/pth/mobilenet_v2-b0353104.pth"
model, _ = lo.load_models(model_path, model, use_gpu=True)
print(model)
print(type(model))
Package: model-log
1. Model Log 介绍Model Log 是一款基于 Python3 的轻量级机器学习(Machine Learning)、深度学习(Deep Learning)模型训练评估指标可视化工具，与 TensorFlow、Pytorch、PaddlePaddle结合使用，可以记录模型训练过程当中的超参数、Loss、Accuracy、Precision、F1值等，并以曲线图的形式进行展现对比，轻松三步即可实现。通过调节超参数的方式多次训练模型，并使用 Model Log 工具进行记录，可以很直观的进行模型对比，堪称调参神器。以下是使用工具后模型训练时 Loss 的变化曲线图。访问线上体验版：http://mantchs.com/model_log.html通过上图可以很清晰的看出两个模型的训练效果，而且在表格当中高亮显示修改过的超参数，方便进行模型分析。2. Model Log 特性轻量级、无需任何配置、极简API、开箱即用。只需要把模型的超参数和评估指标数据通过API添加即可，轻松三步即可实现。高亮显示修改过的超参数，方便进行模型分析。自动检测和获取正在训练的模型数据，并进行可视化，无需人工参与。使用 SQLite 轻量级本地数据库存储，可供多个用户同时使用，保证每个用户看到的数据是独立的。可视化组件采用 Echarts 框架，交互式曲线图设计，可清晰看到每个 epoch 周期的指标数据和变化趋势。3. Model Log 演示地址访问线上体验版：http://mantchs.com/model_log.html4. Model Log 安装Python3 版本以上，通过 pip 进行安装即可。pipinstallmodel-log注意：若安装的过程中出现以下情况，说明model-log命令已经安装到Python下的bin目录中，如果直接输入 model-log 可能会出现 command not found，可以直接到bin目录下执行。5. Model Log 使用5.1 启动 web 端Model Log 安装成功后，Linux、Mac用户直接终端输入以下命令，Windows用户在cmd窗口输入：model-log默认启动5432端口，可以在启动命令上使用参数-p=5000指定端口号。若提示命令不存在，可以直接到Python/3.7/bin目录下执行。启动后可在浏览器输入网址进入：http://127.0.0.1:5432也可访问线上体验版：http://mantchs.com/model_log.htmlweb首页是项目列表，一个项目可以有多个模型，这些模型可以在曲线图中直观比较。web 端会自动检测是否有新模型开始训练，如果有，直接会跳转到相应的 loss 等评价指标页，同时会自动获取指标数据进行呈现。可供多个用户使用，添加昵称即可，SQLite 轻量级本地数据库存储，保证每个用户看到的数据是独立的。通过点击曲线图下方的图例，可切换不同模型的评估曲线。5.2 Model Log API使用轻松三步即可使用第一步：先创建 ModelLog 类，并添加必要的属性frommodel_log.modellogimportModelLog""":param nick_name:        str，昵称，多人使用下可起到数据隔离。:param project_name:     str，项目名称。:param project_remark:   str，项目备注，默认为空。项目名称如不存在会新建"""model_log=ModelLog(nick_name='mantch',project_name='demo实体识别',project_remark='')""":param model_name: str，模型名称"""model_log.add_model_name(model_name='BILSTM_CRF模型')""":param remark: str，模型备注"""model_log.add_model_remark(remark='模型备注')""":param param_dict: dict，训练参数字典:param param_type: str，参数类型，例如：TF参数、Word2Vec参数等。"""model_log.add_param(param_dict={'lr':0.01},param_type='tf_param')第二步：模型训练的每次 epoch (周期)可以添加评估指标数据，评估指标可以进行以下选择。第一次调用该 API 时，会把以上设置的数据(模型名称、备注等)持久化到 SQLite 数据库，并且 web 端会自动获取评估指标数据进行图形化展示。""":param metric_name:  str，评估指标名称，可选择['train_loss', 'test_loss', 'train_acc', 'test_acc', 'train_recall', 'test_recall', 'train_precision', 'test_precision', 'train_F1', 'test_F1']:param metric_value: float，评估指标数值。:param epoch:        int，训练周期metric_name 参数只可以选择以上十种第一次调用该 API 时，会把以上设置的数据(模型名称、备注等)持久化到 SQLite 数据库，并且 web 端会自动获取数据进行图形化展示。可以在每个 epoch 周期的最后使用该 API 添加训练集和测试集的评估指标，web 端会自动获取该数据。"""model_log.add_metric(metric_name='train_loss',metric_value=4.5646,epoch=1)第三步：模型训练完成后，可以添加最好的一次评估数据。""":param best_name:  str，最佳评估指标名称，:param best_value: float，最佳评估指标数值。:param best_epoch: int，训练周期添加当前模型训练中最佳的评估数据，一般放到模型训练的最后进行添加。"""model_log.add_best_result(best_name='best_loss',best_value=1.2122,best_epoch=30)model_log.finish_model()"""关闭 SQLite 数据库连接"""model_log.close()5.3 Model Log 使用示例MIST手写数字识别：https://github.com/NLP-LOVE/Model_Log/blob/master/demo_TF_MIST.py
Package: modellogger
Modelloger is a Python library for storing modelâ€™s profile and rapid
inter model comparision. Powered by dash and SQLITE3, Itâ€™s compact
,light and interactive yet powerfull tool to gain usefull insights.Documentaion :Read the detailed documentationhereInstallationUsing pipUse the package managerpipto install modelloger.pipinstallmodelloggerUsagefrommodelloggerimportModelLogger#initialise a modelloger instancepath="c/path/to/db/databasename.db"mlog=ModelLogger(path)#If you are already using a db created by modelloger you can directly load it by stating it's path#if you are creating a new project just give location where you want to store the db followed by a name.dbTry It Now?FunctionalitiesNow you are ready to rock and roll. Out of the box you will have the
following functionalities:store_model()gboost=GradientBoostingClassifier()gboost.fit(X_train,y_train)mlog.store_model('my_model_name',gboost,X_train,1.0)#alternativelymlog.store_model('my_model_name',gboost,X_train,get_score(gboost),save_pickle=True)view_results()mlog.view_results(True,'my_report')best_model()mlog.best_model(smaller_the_better=True)delete_model()mlog.delete_model(Model_name="Mymodel")mlog.delete_model(Model_id=1)model_profiles()mlog.model_profiles('All')mlog.model_profiles(5)ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.Licenseapache-2.0
Package: modelmachine
Read the doc: <https://github.com/vslutov/modelmachine>Home-page:https://github.com/vslutov/modelmachineAuthor: vslutov
Author-email:vslutov@yandex.ruLicense: WTFPL
Description: UNKNOWN
Platform: any
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Education
Classifier: Natural Language :: Russian
Classifier: Natural Language :: English
Classifier: Operating System :: Unix
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Education
Classifier: Topic :: Utilities
Classifier: Topic :: Scientific/Engineering
Package: model-maker
ModelMakerFramework and utilities for creating and validating ML modelsFeaturesCLI tool for creation and validation of modelsChoose from predefined templatesInstall the toolThis will install the modelmaker CLI toolgitclonehttps://github.com/shirecoding/ModelMaker.gitcdModelMaker
pip3install./alternatively install from pypipip3 install model-makerList TemplatesmodelmakertemplatesCreate a New Projectmodelmakernew--projectMNISTClassifier--packagemnistmodel--templatedefaultThis will create the python packagemnistmodelinside directoryMNISTClassifier(also the main class name)Current Templatesdefault (simple classification model using mnist dataset example)linear_regressiontext_classificationProject StructureThe model is packaged as an importable and installable python libraryscripts/train.pyused for training the model and exporting it tosaved_modelsscripts/test.pygives an example of how to use the packaged model in productionsrc/MNISTClassifier/mnistmodel/# python model packagesaved_model/# this is where the model is saved after trainingmnistmodelscripts/train.py# training script which imports model package, trains model, saves model to saved_modeltest.py# example test script on how to use the model package in productionsetup.pyREADME.md.gitignore...Model Framework and PipelineEach model inherits from an abstract classModelInterfaceEach model must overrideget_model, fit_model, load_model, save_modelEach model must definepreprocess, predict, postprocess
Package: model-manager
modelmanagerVersion number: 0.7Author: Michel Wortmann, Potsdam Institute of Climate Impact Research, GermanyOverviewA python package to create flexible APIs for (scientific) models.DependenciesModelmanager itself has no dependencies, but some of its plugins do. They will
direct you two install them throughpip.
Python development dependencies are listed inrequirements_dev.txt. Before
installing the any package (see below) consider setting up a virtual python
environment (virtualenv mydevenv).InstallationTo install use pip:$ pip install modelmanagerOr clone the repo:$ git clone https://github.com/mwort/modelmanager.git
$ python setup.py installConceptThe model
The modelmanager links with your model like illustrated in this file structure:modeldir/               # your main model directory
    mm/                 # the modelmanager resource directory
        settings.py     # define or import here all variables, functions and plugins
	      browser/        # this is a plugin directory, e.g. for the browser app

    modelexec           # all your model resources
    input/
    output/With this setup you can either use your model interface through the commandline
or through the python API (see Usage below).UsageInitialise project where in your model root directory:cd home/mymodel
modelmanager initAdd some variables, functions or plugins for your model in mm/settings.py and
call them on the commandline like this:modelmanager example_function --example_argument=2Or use your new model api in a Python script like this:import modelmanager as mm

project = mm.Project()
result = project.example_function()Use the browser app by adding this line to your settings:from modelmanager.plugins.browser import *Then start the application on the commandline:modelmanager startbrowserNavigate to localhost/admin in your browser.ContributingBug reports, ideas and feature requests welcome on Github.TestingRun test in tests/ like this:make                                # runs all tests
python test_project.py              # just runs test_projects with call stats
python -m unittest test_project.Settings  # just run Settings tests
make clean                          # clean any leftover test outputmakeshould pass before submitting a pull/merge request.Releasingadd entry inCHANGELOG.mdchange version number in__init__.pyandREADME.md, tag and commit (make version)build sdist and push to git and pypi (make release)
Package: model-mommy
IMPORTANT:Model Mommy is no longer maintained and was replaced byModel Bakery. Please, considermigrating your projectto use the new lib.Model Mommy’s creator and the maintainers decided to rename the project to not reinforce gender stereotypes for women in technology. You can read more about this subjecthere.MaintainersAna Paula Gomes -https://github.com/anapaulagomes/Rustem Saiargaliev -https://github.com/amureki/Bernardo Fontes -https://github.com/berinhard/CreatorVanderson Mota -https://github.com/vandersonmota/
Package: model-one
Model One python wrapperModel Oneis a few-shot AutoML system.Model One can do almost anything that requires understanding or generating natural language. Model One is able to solve tasks in 12 languages: English, Spanish, Portuguese, Russian, Turkish, French, German, Italian, Arabic, Polish, Dutch, and Hebrew.This package provides a simple wrapper for using our api.Usingmodel-onepackage allows you to train and apply models.DocumentationYou can find the documentation at ourModelOne API docs site.Just tryWe have fine-tuned several models. You can use thenotebookto try them out. You canget the tokento fine tune your own model.Getting startedFirstly fill out theformto get a key to access the API. We will send you the key within a day.InstallationTo install the package just usepip install -U model-one.Usageimportmodel_oneimportpandasaspdmodel_one.set_api_key('YOUR_API_KEY')# load datasetstdf=pd.read_csv('train.csv')vdf=pd.read_csv('test.csv')# Call one method. It will do everything for you:# create a model, save it to the file, upload datasets and put the model in the queue for training.model=model_one.train_generator('filename.json',tdf['inputs'],tdf['outputs'],vdf['inputs'],vdf['outputs'])# wait...# a few hours# while our GPUs train your modelmodel.wait_for_training_finish()print(model.status)print(model.is_ready)# inference!the_answer=model.generate('The Answer to the Ultimate Question of Life, the Universe, and Everything')print(the_answer)
Package: modelon-impact-client
Modelon-impact-clientClient library for easy scripting against Modelon ImpactInstallationFor installation instructions and requirements, please refer to thedocumentation.DevelopDevcontainerIf you are developing with VS Code you can use the devcontainer which gives gives you a ready to use environment for development. Just click the "Reopen in Container" button after opening the project in VS Code.Tips and tricksIt is possible to run the 'make' commands listed bellow using the devcontainer. It will detect being in a container and bypass Docker parts of the commands.You can open a project with the dev-container directly without having to open and then re-load. Standing in the project directory you can run:devcontainer open .Note that this requires thedevcontainer-cli.You can add your own extensions to devcontainers. These extensions will be added for all devcontainers. First open your 'settings' as JSON. Then, to add for example the "GitLens" extension, put the following at the bottom of the settings:...
    "remote.containers.defaultExtensions": ["eamodio.gitlens"]
}VS Code also have a'Install Local Extensions in 'Remote'command, but it must be repeated for each devcontainer and everytime a devcontainer is re-built.Creating a shellModelon-impact-client is developed using a Docker container for all build tools.
You can get a shell into said container by running:make shellManage dependenciesDependencies are managed by poetry. Add dependencies by runningpoetry add <package>orpoetry add <package> --devinside the shellRunning testsTests are executed by runningmake test. You can also runmake test-watchto get a watcher
that continuously re-runs the tests.Running lintmake lintBuildBuilding modelon-impact-client is done by runningmake wheelReleaseThe modelon-impact-client build process is a fully automated usingSemantic-release.Automation is enabled for:Bumping versionGenerate changelogThis is done based on git commit semantics as described here:https://semantic-release.gitbook.io/semantic-release/To make a new release simply run:make publishThis command will detect what branch you are on and your git history and make a appropriate release.Current configuration can be found in.releasercand specifies that commits to branchmastershould be released and
commits to branchbetashould be released as apre-release.This workflow make sure that no administrative time needs to be put into managing the release workflow.
Package: model-organization
docstestspackageWelcome! This package attempts to create an interface for managing the usage of
a climate model. It provides the ModelOrganization class that manages
different experiments in projects.See thedocumentationon readthedocs for more information.InstallationSimply install it viapip:$ pip install model-organizationOr you install it via:$ python setup.py installfrom thesource on GitHub.RequirementsThe package is based uponfuncargparse: used to create the command line utility.PyYAML: for storing, loading and displaying the configurationsix: For compatibility issues between python 2 and python 3fasteners: For a parallel access to the configuration filesThe package is regularly tested for python 2.7, 3.4, 3.5 and 3.6.
Package: model-parallelism
Model ParallelismThis package is a simple wrapper aroundDeepSpeedto make it as easy as possible to implement model parallelism in your PyTorch models.Example Usage# Your training script+ import model_parallelism# All your data preparation, logging, etc.model = create_model(...)- model = model.to(device)- optimizer = torch.optim.Adam(model.parameters(), lr=1e-4)+ model = model_parallelism.initialize(+     model, learning_rate=1e-4, optimizer="Adam", batch_size=batch_size+ )for batch in dataloader:loss = model(batch)-     loss.backward+     model.backward(loss)-     optimizer.step()+     model.step()
Package: modelparameters
ModelParametersModelParameters:provides a lightweight library to declare nested Parameters in Pythoncan be interfaced through command line argumentsoptionally depends on NumPy and SymPyCheck out the documentation atmodelparameters.readthedocs.io.The source code is hosted asbitbucket.org/finsberg/modelparametersLicensemodelparameters is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
modelparameters 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 Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with modelparameters. If not, seehttp://www.gnu.org/licenses/.ContributorsModelparameters is developed by Johan Hake. The version of modelparameters found in this
repository is maintained by Henrik Finsberg. Issues can be reported tohenriknf@simula.no
Package: model-performance
# Model Performance# IntroductionThis package calculates model performance metrics and confusion metrics at decile level of prediciton. Instead of calculating
the model performance at default probability cut-off of 0.5, this function divides prediction in 10 equal buckets and for each bucket
provides the model performance.# InputThe function “conf_matrix” requires an input dataset name, the prediction feature name and the target feature name# Resultsdecile_pred - Deciles of predictions.
cnt - Count of observations in each decile.
max_pred - Maximum probablity in each decile.
resp - Actual sum of target in each decile.
non_resp - Actual sum of non-target in each decile.
cumresp - Actual cumulative sum of target in each decile.
cumcnt - Cumulative count of observations in each decile.
resp_rate - Target rate of each decile.
lift - Lift in target rate of each decile. ex - By targeting top 20% customers we achieve 4x lift than random targeting.
tp - True positive at each decile cut-off.
fp - False positive at each decile cut-off.
tn - True negative at each decile cut-off.
fn - False negative at each decile cut-off.
precision - Precision at each decile cut-off.
recall - Recall at each decile cut-off.
fscore - Fscore at each decile cut-off.
ks - Maximum separation between target and non-target at each decile.# Contact
Mrinal Shankar (https://github.com/mrinal-shankar)