Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check in post-commit docs assets as Markdown to docs repo for docs team to control styling #8534

Open
tt-rkim opened this issue May 15, 2024 · 15 comments
Assignees
Labels
docs Improvements or additions to documentation infra-ci infrastructure and/or CI changes P2

Comments

@tt-rkim
Copy link
Collaborator

tt-rkim commented May 15, 2024

As discussed with @jwilde-tenstorrent , we will be transferring docs and styling ownership to the docs team. Their publishing model is:

Docs pipeline for pybuda as reference: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/pybuda/-/blob/main/docs/CI/.gitlab-ci.build-docs.yml?ref_type=heads

cc: @adifrancescoTT @TT-billteng @dimitri-tenstorrent

@tt-rkim tt-rkim added docs Improvements or additions to documentation infra-ci infrastructure and/or CI changes P2 labels May 15, 2024
@tt-rkim tt-rkim self-assigned this May 15, 2024
@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 15, 2024

Sent in two tickets to IT:

  • re-generate token for write / re-work the publishing model
  • give dev access to metalium-admins for docs repo

cc: @warthog9

@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 15, 2024

@adifrancescoTT @jwilde-tenstorrent

Current action items are:

@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 16, 2024

https://github.com/tenstorrent/docs-test is the repo we need to use

@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 21, 2024

We've run into a blocking issue with the open source markdown file builder for Sphinx. Looks like someone with the exact same build flow is running into the same issue: liran-funaro/sphinx-markdown-builder#21

Such is the woes of working in a feature-rich, language-rich (C++ and Python) API like tt-metal.

As referenced in: liran-funaro/sphinx-markdown-builder#21 (comment)
This is a feature request, and likely won't be done any time soon. Let us know if we should devote more resources into trying to get this working, or if docs team and metal infra team can change either/both of our docs build processes to get around this issue.

cc: @jwilde-tenstorrent @adifrancescoTT

@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 21, 2024

@dimitri-tenstorrent For your future eyes.

tt-rkim added a commit that referenced this issue May 22, 2024
@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 22, 2024

Pushed interim work to branch rkim/8534-markdown

  1. build_metal.sh w/ python env
  2. cd docs
  3. make markdown

You see the error.

This is because of the above.

@dimitri-tenstorrent
Copy link
Contributor

I will try to replicate and see if I can identify a path towards the fix.

@dimitri-tenstorrent
Copy link
Contributor

I have identified the issue and will work on figuring out if I can create a patch for Breathe to handle the missing definitions:

/Users/dgnidash/projects/tt-metal/docs/source/tt-metalium/tt_metal/apis/host_apis/buffers/AssignGlobalBufferToProgram.rst:5: WARNING: unknown node type: <desc_signature_line: <target "host__api_8hpp_1a4e29ca9df8b6f13424f2a392d89714 ...>

Exception occurred:
  File "/Users/dgnidash/projects/.tt/lib/python3.9/site-packages/sphinx_markdown_builder/contexts.py", line 339, in make
    assert len(content) > 0, "Empty title"
AssertionError: Empty title

@dimitri-tenstorrent
Copy link
Contributor

I have been able to generate markdown and integrate it into the docs site.
I need to do these additional tasks

  • Verify and fix issues
  • Build a tt-metal doc deployment pipeline
  • See if the C++ function highlighting needs to be fixed (see screenshot)
Screenshot 2024-05-29 at 2 33 23 PM

@tt-rkim
Copy link
Collaborator Author

tt-rkim commented May 30, 2024

General

  • There are no dropdowns at all. I think @dsklavos mentioned this. First pic is docs test, second pic is original docs.
Screenshot 2024-05-30 at 5 12 08 PM

[1] Docs test

Screenshot 2024-05-30 at 5 11 58 PM

[2] original

TT-Metalium

  • Change the upper corner to "TT-Metalium"
Screenshot 2024-05-30 at 5 05 03 PM
  • We could consider getting rid of this link to models in ttnn. In fact, I might even consider getting rid of that whole page. It has models using the tt_lib API, which I think we should not advertise widely to users:
Screenshot 2024-05-30 at 5 05 38 PM
  • For these overloaded functions with multiple "versions", we may need something more clearly showing that these two different sections. They're a little close together. On the original docs, shown in 2nd pic, they have blue headings.
Screenshot 2024-05-30 at 5 08 04 PM

[1] docs test

Screenshot 2024-05-30 at 5 08 52 PM

[2] original

TT-NN

  • General point: It is TT-NN, not TTNN, if using the name in regular text. In code, it's ttnn. Sorry for the confusion 😅 You're going to have change it in certain places like the upper left hand corner.

  • The original documentation has the jupyter notebooks in ttnn/tutorials rendered. This is not the case in docs-test. First pic docs-test, second pic original. Unfortunately, this is likely something we didn't take into account when considering this original team docs -> markdown -> build sphinx again flow.
