Skip to content

Implemented write_spmatrix_to_sparse_tensor #28

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

Merged
merged 7 commits into from
Dec 29, 2017
Merged

Implemented write_spmatrix_to_sparse_tensor #28

merged 7 commits into from
Dec 29, 2017

Conversation

meownoid
Copy link
Contributor

Implemented write_numpy_to_sparse_tensor which supports any scipy.sparse matrix (#27).

@owen-t owen-t self-requested a review December 21, 2017 20:49
Copy link
Contributor

@owen-t owen-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Egor,

This is great, thanks for your contribution!

@@ -89,6 +108,46 @@ def write_numpy_to_dense_tensor(file, array, labels=None):
_write_recordio(file, record.SerializeToString())


def write_numpy_to_sparse_tensor(file, array, labels=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be write_spmatrix_to_sparse_tensor ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fixed.


record = Record()
for row_idx in range(n_rows):
record.Clear()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this isn't done at the end of the for-loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -89,6 +108,46 @@ def write_numpy_to_dense_tensor(file, array, labels=None):
_write_recordio(file, record.SerializeToString())


def write_numpy_to_sparse_tensor(file, array, labels=None):
"""Writes a numpy array to a dense tensor"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spmatrix not numpy array

@@ -89,6 +108,46 @@ def write_numpy_to_dense_tensor(file, array, labels=None):
_write_recordio(file, record.SerializeToString())


def write_numpy_to_sparse_tensor(file, array, labels=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@meownoid meownoid changed the title Implemented write_numpy_to_sparse_tensor Implemented write_spmatrix_to_sparse_tensor Dec 22, 2017
@owen-t
Copy link
Contributor

owen-t commented Dec 28, 2017

Thanks again for your submission

@andremoeller andremoeller merged commit 7ef5771 into aws:master Dec 29, 2017
@andremoeller
Copy link
Contributor

@meownoid Merged in, thanks!

laurenyu added a commit to laurenyu/sagemaker-python-sdk that referenced this pull request May 31, 2018
Since publicly this is being known as "hyperparameter tuning" (or some variation of that), it doesn't make sense that we'd use "hpo" everywhere
apacker pushed a commit to apacker/sagemaker-python-sdk that referenced this pull request Nov 15, 2018
BYOM Notebooks - Verbosity and other notes.
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.

4 participants