Skip to content

Conversation

@albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Oct 2, 2025

Remove custome_container for building the docs:

  • Fix DDPO ImportError: cannot import name 'FLAX_WEIGHTS_NAME'

This PR makes a small update to the GitHub Actions workflows for building documentation. The change removes the use of a custom Docker container for the documentation build jobs.

Currently the CI GitHub Action to build the main docs is broken, due to an issue with the versions of diffusers and transformers: https://github.com/huggingface/trl/actions/runs/18184074495/job/51765142515

ImportError: cannot import name 'FLAX_WEIGHTS_NAME' from 'transformers.utils' (/usr/local/lib/python3.10/site-packages/transformers/utils/__init__.py)

After investigation:

Traceback:

Building the MDX files:   2%|| 1/55 [00:05<04:52,  5.42s/it]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/trl/import_utils.py", line 144, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/site-packages/trl/models/modeling_sd_base.py", line 25, in <module>
    from diffusers import DDIMScheduler, StableDiffusionPipeline, UNet2DConditionModel
  File "/usr/local/lib/python3.10/site-packages/diffusers/__init__.py", line 911, in <module>
    from .modular_pipelines import ComponentsManager, ComponentSpec, ModularPipeline, ModularPipelineBlocks
  File "/usr/local/lib/python3.10/site-packages/diffusers/modular_pipelines/__init__.py", line 60, in <module>
    from .flux import FluxAutoBlocks, FluxModularPipeline
  File "/usr/local/lib/python3.10/site-packages/diffusers/modular_pipelines/flux/__init__.py", line 44, in <module>
    from .encoders import FluxTextEncoderStep
  File "/usr/local/lib/python3.10/site-packages/diffusers/modular_pipelines/flux/encoders.py", line 27, in <module>
    from ..modular_pipeline import ModularPipelineBlocks, PipelineState
  File "/usr/local/lib/python3.10/site-packages/diffusers/modular_pipelines/modular_pipeline.py", line 31, in <module>
    from ..pipelines.pipeline_loading_utils import _fetch_class_library_tuple, simple_get_class_obj
  File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/__init__.py", line 504, in <module>
    from .auto_pipeline import (
  File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/auto_pipeline.py", line 23, in <module>
    from .aura_flow import AuraFlowPipeline
  File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/aura_flow/__init__.py", line 35, in <module>
    from .pipeline_aura_flow import AuraFlowPipeline
  File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/aura_flow/pipeline_aura_flow.py", line 35, in <module>
    from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput
  File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 76, in <module>
    from .pipeline_loading_utils import (
  File "/usr/local/lib/python3.10/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 51, in <module>
    from transformers.utils import FLAX_WEIGHTS_NAME as TRANSFORMERS_FLAX_WEIGHTS_NAME
ImportError: cannot import name 'FLAX_WEIGHTS_NAME' from 'transformers.utils' (/usr/local/lib/python3.10/site-packages/transformers/utils/__init__.py)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova
Copy link
Member Author

albertvillanova commented Oct 2, 2025

Also note that with this change, the building doc action takes less total time:

  • Before: 3m 37s
    • Step: Initialize containers: 1m 42 s
  • Now: 1m 53s
    • No Intialize containers step

@albertvillanova albertvillanova changed the title Remove custome_container for building the docs Fix DDPO ImportError: cannot import name 'FLAX_WEIGHTS_NAME' Oct 2, 2025
@albertvillanova albertvillanova changed the title Fix DDPO ImportError: cannot import name 'FLAX_WEIGHTS_NAME' Remove custome_container for building the docs Oct 2, 2025
@albertvillanova
Copy link
Member Author

This PR is ready for review. Once merged, I can take care of re-triggering the action to create the docs for the 0.23.1 release.

CC: @kashif @lewtun @qgallouedec

@albertvillanova albertvillanova merged commit 0c2dc14 into huggingface:main Oct 6, 2025
9 of 10 checks passed
qgallouedec added a commit that referenced this pull request Oct 6, 2025
commit ae6837f
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 18:40:18 2025 +0200

    Removed tokenizer/processor creation from example scripts (#4211)

commit 56a8f11
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 17:45:44 2025 +0200

    Replace setup with pyproject and fix packaging unintended modules (#4194)

commit 5291015
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 16:04:06 2025 +0200

    Remove `Optional` from `processing_class` in `PPOTrainer` (#4212)

commit 0588b1f
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 15:57:17 2025 +0200

    Updated vLLM integration guide (#4162)

    Co-authored-by: Quentin Gallouédec <[email protected]>

commit 45ee98b
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 11:14:54 2025 +0200

    Replace unittest with pytest (#4188)

commit 3800a6e
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 11:13:21 2025 +0200

    Hotfix: Exclude transformers 4.57.0 for Python 3.9 (#4209)

    Co-authored-by: Sergio Paniego Blanco <[email protected]>

commit 7ad9ce8
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 11:04:20 2025 +0200

    Remove tokenizer creation from `sft` example script (#4197)

commit 0c2dc14
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 08:31:58 2025 +0200

    Remove custome_container for building the docs (#4198)

commit ced8b33
Author: burtenshaw <[email protected]>
Date:   Mon Oct 6 08:23:11 2025 +0200

    [DOCS/FIX] lora without regrets - fix lr (#4207)
qgallouedec added a commit that referenced this pull request Oct 6, 2025
commit 65eb45c
Author: Quentin Gallouédec <[email protected]>
Date:   Mon Oct 6 13:07:18 2025 -0600

    Apply style and revert change in `sft_video_llm` example (#4214)

commit ae6837f
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 18:40:18 2025 +0200

    Removed tokenizer/processor creation from example scripts (#4211)

commit 56a8f11
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 17:45:44 2025 +0200

    Replace setup with pyproject and fix packaging unintended modules (#4194)

commit 5291015
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 16:04:06 2025 +0200

    Remove `Optional` from `processing_class` in `PPOTrainer` (#4212)

commit 0588b1f
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 15:57:17 2025 +0200

    Updated vLLM integration guide (#4162)

    Co-authored-by: Quentin Gallouédec <[email protected]>

commit 45ee98b
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 11:14:54 2025 +0200

    Replace unittest with pytest (#4188)

commit 3800a6e
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 11:13:21 2025 +0200

    Hotfix: Exclude transformers 4.57.0 for Python 3.9 (#4209)

    Co-authored-by: Sergio Paniego Blanco <[email protected]>

commit 7ad9ce8
Author: Sergio Paniego Blanco <[email protected]>
Date:   Mon Oct 6 11:04:20 2025 +0200

    Remove tokenizer creation from `sft` example script (#4197)

commit 0c2dc14
Author: Albert Villanova del Moral <[email protected]>
Date:   Mon Oct 6 08:31:58 2025 +0200

    Remove custome_container for building the docs (#4198)

commit ced8b33
Author: burtenshaw <[email protected]>
Date:   Mon Oct 6 08:23:11 2025 +0200

    [DOCS/FIX] lora without regrets - fix lr (#4207)
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.

3 participants