{"id":15904203,"url":"https://github.com/dermatologist/kedro-tf-utils","last_synced_at":"2026-01-19T09:34:06.162Z","repository":{"id":88879599,"uuid":"492626542","full_name":"dermatologist/kedro-tf-utils","owner":"dermatologist","description":"Kedro pipelines for multimodal ML in TensorFlow.","archived":false,"fork":false,"pushed_at":"2023-03-14T19:01:51.000Z","size":176,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-07T22:14:06.995Z","etag":null,"topics":["hacktoberfest","healthcare","kedro","multi-modal","tensorflow"],"latest_commit_sha":null,"homepage":"https://nuchange.ca","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dermatologist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-05-15T23:21:28.000Z","updated_at":"2023-02-05T21:36:55.000Z","dependencies_parsed_at":"2023-06-12T23:00:16.034Z","dependency_job_id":null,"html_url":"https://github.com/dermatologist/kedro-tf-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dermatologist/kedro-tf-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Fkedro-tf-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Fkedro-tf-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Fkedro-tf-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Fkedro-tf-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dermatologist","download_url":"https://codeload.github.com/dermatologist/kedro-tf-utils/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Fkedro-tf-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28565001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"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":["hacktoberfest","healthcare","kedro","multi-modal","tensorflow"],"created_at":"2024-10-06T12:22:14.820Z","updated_at":"2026-01-19T09:34:06.144Z","avatar_url":"https://github.com/dermatologist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kedro Tf Utils :toolbox:\n\nProvides Kedro pipeline components for multi-modal fusion and training for [text](https://github.com/dermatologist/kedro-tf-text) and [image](https://github.com/dermatologist/kedro-tf-image) models for healthcare as in [X-rays](https://github.com/dermatologist/kedro-dicom) and radiology reports. Use this [template](https://github.com/dermatologist/kedro-multimodal) to import these pipelines and perform multi-modal ML.\n\n[![kedro-tf-utils](https://github.com/dermatologist/kedro-tf-utils/blob/develop/notes/utils.drawio.svg)](https://github.com/dermatologist/kedro-tf-utils/blob/develop/notes/utils.drawio.svg)\n\n## How to install\n\n- pip install git+https://github.com/dermatologist/kedro-tf-utils.git\n\n## How to build fusion model\n\n```\nfrom from kedro_tf_utils.pipelines.fusion.pipelines import create_fusion_pipeline\n\n# Add any number of models after parameters\nfusion_inputs = {\n    \"parameters\": \"params:fusion\",\n    \"tabular_model\": \"tabular_model\",\n    \"bert_model\": \"bert_model\",\n    \"text_model\": \"text_model\"\n    \"image_model\": \"chexnet_model\",\n}\nfusion_pipeline = create_fusion_pipeline(**fusion_inputs)\n\n# In pipeline_registry\n\"__default__\": other_pipelines + fusion_pipeline\n```\n\n## How to build training pipeline\n\n```\nfrom from kedro_tf_utils.pipelines.train.pipelines import create_train_pipeline\n\n# model and outputs are required\nargs = {\"parameters\": \"params:train\", \"model\": \"fusion_model\",\n                  \"bert_data\": \"text_data\", \"image_data\": \"image_data\", \"outputs\": \"trained_model\"}\ntrain_pipeline = create_train_pipeline(**args)\n# In pipeline_registry\n\"__default__\": train_pipeline\n```\n\n## How to build embedding pipeline\n(For use with [kedro-graph](https://github.com/dermatologist/kedro-graph))\n\n```\nfrom from kedro_tf_utils.pipelines.embedding.pipelines import create_embedding_pipeline\n\n# model and outputs are required\n# model and data should be of same type.\n# output is a PickleDataset\nargs = {\"parameters\": \"params:embedding\", \"model\": \"tabular_model\",\n                  \"tabular_data\": \"tabular_data\", \"outputs\": \"embeddings\"}\nembedding_pipeline = create_embedding_pipeline(**args)\n# In pipeline_registry\n\"__default__\": create_embedding_pipeline\n```\n\n## [Catalogue](conf/base/catalog.yml)\n## [params:fusion](conf/base/parameters/fusion.yml)\n* VISUALIZE: /path/to/save/model/structure.png\n## [params:train](conf/base/parameters/train.yml)\n* CALLBACKS: /path/to/save/checkpoints\n* SERVING: /path/to/save/new/model/with/tf/serving/b64/image/layer\n## TODO\n* Checkpoints and model wrapped for TF serving b64 image string support only supports local folders currently.\n\n## Troubleshoot\n\n### BERT model has some issues related to tensorflow_text\n* Downloaded BERT models will not copy vocab.txt in assets folder to the newly created fusion model. This has to be manually copied.\n* The class_num in TfModelWeights must be equal to to NCLASSES during training. Otherwise it throws an error:  Tensorflow estimator ValueError: logits and labels must have the same shape ((?, 1) vs (?,))\n\n## Contributors\n\n* [Bell Eapen](https://nuchange.ca) | [![Twitter Follow](https://img.shields.io/twitter/follow/beapen?style=social)](https://twitter.com/beapen)\n## Kedro Overview\n\nThis is your new Kedro project, which was generated using `Kedro 0.18.1`.\n\nTake a look at the [Kedro documentation](https://kedro.readthedocs.io) to get started.\n\n## Rules and guidelines\n\nIn order to get the best out of the template:\n\n* Don't remove any lines from the `.gitignore` file we provide\n* Make sure your results can be reproduced by following a [data engineering convention](https://kedro.readthedocs.io/en/stable/faq/faq.html#what-is-data-engineering-convention)\n* Don't commit data to your repository\n* Don't commit any credentials or your local configuration to your repository. Keep all your credentials and local configuration in `conf/local/`\n\n## How to install dependencies\n\nDeclare any dependencies in `src/requirements.txt` for `pip` installation and `src/environment.yml` for `conda` installation.\n\nTo install them, run:\n\n```\npip install -r src/requirements.txt\n```\n\n## How to run your Kedro pipeline\n\nYou can run your Kedro project with:\n\n```\nkedro run\n```\n\n## How to test your Kedro project\n\nHave a look at the file `src/tests/test_run.py` for instructions on how to write your tests. You can run your tests as follows:\n\n```\nkedro test\n```\n\nTo configure the coverage threshold, go to the `.coveragerc` file.\n\n## Project dependencies\n\nTo generate or update the dependency requirements for your project:\n\n```\nkedro build-reqs\n```\n\nThis will `pip-compile` the contents of `src/requirements.txt` into a new file `src/requirements.lock`. You can see the output of the resolution by opening `src/requirements.lock`.\n\nAfter this, if you'd like to update your project requirements, please update `src/requirements.txt` and re-run `kedro build-reqs`.\n\n[Further information about project dependencies](https://kedro.readthedocs.io/en/stable/kedro_project_setup/dependencies.html#project-specific-dependencies)\n\n## How to work with Kedro and notebooks\n\n\u003e Note: Using `kedro jupyter` or `kedro ipython` to run your notebook provides these variables in scope: `context`, `catalog`, and `startup_error`.\n\u003e\n\u003e Jupyter, JupyterLab, and IPython are already included in the project requirements by default, so once you have run `pip install -r src/requirements.txt` you will not need to take any extra steps before you use them.\n\n### Jupyter\nTo use Jupyter notebooks in your Kedro project, you need to install Jupyter:\n\n```\npip install jupyter\n```\n\nAfter installing Jupyter, you can start a local notebook server:\n\n```\nkedro jupyter notebook\n```\n\n### JupyterLab\nTo use JupyterLab, you need to install it:\n\n```\npip install jupyterlab\n```\n\nYou can also start JupyterLab:\n\n```\nkedro jupyter lab\n```\n\n### IPython\nAnd if you want to run an IPython session:\n\n```\nkedro ipython\n```\n\n### How to convert notebook cells to nodes in a Kedro project\nYou can move notebook code over into a Kedro project structure using a mixture of [cell tagging](https://jupyter-notebook.readthedocs.io/en/stable/changelog.html#release-5-0-0) and Kedro CLI commands.\n\nBy adding the `node` tag to a cell and running the command below, the cell's source code will be copied over to a Python file within `src/\u003cpackage_name\u003e/nodes/`:\n\n```\nkedro jupyter convert \u003cfilepath_to_my_notebook\u003e\n```\n\u003e *Note:* The name of the Python file matches the name of the original notebook.\n\nAlternatively, you may want to transform all your notebooks in one go. Run the following command to convert all notebook files found in the project root directory and under any of its sub-folders:\n\n```\nkedro jupyter convert --all\n```\n\n### How to ignore notebook output cells in `git`\nTo automatically strip out all output cell contents before committing to `git`, you can run `kedro activate-nbstripout`. This will add a hook in `.git/config` which will run `nbstripout` before anything is committed to `git`.\n\n\u003e *Note:* Your output cells will be retained locally.\n\n## Package your Kedro project\n\n[Further information about building project documentation and packaging your project](https://kedro.readthedocs.io/en/stable/tutorial/package_a_project.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdermatologist%2Fkedro-tf-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdermatologist%2Fkedro-tf-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdermatologist%2Fkedro-tf-utils/lists"}