{"id":29284868,"url":"https://gitlab.com/andreafavia/yaket","last_synced_at":"2026-03-07T05:06:52.922Z","repository":{"id":50298675,"uuid":"37833163","full_name":"andreafavia/yaket","owner":"andreafavia","description":"YAKET: YAML Keras Trainer (or Yet Another Keras Trainer) is a simple and lightweight trainer module to help you quickly develop Keras models by defining parameters directly from a YAML file.\r\n","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":null,"default_branch":"main","last_synced_at":"2026-01-05T05:31:57.618Z","etag":null,"topics":["keras","python3","tensorflow","trainer"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":null,"metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-14T19:51:16.070Z","updated_at":"2022-10-30T00:18:08.836Z","dependencies_parsed_at":"2022-08-20T10:40:40.331Z","dependency_job_id":null,"html_url":"https://gitlab.com/andreafavia/yaket","commit_stats":null,"previous_names":[],"tags_count":15,"template":null,"template_full_name":null,"purl":"pkg:gitlab/andreafavia/yaket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/andreafavia%2Fyaket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/andreafavia%2Fyaket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/andreafavia%2Fyaket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/andreafavia%2Fyaket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/andreafavia","download_url":"https://gitlab.com/andreafavia/yaket/-/archive/main/yaket-main.zip","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/andreafavia%2Fyaket/sbom","scorecard":null,"host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4521539,"owners_count":7348,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2026-01-12T22:45:04.389Z","status":"online","status_checked_at":"2026-03-07T02:00:07.106Z","response_time":242,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.382Z","robots_txt_url":"https://gitlab.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["keras","python3","tensorflow","trainer"],"created_at":"2025-07-05T22:01:40.498Z","updated_at":"2026-03-07T05:06:52.904Z","avatar_url":null,"language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAKET: Yaml Keras Trainer (or Yet Another Keras Trainer)\n\n[![pipeline status](https://gitlab.com/andreafavia/yaket/badges/main/pipeline.svg)](https://gitlab.com/andreafavia/yaket/-/commits/main) \n[![coverage report](https://gitlab.com/andreafavia/yaket/badges/main/coverage.svg)](https://gitlab.com/andreafavia/yaket/-/commits/main) \n[![Latest Release](https://gitlab.com/andreafavia/yaket/-/badges/release.svg)](https://gitlab.com/andreafavia/yaket/-/releases)\n\n## Installation 💻\n    pip install yaket\n\n## Description 🔥\nYaket is a lightweight and simple module to train Keras modules by defining parameters directly using YAML file. \n\nYAML parameters are validated using Pydantic, hence typos or not allowed parameters will throw errors at the beginning of the execution.\nThis allows developer to focus uniquely on what matters: data and model development.\n\nData Scientists and ML Engineer won't need to add manually all training parameters, such as optimizer, callbacks, schedulers, thus reducing the\nlikelihood of human-induced code bugs.\n\n## Features 🎊\n\n1. Train models with tensorflow default optimizers, metrics, callbacks, and losses.\n2. Convert the saved model to **ONNX** or **Tensorflow-Lite** for on edge-deploymnet or faster inference.\n3. Quickly use distributed multi-gpu and TPU training with `tf.distributed.strategy` *(Experimental)*\n4. Train models with custom modules defined in python script.\n5. Log training parameters, models, and results using `mlflow.tensorflow.autolog()` module. The run will be saved in `mlruns` folder. \n6. Save the model in a particular folder and particular format (i.e., SavedModel,H5, or .pb)\n7. Train with `sample_weight_mode = 'temporal'` when training sequence models.\n\n8. More to come!\n\n## Visuals 📖\n\nThe YAML file contains most of the parameters used in Keras model.fit, such as epochs, verbose, callbacks. Below an example:\n\n```yaml\n    autolog: False\n    optimizer: \n    - Adam:\n       learning_rate: 0.001\n    batch_size: 64 \n    loss: \n    SparseCategoricalCrossentropy: \n        from_logits: True\n    callbacks:\n        - EarlyStopping:\n            monitor: val_accuracy\n            patience: 2\n            restore_best_weights: True  \n    verbose: 1 \n    epochs: 100\n    shuffle: True\n    accelerator: mgpu \n```\n\nThe usage is very simple using python:\n\n```python\n    \n    model = ... # define your tf.keras.Model\n\n    # Define path to yaml file\n    path = \"/yaket/examples/files/trainer.yaml\"\n\n    # Initialize trainer\n    trainer = Trainer(\n        config_path=path,\n        train_dataset=(x_train, y_train),\n        val_dataset=(x_test, y_test),\n        model=model, \n    )\n    trainer.train() # train based on the parameters defined in the yaml file\n    trainer.clear_ram() # clear RAM after training\n\n    trainer.convert_model(format_model = 'onnx') # Convert to ONNX\n\n    \n```\n\nOther scenarios are visible in **examples** folder.\n\n\n## Asking for help\nIf you have any questions please:\n1. [Read the docs](https://andreafavia.gitlab.io/yaket/reference) (WIP)\n2. Create an issue. \n\n## License\nMIT License\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fandreafavia%2Fyaket","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fandreafavia%2Fyaket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fandreafavia%2Fyaket/lists"}