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

[TD] Historical edited files and profiling heuristics #4590

Merged
merged 3 commits into from
Oct 23, 2023
Merged

Conversation

clee2000
Copy link
Contributor

@clee2000 clee2000 commented Sep 26, 2023

Add a heuristic based on profiling data and a heuristic based on historical edited files.

Addes caching for rockset queries and other functions.

@vercel
Copy link

vercel bot commented Sep 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
torchci ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2023 8:17pm

Copy link
Contributor

@ZainRizvi ZainRizvi left a comment

Choose a reason for hiding this comment

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

As per offline convo, could you please split this PR up into two: One which adds the new heuristic data and one that adds all the other refactorings?

from typing import Any, Dict, List, Optional, Union
import requests

import rockset # type: ignore[import]
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a generic utils file inside the torchci/scripts folder, I'd suggest being picky about what exactly goes inside here so that this file doesn't get too bloated over time.

General utils could be kept here, but the rockset and heuristic utils are specialized enough to warrant their own files.

I do like the idea of a the naming convention though. What if those files were all prefixed with "utils_", so it became utils_rockset.py and utils_heuristics.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i moved the functions out to their own files, but they seem a bit short haha

I also named it with utils in front for the files that are new

torchci/scripts/utils.py Outdated Show resolved Hide resolved
@@ -0,0 +1,61 @@
from collections import defaultdict
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about putting these td_ scripts inside a td subfolder instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

possibly a future thing, but also weird python module import problems make this annoying

torchci/scripts/td_heuristic_profiling.py Outdated Show resolved Hide resolved
)


def cache_json(func):
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

torchci/scripts/utils.py Outdated Show resolved Hide resolved
@clee2000 clee2000 deleted the csl/prof branch November 3, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants