Saravanan666/pypi-org huggingface dataset:
Package: autora-experimentalist-sampler-novelty
AutoRA Novelty SamplerThe novelty sampler identifies experimental conditions $\vec{x}' \in X'$ with respect to
a pairwise distance metric applied to existing experimental conditions $\vec{x} \in X$:$$
\underset{\vec{x}'}{\arg\max}~f(d(\vec{x}, \vec{x}'))
$$where $f$ is an integration function applied to all pairwise  distances.ExampleFor instance,
the integration function $f(x)=\min(x)$ and distance function $d(x, x')=|x-x'|$ identifies
condition $\vec{x}'$ with the greatest minimal Euclidean distance to all
existing conditions in $\vec{x} \in X$.$$
\underset{\vec{x}}{\arg\max}~\min_i(\sum_{j=1}^n(x_{i,j} - x_{i,j}')^2)
$$To illustrate this sampling strategy, consider the following four experimental conditions that
were already probed:$x_{i,0}$$x_{i,1}$$x_{i,2}$000100010001Fruthermore, let's consider the following three candidate conditions $X'$:$x_{i,0}'$$x_{i,1}'$$x_{i,2}'$111222333If the novelty sampler is tasked to identify two novel conditions, it will select
the last two candidate conditions $x'{1,j}$ and $x'{2,j}$ because they have the greatest
minimal distance to all existing conditions $x_{i,j}$:Example Codeimportnumpyasnpfromautora.experimentalist.sampler.noveltyimportnovelty_sampler,novelty_score_sampler# Specify X and X'X=np.array([[1,2,3],[4,5,6],[7,8,9],[10,11,12]])X_prime=np.array([[1,1,1],[2,2,2],[3,3,3]])# Here, we choose to identify two novel conditionsn=2X_sampled=novelty_sampler(condition_pool=X_prime,reference_conditions=X,num_samples=n)# We may also obtain samples along with their z-scored novelty scores(X_sampled,scores)=novelty_score_sampler(condition_pool=X_prime,reference_conditions=X,num_samples=n)
Package: autora-experimentalist-sampler-uncertainty
AutoRA Uncertainty SamplerThe uncertainty sampler identifies experimental conditions $\vec{x}' \in X'$ with respect model uncertainty. Within the uncertainty sampler, there are three methods to determine uncertainty:Least Confident$$
x^* = \text{argmax} \left( 1-P(\hat{y}|x) \right),
$$where $\hat{y} = \text{argmax} P(y_i|x)$Margin$$
x^* = \text{argmax} \left( P(\hat{y}_1|x) - P(\hat{y}_2|x) \right),
$$where $\hat{y}_1$ and $\hat{y}_2$ are the first and second most probable class labels under the model, respectively.Entropy$$
x^* = \text{argmax} \left( - \sum P(y_i|x)\text{log} P(y_i|x) \right)
$$Example Codefrom autora.experimentalist.sampler.uncertainty import uncertainty_sampler
from sklearn.linear_model import LogisticRegression
import numpy as np

#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1)
n = 5

#Theorists
lr_theorist = LogisticRegression()
lr_theorist.fit(X,y)

#Sampler
X_new = uncertainty_sampler(X, lr_theorist, n, measure ="least_confident")
Package: autora-experimentalist-uncertainty
AutoRA Uncertainty ExperimentalistThe uncertainty experimentalist identifies experimental conditions $\vec{x}' \in X'$ with respect model uncertainty. Within the uncertainty experimentalist, there are three methods to determine uncertainty:Least Confident$$
x^* = \text{argmax} \left( 1-P(\hat{y}|x) \right),
$$where $\hat{y} = \text{argmax} P(y_i|x)$Margin$$
x^* = \text{argmax} \left( P(\hat{y}_1|x) - P(\hat{y}_2|x) \right),
$$where $\hat{y}_1$ and $\hat{y}_2$ are the first and second most probable class labels under the model, respectively.Entropy$$
x^* = \text{argmax} \left( - \sum P(y_i|x)\text{log} P(y_i|x) \right)
$$Example Codefrom autora.experimentalist.uncertainty import uncertainty_sample
from sklearn.linear_model import LogisticRegression
import numpy as np

#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1)
n = 5

#Theorists
lr_theorist = LogisticRegression()
lr_theorist.fit(X,y)

#Experimentalist
X_new = uncertainty_sample(X, lr_theorist, n, measure ="least_confident")
Package: autora-experiment-runner-experimentation-manager-firebase
AutoRA Firebase Experimentation ManagerFirebase Experimentation Manager provides functionality to manage communication of conditions and observation between AutoRA and an experiment on Firebase.Quickstart GuideYou will need:python>=3.8,<4:https://www.python.org/downloads/!!! It is recommended to use a python environment manger like virtualenvInstall the package via pip:pipinstall"aurora[experiment-runner-experimentation-manager-firebase]"Testpython-c"from autora.experiment_runner.experimentation_manager.firebase import send_conditions"Dependenciesautora-core, firebase_admin
Package: autora-experiment-runner-firebase-prolific
Firebase Prolific Experiment RunnerFirebase Prolific Runner provides runners to run experiments with Firebase and ProlificWARNING:The firebase prolific runner creates an experiment on prolific and runs recruits participants automatically. This is an
early alpha version and should be used with extreme caution.Quick StartInstall this in an environment using your chosen package manager. In this example we are using virtualenvInstall:python (3.8 or greater):https://www.python.org/downloads/virtualenv:https://virtualenv.pypa.io/en/latest/installation.htmlInstall the Prolific Recruitment Manager as part of the autora package:pip install -U "autora[experiment-runner-firebase-prolific]"WARNING:Both runners work with a specific set up of the firebase database. For starters, follow this guide to set up an experiment using firebase here:https://github.com/AutoResearch/cra-template-autora-firebase
Package: autora-experiment-runner-recruitment-manager-prolific
AutoRA Prolific Recruitment ManagerProlific Recruitment Manager provides functionality to recruit participants via Prolific to set up an experiment runner for AutoRA.Quickstart GuideYou will need:python>=3.8,<4:https://www.python.org/downloads/!!! It is recommended to use a python environment manger like virtualenvInstall the package via pip:pipinstall"aurora[experiment-runner-recruitment-manager-prolific]"Testpython-c"from autora.experiment_runner.recruitment_manager.prolific import setup_study"Dependenciesautora-core
Package: autora-synthetic
AutoRA Synthetic DataSynthetic experiment data for testing AutoRA theorists and experimentalists.User GuideYou will need:python3.8 or greater:https://www.python.org/downloads/Install the synthetic data package (as part ofautora):pipinstall-U"autora"💡We recommend using apythonenvironment manager likevirtualenv.Print a description of the prospect theory model by Kahneman and Tversky by running:python-c"from autora.experiment_runner.synthetic.economics.prospect_theory import prospect_theorystudy = prospect_theory()print(study.description)"For more information, see thedocumentation.
Package: autora-theorist-bms
AutoRA Bayesian Machine Scientistautora-theorist-bmsis a Python module built on AutoRA that can be used to discover equations that fit data.Website:https://autoresearch.github.io/autora/User GuideYou will need:python3.8 or greater:https://www.python.org/downloads/Install BMS as part of theautorapackage:pipinstall-U"autora[theorist-bms]"--preIt is recommended to use apythonenvironment manager likevirtualenv.Check your installation by running:python-c"from autora.theorist.bms import BMSRegressor; BMSRegressor()"
Package: autora-theorist-bsr
AutoRA Bayesian Symbolic Regressionautora-theorist-bsris a Python module built on AutoRA that can be used to discover equations that fit data.Website:https://autoresearch.github.io/autora/User GuideYou will need:python3.8 or greater:https://www.python.org/downloads/Install BSR as part of theautorapackage:pipinstall-U"autora[theorist-bsr]"--preIt is recommended to use apythonenvironment manager likevirtualenv.Check your installation by running:python-c"from autora.theorist.bsr import BSRRegressor; BSRRegressor()"
Package: autora-theorist-darts
AutoRA Differentiable Architecture Searchautora-theorist-dartsis a Python module for fitting data using differentiable architecture
search, built on AutoRA.Website:https://autoresearch.github.io/autora/User GuideYou will need:python3.8 or greater:https://www.python.org/downloads/graphviz(optional, required for computation graph visualizations):https://graphviz.org/download/Install DARTS as part of theautorapackage:pipinstall-U"autora[theorist-darts]"--preIt is recommended to use apythonenvironment manager likevirtualenv.Check your installation by running:python-c"from autora.theorist.darts import DARTSRegressor; DARTSRegressor()"
Package: autora-workflow
WorkflowWorkflow management tools for AutoRA.Quickstart GuideYou will need:python3.8 or greater:https://www.python.org/downloads/Workflow is a part of theautorapackage:pipinstall-U"autora"!!! success
It is recommended to use apythonenvironment manager likevirtualenv.Check your installation by running:python-mautora.workflow--help
Package: autoray
autorayis a lightweight python AUTOmatic-arRAY library for
abstracting your tensor operations. Primarily it provides anautomaticdispatch mechanismthat means you can write backend agnostic code that works for:numpypytorchjaxcupydaskautogradtensorflowsparsemars... and indeedanylibrary that provides a numpy-ishapi, even if it
knows nothing aboutautoray.Beyond that, abstracting the array interface allows you to:swapcustom versions of functionsfor specific backendstrace through computationslazilywithout actually
running themautomaticallyshare intermediates and fold constantsin computationscompile functions with aunified interfacefor different
backendsBasic usageThe main function ofautorayisdo,
which takes a function
name followed by*argsand**kwargs, and automatically looks up (and
caches) the correct function to match the equivalent numpy call:fromautorayasardefnoised_svd(x):# automatic dispatch based on supplied arrayU,s,VH=ar.do('linalg.svd',x)# automatic dispatch based on different arraysn=s+0.1*ar.do('random.normal',size=ar.shape(s),like=s)# automatic dispatch for multiple arrays for certain functionsreturnar.do('einsum','ij,j,jk->ik',U,sn,VH)# explicit backend given by stringx=ar.do('random.uniform',size=(100,100),like="torch")# this function now works for any backendy=noised_svd(x)# explicit inference of backend from arrayar.infer_backend(y)# 'torch'If you don't like the explicitdosyntax, or simply want a
drop-in replacement for existing code, you can also import theautoray.numpymodule:fromautorayimportnumpyasnp# set a temporary default backendwithar.backend_like('cupy'):z=np.ones((3,4),dtype='float32')np.exp(z)# array([[2.7182817, 2.7182817, 2.7182817, 2.7182817],#        [2.7182817, 2.7182817, 2.7182817, 2.7182817],#        [2.7182817, 2.7182817, 2.7182817, 2.7182817]], dtype=float32)Custom backends and functions can be dynamically registered with:register_backendregister_functionThe main documentation is available atautoray.readthedocs.io.
Package: autoread-dotenv
InstallationInstall via pip:>bin/pipinstallautoread-dotenvOr add to your poetry-based project:>poetryaddautoread-dotenvUsageThe only thing left to do for you is the create a.envin the root of your project.Registered sitecustomize-entrypointTheautoread_dotenv.entrypoint-function is registered as asitecustomize-entrypoint in our pyproject.toml_:[tool.poetry.plugins][tool.poetry.plugins."sitecustomize"]autoread_dotenv="autoread_dotenv:entrypoint"Sitecustomize and all its registered entrypoints will be executed at the start ofeverypython-process.
For more information, please seesitecustomize-entrypointsCompatibilityautoread-dotenvworks on Python 3.8+, including PyPy3. Tested until Python 3.11,Notable dependenciessitecustomize-entrypointspython-dotenv
Package: autoreadme
autoreadmeGenerate READMEs with collapsable* code and corresponding output from Python.Installationfrom package# Set up a virtualenv.python3-mvenvvenvsourcevenv/bin/activate# Install from PyPIpipinstallautoreadmefrom sourcegitclonehttps://github.com/davips/autoreadmecdautoreadmeExampleA typicalREADME-edit.mdfile would be:# UsesWe can cook using the following Python code:
<<cook>>

However, we can also clean:
<<clean>>The example file (given in this repo asexamples/README-edit.md) depends on two scripts. Each script should have
a# ...line where the output until that moment is expected to appear:examples/cook.py:# Cookingx=2*8print("This script prints something:",x)# ...examples/clean.py:# Cleaningy=34%5print("this script prints another thing.",y)# ...Running...autoreadme-iexamples/README-edit.md-sexamples/-oexamples/README.mdexamples/README-edit.md...will result in the following markdown:# UsesWe can cook using the following Python code:Cookingx=2*8print("This script prints something:",x)This script prints something: 16However, we can also clean:Cleaningy=34%5print("this script prints another thing.",y)this script prints another thing. 4
Package: autorecipes
GenericConanrecipes for C/C++ and Python projects.C/C++If your projectusesCMake,and installs apackage configuration filethat defines the variable<PACKAGE_NAME>_COMPONENTSwith a list of components,and for each of them defines a target<package_name>::<component>,then you should be able to copy this recipe to package it for Conan:fromconansimportpython_requiresCMakeConanFile=python_requires('autorecipes/[*]@jfreeman/testing').cmake()classRecipe(CMakeConanFile):name=CMakeConanFile.__dict__['name']version=CMakeConanFile.__dict__['version']PythonIf your projectusesPoetry,with apyproject.tomlpackage metadata file as defined inPEP 518,then you should be able to copy this recipe to package it for Conan:fromconansimportpython_requiresPythonConanFile=python_requires('autorecipes/[*]@jfreeman/testing').python()classRecipe(PythonConanFile):name=PythonConanFile.__dict__['name']version=PythonConanFile.__dict__['version']FAQWhy do I need to copy thenameandversionattributes from
the base class?Conan parses the recipe looking for thenameandversionattributes,
instead of just executing it. Thus, we must copy the attributes to move past
that check.Further, these attributes aredescriptors. Accessing them with dot
notation, likeCMakeConanFile.name, evaluates them against the classCMakeConanFileinstead of your recipe, but they need the most derived
type to work correctly.Can I override some attributes?Yes. These base classes just provide default values.
Package: autoredteam
autoredteamAutomated Red Teaming Test suite byvijil.CLI calling patternsThe CLI functionality ofautoredteamis intended to be a streamlined, drop-in replacement ofgarak.
Currently, you can use it to kick off tests by either module (--tests) or dimension (--dimensions).python -m autoredteam --model_type <> --model_name <> --tests <>
python -m autoredteam --model_type <> --model_name <> --dimensions <>We currently support LLMs hosted on a number of model providers as agents. For a model provider, there are three possible deployment types: local model, public API, and private endpoint. Some providers offer only a subset of these deployment types.The following table provides respective--model_typevalues for each such provider x deployment type. If a deployment type is not listed for a provider, the respective radio button should be inactive in the GUI.AgentDeployment Typemodel_typeAnyscalepublic APIanyscaleHugging Facepublic APIhuggingfaceprivate endpointhuggingface.InferenceEndpointMistralpublic APImistralReplicatepublic APIreplicateprivate endpointreplicate.ReplicateEndpointOctoAIpublic APIoctoprivate endpointocto.OctoEndpointOpenAIpublic APIopenaiTogetherpublic APItogether
Package: auto-red-test
项目描述通过解析IDL自动生成PyTest单测框架,
通过Faker库辅助生成部分参数,
并且支持单测参数和单测逻辑的向后兼容安装pipinstallpytestpipinstallpyamlpipinstallFaker==1.0.4pipinstallbsonpipinstalldictdiffer示例代码fromauto_red_testimportgenerate_red_testfromframeimportENVfromhandler.stockage_handlerimportStockageHandler#需要单测的handlerimportstockage_service.request.ttypesastest_request#idl的request文件importstockage_service.StockageServiceastest_service#idl的service文件root_path=ENV['root']#项目的根目录#第二个参数可以是handler列表，但必须属于同一个servicegenerate_red_test(root_path,StockageHandler,test_service,test_request)自动生成的单测框架如下：补充内容第一次运行会生成request_config.yaml，可以自定义单测方法的参数，用于解决一个单测方法用到多个request的特殊情况，
格式如下：#配置单测参数methodA:request_A_name:request_A_obj_namerequest_B_name:request_A_obj_namemethodB:request_B_name:request_B_obj_namerequest_C_name:request_C_obj_namemethodA为单测方法名， request_A_name为请求参数名，request_A_obj_name为请求参数对应的IDL Request名
Package: autoreduce-rest-api
Autoreduction v20.1A service for automated batch processing of jobs specifically design for use atISIS Neutron and Muon Facility. For further documentation see alsoWiki.In one (not complete) picture the Autoreduction service is:The code for monitors of experiments, i.e. that send messages to the Messenging server when experiments are ready to be reduced (processed) is in monitors folder. The code for processors which consume/subscribe to Messenging queues and run jobs on the compute nodes are in the QueueProcessors folder. Finally, the code for the WebApp, which is used to monitor the system by both users and those who support the service is located in the WebApp folder.This service discovers raw data automatically, reduces it (performs some processing on them) and stores the result. The results are rendered by the web application which allows the user and support staff to monitor the system and rerun jobs manually as needed.
Package: autoregistry
AutoRegistryInvoking functions and class-constructors from a string is a common design pattern
that AutoRegistry aims to solve.
For example, a user might specify a backend of type"sqlite"in a yaml configuration
file, for which our program needs to construct theSQLitesubclass of ourDatabaseclass.
Classically, you would need to manually create a lookup, mapping the string"sqlite"to
theSQLiteconstructor.
With AutoRegistry, the lookup is automatically created for you.AutoRegistry has a single  powerful classRegistrythat can do the following:Be inherited to automatically register subclasses by their name.Be directly invokedmy_registry = Registry()to create a decorator
for registering callables like functions.Traverse and automatically create registries for other python libraries.AutoRegistry is also highly configurable, with features like name-schema-enforcement and name-conversion-rules.Checkout the docs for more information.Watch AutoRegistry in action!InstallationAutoRegistry requires Python>=3.8.python-mpipinstallautoregistryExamplesClass InheritanceRegistryadds a dictionary-like interface to class constructors
for looking up subclasses.fromabcimportabstractmethodfromdataclassesimportdataclassfromautoregistryimportRegistry@dataclassclassPokemon(Registry):level:inthp:int@abstractmethoddefattack(self,target):"""Attack another Pokemon."""classCharmander(Pokemon):defattack(self,target):return1classPikachu(Pokemon):defattack(self,target):return2classSurfingPikachu(Pikachu):defattack(self,target):return3print(f"{len(Pokemon)}Pokemon types registered:")print(f"{list(Pokemon)}")# By default, lookup is case-insensitivecharmander=Pokemon["cHaRmAnDer"](level=7,hp=31)print(f"Created Pokemon:{charmander}")This code block produces the following output:3 Pokemon types registered:
    ['charmander', 'pikachu', 'surfingpikachu']
Created Pokemon: Charmander(level=7, hp=31)Function RegistryDirectly instantiating aRegistryobject allows you to
register functions by decorating them.fromautoregistryimportRegistrypokeballs=Registry()@pokeballsdefmasterball(target):return1.0@pokeballsdefpokeball(target):return0.1forballin["pokeball","masterball"]:success_rate=pokeballs[ball](None)print(f"Ash used{ball}and had{success_rate=}")This code block produces the following output:Ash used pokeball and had success_rate=0.1
Ash used masterball and had success_rate=1.0Module RegistryCreate a registry for another python module.importtorchfromautoregistryimportRegistryoptims=Registry(torch.optim)# "adamw" and ``lr`` could be coming from a configuration file.optimizer=optims["adamw"](model.parameters(),lr=3e-3)assertlist(optims)==["asgd","adadelta","adagrad","adam","adamw","adamax","lbfgs","nadam","optimizer","radam","rmsprop","rprop","sgd","sparseadam","lr_scheduler","swa_utils",]
Package: autoregression
# AutoregressionHere are the tools to automatically assess and test multiple workingmachine learning techniques.## InstallationA `setup.py` file is included. To install into a python environment run```bashpip install git+https://github.com/pgeurin/autoregression.git```Included are two extra modules:##GalgraphsHere you will find graphing functions for numpy arrays and pandas dataframes.Graphs with ax take a axis from matplotlib.Use pattern matplotlib 'fig, ax = subplots(1,1)' for best effect.Graphs without an 'ax' input plot themselves.The code used here HEAVILY relies upon the foundational work of Matt Drury.This project just wouldn't be the same without it.Pandas and matplotlib. are also foundational tools to the work.How to use the documentation----------------------------Documentation in docstrings provided with the code.We recommend exploring the docstrings using`IPython <http://ipython.org/>`_, an advanced Python shell withTAB-completion and introspection capabilities.Use the built-in ``help`` function to view a function's docstring::Available graphs:---------------------'emperical_distribution','one_dim_scatterplot','plot_emperical_distribution','plot_many_predicteds_vs_actuals','plot_many_residuals','plot_one_univariate','plot_solution_paths','plot_univariate_smooth','predicteds_vs_actuals','residual_plot','simple_indicator_specification','simple_spline_specification','standardize_y','train_test_split'##CleandataCleans pandas dataframes using modern machine learning practices.Turn first to clean_df(). It's your friend in a world of darkness.It detects all manner of unmentionable values and replaces them with the mean ordistinguishing feature.## Versioning0.0.1 - Working graphs.0.0.2 - Documentation.0.0.3 - More graphs.0.0.4 - Cleaning. AutoRegression.
Package: autoregressor
autoregressorYou can install autoregressor from PyPI$ pip install autoregressorOnce the library is installed, import the modules in your python notebook or any IDE of your choice.$ import autoregreessor
from autoregressor import computeWe now have the package imported. To use the library, we use:prediction = autoregressor(X_train , y_train , X_test)Where,prediction - Predicted output of the Regression model.X_train - Training datasety_train - Target variable of the training dataset
*X_test - Testing dataset