{"id":24746653,"url":"https://github.com/samuelmarks/ml-params-tensorflow","last_synced_at":"2026-04-17T10:32:05.396Z","repository":{"id":150265338,"uuid":"276570010","full_name":"SamuelMarks/ml-params-tensorflow","owner":"SamuelMarks","description":"TensorFlow implementation of ml-params CLI API","archived":false,"fork":false,"pushed_at":"2021-04-08T11:03:29.000Z","size":492,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T01:28:01.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelMarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-02T06:46:32.000Z","updated_at":"2021-04-08T11:03:31.000Z","dependencies_parsed_at":"2023-05-05T10:47:59.315Z","dependency_job_id":null,"html_url":"https://github.com/SamuelMarks/ml-params-tensorflow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamuelMarks/ml-params-tensorflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fml-params-tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fml-params-tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fml-params-tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fml-params-tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelMarks","download_url":"https://codeload.github.com/SamuelMarks/ml-params-tensorflow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelMarks%2Fml-params-tensorflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31925353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:19:20.377Z","status":"ssl_error","status_checked_at":"2026-04-17T10:19:18.682Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T04:29:47.649Z","updated_at":"2026-04-17T10:32:05.372Z","avatar_url":"https://github.com/SamuelMarks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ml_params_tensorflow\n===============\n![Python version range](https://img.shields.io/badge/python-3.6%20|%203.7%20|%203.8-blue.svg)\n[![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Linting, testing, and coverage](https://github.com/SamuelMarks/ml-params-tensorflow/workflows/Linting,%20testing,%20and%20coverage/badge.svg)](https://github.com/SamuelMarks/ml-params-tensorflow/actions)\n![Tested OSs, others may work](https://img.shields.io/badge/Tested%20on-Linux%20|%20macOS-green)\n![Documentation coverage](.github/doccoverage.svg)\n[![codecov](https://codecov.io/gh/SamuelMarks/ml-params-tensorflow/branch/master/graph/badge.svg)](https://codecov.io/gh/SamuelMarks/ml-params-tensorflow)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336)](https://pycqa.github.io/isort/)\n\n[TensorFlow](https://tensorflow.org) implementation of the [ml-params](https://github.com/SamuelMarks/ml-params) API and CLI.\n\nThe purpose of ml-params is to expose the hooks and levers of ML experiments for external usage, e.g., in GUIs, CLIs, REST \u0026 RPC APIs, and parameter and hyperparameter optimisers.\n\n## Install dependencies\n\n    pip install -r requirements.txt\n\n## Install package\n\n    pip install .\n\n## Usage\n\nAfter installing as above, follow usage from [ml-params](https://github.com/SamuelMarks/ml-params)\n\n## Sibling projects\n\n| Google | Other vendors |\n| -------| ------------- |\n| _[tensorflow](https://github.com/SamuelMarks/ml-params-tensorflow)_  | [pytorch](https://github.com/SamuelMarks/ml-params-pytorch) |\n| [keras](https://github.com/SamuelMarks/ml-params-keras)  | [skorch](https://github.com/SamuelMarks/ml-params-skorch) |\n| [flax](https://github.com/SamuelMarks/ml-params-flax) | [sklearn](https://github.com/SamuelMarks/ml-params-sklearn) |\n| [trax](https://github.com/SamuelMarks/ml-params-trax) | [xgboost](https://github.com/SamuelMarks/ml-params-xgboost) |\n| [jax](https://github.com/SamuelMarks/ml-params-jax) | [cntk](https://github.com/SamuelMarks/ml-params-cntk) |\n\n## Related official projects\n\n  - [ml-prepare](https://github.com/SamuelMarks/ml-prepare)\n\n## Development guide\n\nTo make the development of _ml-params-tensorflow_ type safer and maintain consistency with the other ml-params implementing projects, the [cdd](https://github.com/offscale/cdd-python) was created.\n\nWhen TensorFlow itself changes—i.e., a new major version of TensorFlow is releases—then run the `sync_properties`, as shown in the module-level docstring here [`ml_params_tensorflow/ml_params/type_generators.py`](ml_params_tensorflow/ml_params/type_generators.py);\n\nTo synchronise all the various other APIs, edit one and it'll translate to the others, but make sure you select which one is the gold-standard.\n\n### Dependencies\n\n    $ pip install python-cdd autoflake black isort\n\n[`fd`](https://github.com/sharkdp/fd#installation) (or you can just use `find`, rewrite to `find -type f -name '*.py' -exec`)\n\n### Examples\n\nNOTE: The below steps are available in a script within [sync_scripts](sync_scripts).\n\nAs an example, using the `class TensorFlowTrainer` methods as truth, this will update the CLI parsers and config classes:\n\n    $ python -m cdd sync --class 'ml_params_tensorflow/ml_params/config.py' \\\n                         --class-name 'TrainConfig' \\\n                         --function 'ml_params_tensorflow/ml_params/trainer.py' \\\n                         --function-name 'TensorFlowTrainer.train' \\\n                         --argparse-function 'ml_params_tensorflow/ml_params/cli.py' \\\n                         --argparse-function-name 'train_parser' \\\n                         --truth 'function'\n\n    $ python -m cdd sync --class 'ml_params_tensorflow/ml_params/config.py' \\\n                         --class-name 'LoadDataConfig' \\\n                         --function 'ml_params_tensorflow/ml_params/trainer.py' \\\n                         --function-name 'TensorFlowTrainer.load_data' \\\n                         --argparse-function 'ml_params_tensorflow/ml_params/cli.py' \\\n                         --argparse-function-name 'load_data_parser' \\\n                         --truth 'function'\n\n    $ python -m cdd sync --class 'ml_params_tensorflow/ml_params/config.py' \\\n                         --class-name 'LoadModelConfig' \\\n                         --function 'ml_params_tensorflow/ml_params/trainer.py' \\\n                         --function-name 'TensorFlowTrainer.load_model' \\\n                         --argparse-function 'ml_params_tensorflow/ml_params/cli.py' \\\n                         --argparse-function-name 'load_model_parser' \\\n                         --truth 'function'\n\nAnother example, that you'd run before ^, to generate custom config CLI parsers for members of `tf.keras.losses`:\n\n    $ python -m cdd gen --name-tpl '{name}Config' \\\n                        --input-mapping 'ml_params_tensorflow.ml_params.type_generators.exposed_losses' \\\n                        --prepend '\"\"\" Generated Loss config classes \"\"\"\\nimport tensorflow as tf\\n' \\\n                        --imports-from-file 'tf.keras.losses.Loss' \\\n                        --type 'argparse' \\\n                        --output-filename 'ml_params_tensorflow/ml_params/losses.py'\n\nThere's a bit of boilerplate here, so let's automate it:\n\n    $ for name in 'callbacks' 'losses' 'metrics' 'optimizers'; do\n        rm 'ml_params_tensorflow/ml_params/'\"$name\"'.py';\n        python -m ml_params_tensorflow.ml_params.cdd_cli_gen \"$name\" 2\u003e/dev/null | xargs python -m cdd gen;\n      done\n\nCleanup the code everywhere, removing unused imports and autolinting/autoformatting:\n\n    $ fd -HIepy -x sh -c 'autoflake --remove-all-unused-imports -i \"$0\" \u0026\u0026 isort --atomic \"$0\" \u0026\u0026 python -m black \"$0\"' {} \\;\n\n---\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Fml-params-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelmarks%2Fml-params-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelmarks%2Fml-params-tensorflow/lists"}