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

Glove cpu #57

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Glove cpu #57

merged 4 commits into from
Oct 25, 2024

Conversation

boranhan
Copy link
Collaborator

@boranhan boranhan commented Oct 24, 2024

Issue #, if available:

Description of changes:

In this PR, when no cuda is detected, it will automatically use glove-twitter-100.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@boranhan boranhan requested a review from AnirudhDagar October 24, 2024 22:34
Comment on lines 53 to 58
if 0: #torch.cuda.is_available():
try:
self.model = SentenceTransformer(self.model_name)
except:
logger.warning(f"No model {self.model_name} is found.")

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is dead code. it will always evaluate to false

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

corrected

Copy link
Collaborator

@AnirudhDagar AnirudhDagar left a comment

Choose a reason for hiding this comment

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

please address the comments. looking at the metaflow run for benchmarking glove, i don't see the gains that were expected (seen previously here). Could it be due to the limited runtime?

Comment on lines 79 to 81
if 0: #torch.cuda.is_available():
transformed_train_column = huggingface_run(self.model, np.transpose(train_X[series_name].to_numpy()).T)
transformed_test_column = huggingface_run(self.model, np.transpose(test_X[series_name].to_numpy()).T)
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

corrected

@@ -62,5 +91,5 @@ def _transform_dataframes(self, train_X: pd.DataFrame, test_X: pd.DataFrame) ->
]
train_X = pd.concat([train_X.drop([series_name], axis=1), transformed_train_column], axis=1)
test_X = pd.concat([test_X.drop([series_name], axis=1), transformed_test_column], axis=1)

return train_X, test_X

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

@boranhan
Copy link
Collaborator Author

the limited runtime?
no, it's because we are using different pre-trained Glove models. HG glove is more advanced and more well pretrained. howver, it can't be used for GPU.

@AnirudhDagar
Copy link
Collaborator

AnirudhDagar commented Oct 25, 2024

the limited runtime?
no, it's because we are using different pre-trained Glove models. HG glove is more advanced and more well pretrained. >howver, it can't be used for GPU.

I don't think that's the case, since DBInfer also uses glove (see here) and our previous benchmarks with their preprocessing showed that specifically stumbleupon competition was heavily benefitted even with glove embeddings and them running on CPU.

Anyway, my benchmark that is running at the moment will get the 4hrs results for this as well, but i think glove embeddings are capable to push the scores in this competition based on previous benchmarks.

@boranhan
Copy link
Collaborator Author

boranhan commented Oct 25, 2024

the limited runtime?
no, it's because we are using different pre-trained Glove models. HG glove is more advanced and more well pretrained. >howver, it can't be used for GPU.

I don't think that's the case, since DBInfer also uses glove (see here) and our previous benchmarks with their preprocessing showed that specifically stumbleupon competition was heavily benefitted even with glove embeddings and them running on CPU.

Anyway, my benchmark that is running at the moment will get the 4hrs results for this as well, but i think glove embeddings are capable to push the scores in this competition based on previous benchmarks.

I'm using the same model as their setting. I think it's likely that you were previously looking at the public leaderboard. it was 100% for public one, and 60% on private.

@boranhan
Copy link
Collaborator Author

boranhan commented Oct 25, 2024

please focus on your task of benchmarking. I'll take the weekend to look at the results and I'll prioritize the tasks based on the results. Thanks! Depends on the results, I might priority on this task or not

@boranhan boranhan merged commit 8ecdde6 into autogluon:main Oct 25, 2024
@AnirudhDagar
Copy link
Collaborator

sorted_competitions_341.csv
previous DFS benchmark showing stumbleupon perf gains with glove on CPU.

@boranhan
Copy link
Collaborator Author

sorted_competitions_341.csv previous DFS benchmark showing stumbleupon perf gains with glove on CPU.

I appreciate the results. however, it don't have any context to make a good call on the results. What was the code that ran it? and why isn't that code being implemented instead?

Overall, all I wanted to say:

  1. so far, it is unknown if FE is at the highest priority task.
  2. making all of the efforts to further improve on single benchmark can ONLY happen when we don't have any other high priority task.

@AnirudhDagar
Copy link
Collaborator

I think it is not a single benchmark, but all the datasets in the future that will have text columns, all of them will benefit from this. As for the code used, here: #2

It is the code from dbinfer/tab2graph library.

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.

2 participants