Screenshot 2024-05-30 at 5 15 20 PM

[1] docs test

Screenshot 2024-05-30 at 5 14 00 PM

[2] original


  • The original documentation is able to render tt_lib functions, their arguments, and docstrings. The new doesn't seem to render anything at all. Again a markdown builder plugin issue. First pic is docs test, 2nd is original
Screenshot 2024-05-30 at 5 19 40 PM

[1] docs test

Screenshot 2024-05-30 at 5 16 44 PM

[2] original


Screenshot 2024-05-30 at 5 20 03 PM

[1] docs test

Screenshot 2024-05-30 at 5 19 54 PM

[2] original

@dimitri-tenstorrent
Copy link
Contributor

@tt-rkim @TT-billteng

Thank you so much for reviewing the result! This is a great review.
I have done a lot of experimentation on the weekend and was able to make progress with the tutorials and I believe there is a path to fix the first issue with expanding Table of Contents menu.

I am recording all the tickets in the doc-test repo and will cross mention the issues here when they are created.

@dimitri-tenstorrent
Copy link
Contributor

dimitri-tenstorrent commented Jun 3, 2024

@tt-rkim
Copy link
Collaborator Author

tt-rkim commented Jun 3, 2024

Looks fantastic - how did you do this?

@dimitri-tenstorrent
Copy link
Contributor

Lots of trial-and-error on the weekend with the sphinx-markdown-builder I had to implement something called CodeAreaNode. I do believe there are a few things missing from the tutorials due to lack of implementation of FancyCodeNode :)

writing output... [100%] ttnn_sweeps/index
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tensor.rst:23: WARNING: unknown node type: <caption: <#text: 'Tensor with 16 ...'>>
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tutorials/ttnn_tutorials/004.ipynb:45: WARNING: unknown node type: <FancyOutputNode: <container...>>
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tutorials/ttnn_tutorials/006.ipynb:297: WARNING: unknown node type: <FancyOutputNode: <container...>>
/Users/dgnidash/projects/tt-metal/docs/source/ttnn/ttnn/tutorials/ttnn_tutorials/007.ipynb:238: WARNING: unknown node type: <FancyOutputNode: <container...>>
build succeeded, 568 warnings.

dimitri-tenstorrent added a commit that referenced this issue Sep 10, 2024
dimitri-tenstorrent added a commit that referenced this issue Sep 10, 2024
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Sep 11, 2024
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Sep 11, 2024
…ocs into the centralized repo

 #8534: Add packaging of TTNN Docs to the Deployment workflow
 #8534: Enable the push to the tenstorrent.github.io repo
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Sep 11, 2024
…ocs into the centralized repo

 #8534: Add packaging of TTNN Docs to the Deployment workflow
 #8534: Enable the push to the tenstorrent.github.io repo
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Sep 11, 2024
dimitri-tenstorrent added a commit that referenced this issue Sep 11, 2024
dimitri-tenstorrent added a commit that referenced this issue Sep 11, 2024
dimitri-tenstorrent added a commit that referenced this issue Oct 1, 2024
…ocs into the centralized repo

 #8534: Add packaging of TTNN Docs to the Deployment workflow
 #8534: Enable the push to the tenstorrent.github.io repo
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Oct 2, 2024
…ocs into the centralized repo

 #8534: Add packaging of TTNN Docs to the Deployment workflow
dimitri-tenstorrent added a commit that referenced this issue Oct 2, 2024
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Oct 2, 2024
…ocs into the centralized repo

 #8534: Add packaging of TTNN Docs to the Deployment workflow
dimitri-tenstorrent added a commit that referenced this issue Oct 2, 2024
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Oct 3, 2024
…ocs into the centralized repo

 #8534: Add packaging of TTNN Docs to the Deployment workflow
dimitri-tenstorrent added a commit that referenced this issue Oct 3, 2024
 Update TTNN Get started to edit the location of installation.html and the tutorials
dimitri-tenstorrent added a commit that referenced this issue Oct 3, 2024
* #8534: Add the first iteration of the doc pipeline that brings the docs into the centralized repo
 #8534: Add packaging of TTNN Docs to the Deployment workflow
* #8534: Enable the push to the tenstorrent.github.io repo
 Update TTNN Get started to edit the location of installation.html and the tutorials
* #8534: Update the target to main now that we built the confidence with the system
* #8534: Good eye Raymond! Fixinging the branch name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation infra-ci infrastructure and/or CI changes P2
Projects
None yet
Development

No branches or pull requests

2 participants