Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 3.38 KB

contribute_a_model.md

File metadata and controls

79 lines (62 loc) · 3.38 KB

Submit a pull request

This page is about submitting a pull request containing Markdown documentation files to the tensorflow/tfhub.dev. GitHub Repo. For more information on how to write the Markdown files in the first place, please see the writing documentation guide.

Note: If you would like your model to be mirrored to other model hubs, please use an MIT, CC0, or Apache license. If you would not like your model to be mirrored to other model hubs, please use another appropriate license.

GitHub Actions checks

The tensorflow/tfhub.dev repo uses GitHub Actions to validate the format of the files in a PR. The workflow used to validate PRs is defined in .github/workflows/contributions-validator.yml. You can run the validator script on your own branch outside of the workflow, but you will need to ensure you have all the correct pip package dependencies installed.

First time contributors are only able to run automated checks with the approval of a repo maintainer, per GitHub policy. Publishers are encouraged to submit a small PR fixing typos, otherwise improving model documentation, or submitting a PR containing only their publisher page as their first PR to be able to run automated checks on subsequent PRs.

Important: Your pull request must pass the automated checks before it will be reviewed!

Submitting the PR

The complete Markdown files can be pulled into the master branch of tensorflow/tfhub.dev by one of the following methods.

Git CLI submission

Assuming the identified markdown file path is assets/docs/publisher/model/1.md, you can follow the standard Git[Hub] steps to create a new Pull Request with a newly added file.

This starts with forking the TensorFlow Hub GitHub repository, then creating a Pull Request from this fork into the TensorFlow Hub master branch.

The following are typical CLI git commands needed to adding a new file to a master branch of the forked repository.

git clone https://github.com/[github_username]/tfhub.dev.git
cd tfhub.dev
mkdir -p assets/docs/publisher/model
cp my_markdown_file.md ./assets/docs/publisher/model/1.md
git add *
git commit -m "Added model file."
git push origin master

GitHub GUI submission

A somewhat more straightforward way of submitting is via GitHub graphical user interface. GitHub allows creating PRs for new files or file edits directly through GUI.

  1. On the TensorFlow Hub GitHub page, press Create new file button.
  2. Set the right file path: assets/docs/publisher/model/1.md
  3. Copy-paste the existing markdown.
  4. At the bottom, select "Create a new branch for this commit and start a pull request."