Saravanan666/pypi-org huggingface dataset:
Package: trainingopz
TrainingopzThis library is a pre-alpha right nowThe intent of this package is to work as a back-end build and deploy engine to take - given a configuration and an infrastructure,
on-demand scientific computing workflows.Application Configurationversionon:1docker_configuration:docker_registry:REPO_URLworkflow_validation:type:YAMLValidatorconf:project_path:/pipeline_composition:type:YAMLPipelineComposerconf:project_path:/package:type:DockerPackagerconf:project_path:/build_deployment_artifact:type:BuildAirflowArtifactconf:nulldeploy:type:AirflowDeployerconf:null
Package: training-pipeline
Training PipelineInstall for DevelopmentCreate virtual environment:cdtraining-pipeline
poetryshell
poetryinstallCheck theSet Up Additional ToolsandUsagesections to seehow to set uptheadditional toolsandcredentialsyou need to run this project.Check out thisMedium articlefor more details about this module.Usage for DevelopmentRun the scripts in the following order:Start the hyperparameter tuning script:python-mtraining_pipeline.hyperparameter_tuningUpload the best config based on the previous hyperparameter tuning step:python-mtraining_pipeline.best_configStart the training script using the best configuration uploaded one step before:python-mtraining_pipeline.trainNOTE:Be careful to set theML_PIPELINE_ROOT_DIRvariable as explain in thissection.
Package: training-rg
# training-rg
Training routine generator# Install
You can install the tools from the package manager pip:pip install training-rg# Use
It consists of several applications.## trg-seq
Generates training routines consecutively, with rest in between.# Help
Each application displays its help on screen with the –help parameter.
For more information [README.md](https://github.com/alexisdevsol89/training-rg/blob/main/README.md)# CreditsThe project has been designed and developed by Alexis Torres Valdes [alexisdevsol@gmail.com](alexisdevsol@gmail.com), its current maintainer.
Package: trainingsetai
Trainingset.ai Python SDKInstallpipinstalltrainingsetaiImport and Initialize a client sessionfromtrainingsetaiimportTrainingsetClientclient=TrainingsetClient("api_key")MethodsYou can use any parameters from the documentation availablehere.TasksGet tasksYou can load the tasks withget_tasksmethod:client.get_tasks({"limit":1})Create tasksThere is a method for each task type and it's very straightforward:annotation_task={"attachment_url":"http://placekitten.com/1920/1080","instructions":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.","objects_to_annotate":[{"label":"test","color":"rgba(0, 0, 0, 0)"}]}client.create_box_annotation_task(annotation_task)client.create_line_annotation_task(annotation_task)client.create_point_annotation_task(annotation_task)client.create_polygon_annotation_task(annotation_task)client.create_segmentation_task(annotation_task)client.create_point_cloud_annotation_task(annotation_task)categorization_task={"attachment_url":"http://placekitten.com/1920/1080","instructions":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.","categories":["category1","category2"]}client.create_image_categorization_task(categorization_task)ProjectsManaging projects is also a straightforward process:client.get_projects()client.create_project("test_project")client.delete_project("project_id")
Package: training-song
Training SongDescriptionPlays a Billboard Number 1 song corresponding to how accurate your ML model is.For example if your model is 95.5% accurate then you will hear the number 1 song from 50% through 1995 (Vogue by Madonna 👑).Take your metrics fromA Hard Day's Night(64%) toMo Money Mo Problems(97%).How to useOnce you've trained your model, simply wrap your metric in ts(..) as follows:fromtrainingsongimporttsmodel.fit(X_train,y_train)y_pred=model.predict(X_test)accuracy=ts(accuracy_score(y_test,y_pred))>>Congratsyourmodelgotanaccuracyof92percent!>>TheNumber1song92.0%throughthe1900sonthehot-100chartwasBlackOrWhitebyMichaelJackson.>>Thedatewas1992-01-01andthesongwasonthechartfor7weeks.InstallationUse the package managerpipto install trainingsong.pipinstalltraining-songLocal DevelopmentThe API docs can be foundhereYou can install the development dependencies with:poetryinstallAnd you can run the tests usingpoetryrunpytestBefore committing, please run the following to run the tests:toxIt's recommended to use uvicorn to run the server locally, which is
installed as a dependency.Please create a Postgres database and set the DATABASE_URL as an environment
variable in the .env file. The db.py file defines the schema and gives a function
to create the table.Additionally if you're editing the main API then you will need to create aSpotify appand set include the CLIENT_ID and CLIENT_SECRET as environment variables.
In this case you will also need to setup aVercelaccount and deploy the API to it.
Then you can use theVercel CLIto run the server locally.vercel.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMITAcknowledgementsThanks toSpotifyfor the API andBillboardfor the data.
Package: trainingutils
Training UtilitiesInstallationThis package is available on PIPY to install using the following command:pip install trainingutilsAboutThis package is built to streamline the training process. It contains functionality to assist with training, setting up models, and other types of functionality. It's target audience are people who want a high-level api to train various models without having to worry about all the nitty-gritty parts of saving figures, checkpointing, parallel processing, and provides a few different apis for the different kinds of deep learning models that are popular.As this is a fairly new package, it is not yet comprehensive. If it gains enough popularity it could allow for the greater integration of ML and DL models into modern day software.ContributingIf you would like to contribute to building this package, make a fork of this repository. Once you've made your changes you can create a merge request. This package is in it's preliminary stages, so there is a lot of work to be done.
Package: train-invaders
Train InvadersJupyter Notebook + Space Invaders!?Why?•Getting started•How it works•FAQ•Drawbacks•Contribute•Thanks to•You may also like...Why❓Training a model can be a long long process!In the meantime, have a bit of fun with acompetitive space invaders game.See if you can get your name to the top of theleaderboard.Getting started 🏁Install the game:!pip3 install train_invaders --upgradeImport the game in your notebook:import train_invaders.startStart training your model. The game will automatically pop up when the process begins.Play the game!You'll get notified when your training is finished.Want to stop the game from popping up when the model is being trained?import train_invaders.stopwill do the work.How it works ⚙️Tons of magic... Just kidding :)When importing thestartmodule, its code will be executed.The code utilizes python'ssettracefunction which follows the functions' call stack.When a function namedfittrainortrain_on_batchis called - using Jupyter notebook's kernel, aka,IPython, a javascript view code will be injected inside the output block as aniframeto keep it completelyisolated from your code.When importing thestopmodule, thesettracefunction will be canceled and the function hooks will be removed.FAQ 🙋Will it interfere with the training process somehow?NO. The game will start and be playedin parallel to the trainingand will evenlet you know when the training is finished.Drawbacks 🥺Training stop indication is only in Jupyter Notebook. Want to get notified by email or text? TryMLNotifyAuthentication, and therefore, saving your score can only be done fromlocalhostand port8888 - 8891 / 8080 / 8081Contribute 🤝Have an awesome idea for a new feature? PRs are more than welcome!Clone the projectRunmake build-gameto get a local and compiled copy of the game (if not exists)Entersrc/viewdirectory and runnpm run serveto run the local environmentImplement your ideasMade changes in the game (C files)? Re-runmake build-gamefrom root dir and check them outEnter root directory, runmake build,pip install . --upgradeand test the changes in your notebookPR us!Thanks to 🙏JanSiebertfor the WebAssembly game.Cody Boisclairfor the PressStart2P font.Vuefor the awesome FE framework.You may also ❤️Aporia- Customized monitoring for your ML models.MLNotify- Get notified when training is complete.MLOps Toys- A curated list of useful MLOps tools.
Package: trainkit
# Class Based Machine LearningThis project is an attempt to leverage a more class-based organizational structure to machine learning to simplify the training process. It relies on pytorch, as apparently that is the framework most useful for research/playing around that interests me and most tinkerers.## Support this ProjectIf you find this project useful and would like to support its development, you can buy a cup of coffee on [Ko-fi](https://ko-fi.com/scholarlysalmons).
Package: trainlog
TrainlogA simple logging library, designed for deep learning.Trainlog's aim is to make it easy to create a single file containing all
key info about a training run. We prioritize convenience and ease of use
over efficiency.DocumentationCodeRelease notespipinstalltrainlogExampleCode to generate the log looks like this:importtrainlogasLwithL.logger.open("log.jsonl",lr=0.01)aslogger:logger.add("step",loss=10)logger.add("step",loss=5)logger.add("step",loss=2.5)You can inspect the log using standard toolsgzip -cd log.jsonl.gz | jq -Cc . | less -R.Code to analyse the log looks like this:importtrainlogasLimporttrainlog.opsasOlog=L.logs.open("log.jsonl.gz")log=log.apply(O.header("lr"),O.count("step"))df=log["step"].to_pandas()print(df)See alsoDesign rationaleDeveloping trainlog yourself
Package: trainme
trainme - documentationAuthors@Aditta-daskaggle-autolgbtrainer is a combination of xgboost, lightgbm and optuna. I tried to make kaggle monthly competition simple. Its only working with classification problem.Installationpip install trainerFeaturesautotuneautotrainauto submission file generateauto predictionDeploymentfrom src.read_data import ReadFile

s = ReadFile(
	train_path="/home/aditta/Desktop/trainme/trainme/input/multi_class_classification.csv",
	test_path="/home/aditta/Desktop/trainme/trainme/input/multi_class_classification_test.csv",
	label="target",
    	task_type="multi_classification",
	compare=False,
	fold="skfold",
	model_name="xgb",
	output_path="/media/aditta/NewVolume/amazon",
	study_name="new_train",
	store_file ="out9",
	n_trials=1
)

print(s.report())
print(s.train())LicenseApache 2.0
Package: trainmote-module-felix-nievelstein-de
TRAINMOTE SERVERInstall Trainmote serverFirst to install the Trainmote Module open the terminal and perform:sudo pip3 install trainmote-module-felix-nievelstein-deNext you have to activate I2C in your raspberry pi configurations. Herefore go to settings of your raspberry pi and select interfaces. Here activate the I2C interface.Great you are now ready to start the trainmote server with:sudo trainmote --autostartIf you use the option '--autostart' the trainmote server will start automatically on rasperry pi start.NOTE:Project based on python3. Therefor you have to use pip3.
Package: trainplot
trainplotDynamically updating plots in Jupyter notebooks, e.g. for visualizing training progress. Inspired bylivelossplot, and aims to be easier to use with better jupyter notebook support.InstallationpipinstalltrainplotUsageThis is a simple example (example notebook):fromtrainplotimportplotfromtimeimportsleepforiinrange(50):plot(loss=1/(i+1),acc=1-1/(.01*i**2+1))sleep(.1)Example for the tf/keras callback (example notebook):fromtrainplotimportTrainPlotKerasmodel=...model.fit(x_train,y_train,validation_data=(x_test,y_test),epochs=10,callbacks=[TrainPlotKeras()])It also works together with e.g.tqdm.notebookand printing (example notebook):fromtrainplotimportplotfromtqdm.notebookimporttrangefromtimeimportsleepforiintrange(50):plot(i=i,root=i**.5)ifi%10==0:print(f'currently at{i}iterations')sleep(0.1)You can make use of a TrainPlot object to add a bunch of custumizations (example notebook):fromtrainplotimportTrainPlotfromtimeimportsleeptp=TrainPlot(update_period=.2,fig_args=dict(nrows=2,ncols=2,figsize=(10,8),gridspec_kw={'height_ratios':[1,1],'width_ratios':[1,1]}),plot_pos={'loss':(0,0,0),'accuracy':(0,1,0),'val_loss':(1,0,0),'val_accuracy':(1,1,0)},plot_args={'loss':{'color':'orange'},'accuracy':{'color':'green'},'val_loss':{'color':'orange','label':'validation loss'},'val_accuracy':{'color':'green','label':'validation accuracy'}},)foriinrange(100,200):tp(step=i,loss=(i/100-2)**4,accuracy=i/2,val_loss=(i/100-2.1)**4,val_accuracy=i/2.1)sleep(0.1)More:When using a Trainplot object, you can also put the plot into a separate cell than the training loop:example notebookSupport forthreadingto improve runtime performance by parallelizationExperimental plotly support (from trainplot.trainplot import TrainPlotPlotlyExperimental):example notebookHow it worksTrainplot outputs the matplotlib figure to anipywidgets.Outputwidget, so it doesn't interfere with other outputs liketqdmor print statements. To avoid wasting resources and flickering, the figure is only updated with a givenupdate_period. This can also be done from a separatethreading.Thread, to not block the main thread.
Apost_run_cellcallback is added to theIPythoninstance, so that all updated TrainPlot figures include all new data when a cell execution is finished.
When usingtrainplot.plot, a TrainPlot object is created for the current cell and cell-execution-count.
Package: trains-jupyter-plugin
TRAINSJupyter Plugintrains-jupyter-pluginis a jupyter notebook extension enabling users to push ipython notebooks to a git repository,
using the gitbuttonadded to the notebook toolbar.After saving a notebook, a user can push the notebook to a predefined git repository. The extension currently supports pushing to a predefined branch in the repository.When clicking theversion-controlbutton:The notebook.ipynbfile will be pushed to the git repository based on the folder structure in which it is locatedThe notebook will also be converted to a.pyscript, pushed alongside the.ipynbfileArequirements.txtwill be created and updated according to the notebook imports, and pushed alongside the.ipynbfileFor example, if you have two repositories:repo1/
├── .git
└── experiment1/
   └── notebook.ipynb

repo2/
├── .git
└── experiment2/
   └── notebook2.ipynbnotebook1.ipynbwill be pushed to therepo1repository, andnotebook2.ipynbwill be pushed to therepo2repository.In order to select the predefined branch into which the files will be pushed, usegit checkouton the jupyter host machine.For example, switch tobranch2inrepo2:$ cd ~/repo2
$ git checkout branch2From this point onwards the jupyter notebook push will be done to thebranch2branch in therepo2repository.InstallationInstall directly from pypi:pip install trains-jupyter-plugin

if [ ! -f ~/.jupyter/jupyter_notebook_config.py ]; then
   jupyter notebook --generate-config
fi

jupyter serverextension enable --py trains-jupyter-plugin
sudo jupyter nbextension install --py trains-jupyter-pluginTo enable the extension for all notebooks:jupyter nbextension enable --py trains-jupyter-pluginHow to useInstall package using the commandsaboveClone your git repository to a folder that will be assigned to a specific userCheckout a specific branch for the current userMake sure git is configured with the correct credentials
(we recommend verifying a password/passphrase is required when pushing)Run jupyter notebookAny commit/push of notebooks from this specific folder will be done to the selected branchScreenshotsCreditsThanks toLab41/sunny-side-up&sat28/githubcommitfor laying the foundations for this extension.
Package: trainstation
trainstationis a tool that allows the efficient construction of linear models.
It provides supplementary functionality for handling data and model metrics and relies on thescikit-learnlibrary for the actual training.
Many examples for the application oftrainstationcan be found in the documentation ofhiphiveandicet.trainstationhas been developed  at theDepartment of PhysicsofChalmers University of Technologyin Gothenburg, Sweden.
Please consult thecredits pagefor information on how to citetrainstation.
The development oftrainstationis hosted ongitlab.
Bugs should be submitted via thegitlab issue tracker.Installationtrainstationcan be installed viapip:pip3 install trainstationIf you want to get the absolutely latest version you can install from the repo:pip3 install -e git+https://gitlab.com/materials-modeling/trainstation#egg=trainstation
Package: train-time
train_timetrain_timeis a Python package that provides a callback for machine learning training processes, particularly useful when using TensorFlow/Keras. It estimates and displays the remaining training time for each epoch during the model training process. The package allows users to view the remaining time in their preferred format: seconds, minutes, hours, or days.FeaturesEasy integration with TensorFlow/Keras training loops.Customizable time format for estimated training time display.Lightweight and easy to use.InstallationNote: this doesnt work with python 3.12 for nowYou can installtrain_timedirectly from PyPI:pipinstalltrain_timeUsageTo usetrain_timein your machine learning project, simply import the package and add it to your model's callbacks. Here is a basic example:importtensorflowastffromtrain_timeimporttrain_time# Define your modelmodel=tf.keras.models.Sequential([# ... your model layers ...])# Compile your modelmodel.compile(optimizer='adam',loss='loss_function')# Instantiate the callbacktime_callback=train_time(time_format='minutes')# Train the model with the callbackmodel.fit(x_train,y_train,epochs=10,callbacks=[time_callback])In this example,time_formatcan be 'seconds', 'minutes', 'hours', or 'days', depending on your preference.ContributingContributions totrain_timeare welcome!LicenseThis project is licensed under the MIT License - see the LICENSE file for details.AcknowledgmentsThanks to everyone who has contributed to the development of this package.Special thanks to the TensorFlow and Keras communities for their invaluable resources.
Package: traintorch
Traintorch (alpha)Package for live visualization of model validation metrics during training of a machine learning model in jupyter notebooks. The package utilizes a sliding window mechanism to reduce memory usage.Requirements:pandas==0.25.1
matplotlib==3.1.1
ipython==7.8.0
numpy==1.17.2
pycm==2.2Installation:Latest release:pip install traintorchLatest Versionpip install git+https://github.com/rouzbeh-afrasiabi/traintorch.gitExampleSimple Usagefromtraintorchimport*#custom metricsfirst=metric('Loss',w_size=10,average=False)second=metric('Accuracy',w_size=10,average=False)#create an instance of traintorchtracker=traintorch(n_custom_plots=2,main_grid_hspace=.1,figsize=(15,10),show_table=True)#combine all metrics togethertracker.append([first,second])range_max=1000foriinrange(0,range_max,1):first.update(train_loss=1/(i+1),test_loss=1/(i**2+1))second.update(y=i/(i*2+1))tracker.plot()Using pycm metrics and doing comparisonfromtraintorchimport*#custom metricfirst=metric('Loss',w_size=10,average=False)#pycm metricsoverall_selected=['ACC Macro']cm_metrics_a=pycmMetrics(overall_selected,name='train',w_size=10)cm_metrics_b=pycmMetrics(overall_selected,name='test',w_size=10)#compare two metrics of the same kindcompare_a=collate(cm_metrics_a,cm_metrics_b,'ACC Macro')#create an instance of traintorchtracker=traintorch(n_custom_plots=1,main_grid_hspace=.1,figsize=(15,15),show_table=True)#combine all metrics togethertracker.append([first,cm_metrics_a,cm_metrics_b,compare_a])range_max=1000foriinrange(0,range_max,1):actual_a=np.random.choice([0,1],size=(20,),p=[1./3,2./3])predicted_a=np.random.choice([0,1],size=(20,),p=[1-(i/range_max),i/range_max])actual_b=np.random.choice([0,1],size=(20,),p=[1./3,2./3])predicted_b=np.random.choice([0,1],size=(20,),p=[1-(i/range_max),i/range_max])cm_metrics_a.update(actual_a,predicted_a)cm_metrics_b.update(actual_b,predicted_b)first.update(train=1/(i+1),test=1/(i**2+1))compare_a.update()tracker.plot()
Package: traintrack
TrainTrack MLQuickly run stages of an ML pipeline from the command lineDocumentationWelcome to repository and documentation the TrainTrack library. Detailed documentation coming very soon! Seeherefor the documentation of the examples of this library.InstallTrainTrack is most easily installed with pip:pip install traintrackObjectiveThe aim of TrainTrack is simple: Given any set of self-containedPytorch Lightningmodules, run them in a serial and trackable way.At its heart, TrainTrack is nothing more than a loop over the stages defined in apipeline.yamlconfiguration file. However, it can also handle data processing steps (i.e. non-trainable modules), automatically creates grid scans over combinations of hyperparameters, logs training with (currently) either Tensorboard or Weights & Biases, and can run separate, dependent Slurm batch jobs. It also has an opinionated approach to how data is passed from stage to stage, via Lightning callbacks. In this way, the only code that needs to be written is Lightning modules, all other boilerplate and tracking is handled by TrainTrack.Exampletraintrackuses two ingredients to run and track your training pipeline:A project configuration fileA pipeline configuration fileIt also makes one or two assumptions about the structure of your project. For projectMyFirstMNIST, we should structure it as📦 MyFirstMNIST
┣ 📂 architectures
┣ 📂 notebooks
┣ 📂 configs
┃ ┣ 📜 project_config.yaml
┃ ┗ 📜 my_first_pipeline.yaml
┗ 📂 logsNote:Onlyconfigs/project_config.yamlis a required file. All else is configurable. An exampleproject_config.yaml:# project_config.yaml

# Location of libraries
libraries:
    model_library: architectures
    artifact_library: /my/checkpoint/directory
    

# The lines you would like/need in a batch script before the call to pipeline.py
custom_batch_setup:
    - conda activate my-favorite-environment
    
# If you need to set up some environment before a batch is submitted, define it here in order of commands to run
command_line_setup:
    - module load cuda
    
# If you need to run jobs serially, set to true
serial: False

# Which logger to use - options are Weights & Biases [wandb], TensorBoard [tb], or [None]
logger: wandbWe can launch a vanilla run of TrainTrack withtraintrack configs/my_first_pipeline.yamlThis trains and performs inference callbacks in the terminal.A PipelineThe pipeline config file defines a pipeline, for example:# my_first_pipeline.yaml

stages:
    - {set: CNN, name: ResNet50, config: test_train.yaml}which presumes a directory structure of:📦 MyFirstMNIST
┣ 📂 architectures
┃ ┗ 📂 CNN
┃ ┃ ┣ 📜 cnn_base.py
┃ ┃ ┣ 📜 test_train.yaml
┃ ┃ ┗ 📂 Models
┃ ┃ ┃ ┗ 📜 resnet.pyAgain, seethis repositoryfor example pipelines in action.