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

modified conf.py as per scikit-learn guidelines on adding examples to… #1359

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miacodehub
Copy link

… API docs

Description

Tests

  • no new tests required
  • new tests added
  • existing tests adjusted

Documentation

  • no documentation changes needed
  • user guide added or updated
  • API docs added or updated
  • example notebook added or updated

Screenshots

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this changes in the rendered docs.

Comment on lines +176 to +177
"doc_module" : ('fairlearn.fairlearn.datasets', 'fairlearn.fairlearn.metrics', 'fairlearn.fairlearn.postprocessing', 'fairlearn.fairlearn.preprocessing', 'fairlearn.fairlearn.reductions', 'fairlearn.fairlearn.adversarial', 'fairlearn.fairlearn.experimental'),
"backreferences_dir" : "backref_dir",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what we have in sklearn though:

    "doc_module": "sklearn",
    "backreferences_dir": os.path.join("modules", "generated"),

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the doc_module is supposed to contain the names of the modules for which documentation should be rebuilt. I gave those values to follow the folder structure for the project. I tried with "fairlearn.module_name" and just "fairlearn" but with no results.
The backreferences_dir is supposed to be a place where the generated gallery would be stored. So it has to be initially empty. The value entered in scikit-learn (modules/generated) doesn't already exist in their project - only the "modules" folder exists. So I believe "generated" gets created when the documentation is rebuilt, although I'm not 100% sure about that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the right way to specify the doc module is just to specify "fairlearn". I tried building the docs using this conf.py file, and it looks like in the backref_dir, the thumbnails are being generated (see the image below), but they aren't showing up on the API pages. I wonder if that's because of the way that the API reference is now structured (i.e., using autodoc).

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file seems bogus.

@riedgar-ms
Copy link
Member

Sorry, I've been remiss about this.... can you explain what problem this is trying to solve? I'm not being enlightened by the PR description.

@miacodehub
Copy link
Author

Sorry, I've been remiss about this.... can you explain what problem this is trying to solve? I'm not being enlightened by the PR description.

The goal was to have relevant example notebooks show up at bottom of the respective APIs - like it currently happens in scikit-learn.
The way to do that was to enable this API example backreferencing in the conf.py file by modifying the sphinx-gallery section. According to the latest update, it appears that the required galleries are being built but not being displayed in the API documentation.

@alliesaizan do let me know if there anything that I can look into regarding this issue. If nothing can be done from my end, do unassign me. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants