Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Nayef211/update vectors#853

Merged
Nayef211 merged 31 commits intopytorch:masterfrom
Nayef211:nayef211/update_vectors
Jun 25, 2020
Merged

Nayef211/update vectors#853
Nayef211 merged 31 commits intopytorch:masterfrom
Nayef211:nayef211/update_vectors

Conversation

@Nayef211
Copy link
Copy Markdown
Contributor

@Nayef211 Nayef211 commented Jun 25, 2020

Description

  • Explicitly check that all dimensions are of the same size when loading tokens from a file like
  • Use _load_token_and_vectors_from_file method for the underlying implementation of vectors_from_file_object for consistency. Raise error when there is a duplicate token present in the csv file.
  • Fixed bug where a tuple wasn't being appended to dup_tokens
  • Fixed logic for dupe check for GloVe

@Nayef211 Nayef211 marked this pull request as ready for review June 25, 2020 21:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 25, 2020

Codecov Report

Merging #853 into master will decrease coverage by 0.04%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #853      +/-   ##
==========================================
- Coverage   76.91%   76.86%   -0.05%     
==========================================
  Files          42       42              
  Lines        2946     2944       -2     
==========================================
- Hits         2266     2263       -3     
- Misses        680      681       +1     
Impacted Files Coverage Δ
torchtext/experimental/vectors.py 86.79% <83.33%> (-1.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a664981...24742b9. Read the comment docs.

Comment thread test/asset/vectors_test.csv Outdated
a,1 0 0
b,0 1 0 No newline at end of file
a 1 0 0
b 0 1 0 No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why do we remove comma from csv file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Readded this

@Nayef211 Nayef211 requested a review from zhangguanheng66 June 25, 2020 22:34
@Nayef211 Nayef211 merged commit b887daa into pytorch:master Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants