MaartenGr / MaartenGr/BERTopic

AttributeError: 'Transformer' object has no attribute 'gradient_checkpointing'

Open
#1,415 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
920
Avg merge
22h 24m
Merged PRs (30d)
5

Description

Hi @MaartenGr

When I load the model and show the information of it everything is fine
```
!pip install bertopic==0.14.1
from bertopic import BERTopic
topic_model = BERTopic.load(BASE_DIR+"Model/topic_model_merged")
topic_model.get_topic_info()
```

**BUT** when I tried to modify the model and merge some topics, I faced the following error :
`topic_model.merge_topics(text,[7,11])`

image

**Note that the version of bertopic I used is 0.14.1**

Thanks in advance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the workflow with bertopic==0.14.1: load the saved model, confirm get_topic_info() works, then call merge_topics(text, [7, 11]) and inspect the traceback around that entry point. Done when the topic merge completes without the reported AttributeError and the behavior is covered by an appropriate regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.