lmcinnes / lmcinnes/enstop

AttributeError: module 'dask' has no attribute 'delayed'

Open
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
113
Forks
12
PR merge metrics
No merged PRs in 30d

Description

When I am running the following code:
```
ens_model = EnsembleTopics(n_components=20, n_starts=8, n_jobs=2).fit(data_vec)
```
I get the error:

```
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in

d:\pycharmprojects\biclustering\venv\lib\site-packages\enstop\enstop_.py in fit(self, X, y)
719 self
720 """
--> 721 self.fit_transform(X)
722 return self
723

d:\pycharmprojects\biclustering\venv\lib\site-packages\enstop\enstop_.py in fit_transform(self, X, y)
763 self.alpha,
764 self.solver,
--> 765 self.random_state,
766 )
767 self.components_ = V

d:\pycharmprojects\biclustering\venv\lib\site-packages\enstop\enstop_.py in ensemble_fit(X, estimated_n_topics, model, init, min_samples, min_cluster_size, n_starts, n_jobs, parallelism, topic_combination, n_iter, n_iter_per_test, tolerance, e_step_thresh, lift_factor, beta_loss, alpha, solver, random_state)
507 alpha=alpha,
508 solver=solver,
--> 509 random_state=random_state,
510 )
511

d:\pycharmprojects\biclustering\venv\lib\site-packages\enstop\enstop_.py in ensemble_of_topics(X, k, model, n_jobs, n_runs, parallelism, **kwargs)
181
182 if parallelism == "dask":
--> 183 dask_topics = dask.delayed(create_topics)
184 staged_topics = [dask_topics(X, k, **kwargs) for i in range(n_runs)]
185 topics = dask.compute(*staged_topics, scheduler="threads", num_workers=n_jobs)

AttributeError: module 'dask' has no attribute 'delayed'
```

data_vec is a vector:

`data_vec = CountVectorizer().fit_transform(data)`
I cannot run any version of EnsembleTopics.

Could you please help?
I am using Python 3.7.5 x64. Windows 10.

Contributor guide

No contributing guide indexed for this repository

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

Start at enstop_.py, especially ensemble_of_topics around the reported line where dask.delayed is accessed. Reproduce the failure with EnsembleTopics(...).fit(data_vec) using the provided CountVectorizer output, then inspect the surrounding parallelism path. Done means the example no longer raises the reported AttributeError.

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.