-
Notifications
You must be signed in to change notification settings - Fork 1
added yandex 1B subset dataset generator #4
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
Conversation
| from joblib import Parallel, delayed | ||
| import multiprocessing | ||
|
|
||
| def read_fbin(filename, start_idx=0, chunk_size=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider having float and int as parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure why we need the two functions and not only float, but it is code duplication beside the type, and maybe in the future we will want to support more types
| return arr.reshape(nvecs, dim) | ||
|
|
||
|
|
||
| def write_fbin(filename, vecs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as for the read commands
| f.attrs['point_type'] = point_type | ||
| print('train size: %9d * %4d' % train.shape) | ||
| print('test size: %9d * %4d' % test.shape) | ||
| f.create_dataset('train', (len(train), len( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an ann_benchmark function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
create_text_to_image_ds.py
Outdated
| write_output(train=train_set, test=test_set, fn=f'Text-to-Image-{size}M.hd5f', distance=distance, point_type='float', count=100) | ||
|
|
||
| if __name__ == "__main__": | ||
| create_ds() No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't get this comment :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing new line
No description provided.