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

Basic logging added #21

Merged
merged 3 commits into from
Nov 16, 2017
Merged

Basic logging added #21

merged 3 commits into from
Nov 16, 2017

Conversation

sauln
Copy link
Collaborator

@sauln sauln commented Nov 16, 2017

Here is a first pass on #18. I have tested this in a notebook and a script.

I went with scikit-learn style logging (example can be seen here) instead of the gensim style as mentioned previously. If you'd rather have the python module be used, we can convert it. There might be issues getting it to work within the numba.njit decorated functions though.

Example usage:

import umap
from sklearn.datasets import load_digits

digits = load_digits()
embedding = umap.UMAP(verbose=True).fit_transform(digits.data)

Output:

UMAP(n_neighbors=15, n_components=2, metric='euclidean', gamma=1.0, n_edge_samples=None, alpha=1.0, init='spectral', spread=1.0, min_dist=0.1, a=None, b=None, random_state=None, metric_kwds={}, verbose=True)
Construct fuzzy simplicial set
	nn descent iteration  0  /  10
	nn descent iteration  1  /  10
	nn descent iteration  2  /  10
	nn descent iteration  3  /  10
Construct embedding
	embedding iteration  0  /  11000000
	embedding iteration  1100000  /  11000000
	embedding iteration  2200000  /  11000000
	embedding iteration  3300000  /  11000000
	embedding iteration  4400000  /  11000000
	embedding iteration  5500000  /  11000000
	embedding iteration  6600000  /  11000000
	embedding iteration  7700000  /  11000000
	embedding iteration  8800000  /  11000000
	embedding iteration  9900000  /  11000000

@pep8speaks
Copy link

pep8speaks commented Nov 16, 2017

Hello @sauln! Thanks for updating the PR.

Line 155:80: E501 line too long (80 > 79 characters)
Line 350:80: E501 line too long (80 > 79 characters)
Line 449:80: E501 line too long (94 > 79 characters)
Line 573:5: E741 ambiguous variable name 'I'
Line 591:80: E501 line too long (80 > 79 characters)
Line 674:55: E203 whitespace before ':'
Line 709:80: E501 line too long (80 > 79 characters)
Line 710:9: E722 do not use bare except'
Line 831:80: E501 line too long (80 > 79 characters)

Comment last updated on November 16, 2017 at 07:35 Hours UTC

@sauln
Copy link
Collaborator Author

sauln commented Nov 16, 2017

cd847e1 should fix most of those PEP8 issues.

@lmcinnes
Copy link
Owner

Thanks, this looks great! I can imagine we might want to do something more complex in the future, but its great to have something in place now.

At least a bunch of that PEP8 stuff is my fault.

@lmcinnes lmcinnes merged commit 30b85d3 into lmcinnes:master Nov 16, 2017
@sauln sauln deleted the logging branch November 16, 2017 21:23
lmcinnes added a commit that referenced this pull request Aug 10, 2021
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.

None yet

3 participants