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

Way to supress tqdm printout? #14

Open
eeilon79 opened this issue Oct 1, 2020 · 2 comments
Open

Way to supress tqdm printout? #14

eeilon79 opened this issue Oct 1, 2020 · 2 comments

Comments

@eeilon79
Copy link

eeilon79 commented Oct 1, 2020

Hi,

I'm trying to use your package as a part of larger algorithm and I'd really like to suppress the printout as it is not relevant for my purposes. The solution here (diverting the standard output of the system) does not seem to work.

@wangguanan
Copy link

I have the same question. Is there any solution?

@ArcaneEmergence
Copy link

ArcaneEmergence commented Nov 10, 2020

You need to use the GitHub version, not the pip version. There is a flag called tqdm_flag. Set it to False:
e.g.
cluster_ids_x, cluster_centers = kmeans(X=x, num_clusters=num_clusters, distance='euclidean', device=torch.device('cuda:0'), tqdm_flag=False)

It will still print the initialization though "running kMeans on device". For that you need to comment out the line in the source code.

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

No branches or pull requests

3 participants