Skip to content

Conversation

isururanawaka
Copy link
Owner

Related to [T228334525]

  • Remove inference tutorial from main tutorial and pointed it to torchrec inference tutorial
  • compliance with PyTorch Tutorial Audit

isururanawaka and others added 10 commits July 9, 2025 17:34
Summary:
continuation of pytorch#3432

Test Plan:
generated doc in CI

Reviewers:

Subscribers:

Tasks:

Tags:

Co-authored-by: Alanna Burke <[email protected]>
clee2000
Member
clee2000 commented 11 hours ago
The isolated subprocess build was preventing errors from surfacing, but upgrading to 0.17.1 (which has its own parallelization with joblib) makes it surface correctly

I only found 1 failure which was ax_multiobjective_nas_tutorial and it was because the ax-platform package got a new version that removed something it was using, so I pinned that too

We are also using split_code_and_text_blocks, which got moved somewhere else, so I changed that too, hopefully it is correct

Testing: on a different PR, I raised runtimeerror in one of the tutorials and saw that the error was surfaced

Co-authored-by: Svetlana Karslioglu <[email protected]>
multiprocess defaults to spawn on macs and fork on linux, and I think sphinx makes everything in conf.py be in the main module even if you import from another file so its not picklable, so you get errors like 
```
Handler <function generate_gallery_rst at 0x31029b920> for event 'builder-inited' threw an exception (exception: Can't pickle <function call_fn at 0x107e14860>: attribute lookup call_fn on __main__ failed)
```
or if you try to put call_fn in a different file:
```
Handler <function generate_gallery_rst at 0x17c59b920> for event 'builder-inited' threw an exception (exception: Can't pickle <function generate_file_rst at 0x1412322a0>: it's not the same object as sphinx_gallery.gen_rst.generate_file_rst)
```

Mac does have fork, but MPS doesn't, and windows doesn't support fork, so don't monkey patch if on either of these platforms

Testing: Ran `make html-noplot` and saw that it got past the place it originally errored.  Not testable in CI because we don't currently have mac builds in CI



Notes:
multiprocess + mac wants spawn b/c MPS stuff -> needs to be picklable -> some inputs to generate file rst not pickleable
Could probably manually pickle with cloudpickle since sphinx gallery later versions use joblib which use cloudpickle but this seems like overkill
remove entry "intermediate_source/torchrec_intro_tutorial",  from NOT_RUN
Upgrade torchrec version to 1.2.0 from 1.1.0
Refresh oudated links and APIs.

Co-authored-by: sekyondaMeta <[email protected]>
Co-authored-by: Alanna Burke <[email protected]>
Co-authored-by: Svetlana Karslioglu <[email protected]>
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.

5 participants