Zulip Chat Archive

Stream: mathlib4

Topic: Uploading the import graph


Julian Berman (Nov 17 2024 at 16:28):

I want (a topologically sorted) import graph for mathlib, which I know importGraph basically generates. I see Mathlib's CI runs generate this, but it appears just to confirm the command works, then they immediately throw the data away. Unless I'm missing somewhere else which does this, is there any objection to preserving the graph on build? #19162 is a PR which does so if not.

Julian Berman (Nov 17 2024 at 16:31):

I guess now that I see it in the comment, this I think means scripts/count-trans-deps.py could operate on the import graph file rather than custom-parsing Lean code, though if it works at the minute of course who cares.

Julian Berman (Nov 17 2024 at 16:31):

(CC @Kim Morrison @Damiano Testa )

Damiano Testa (Nov 17 2024 at 18:05):

I do not know how the GitHub API quota works, but I know that Mathlib is often running out. Does this step add extra burden on this?

Damiano Testa (Nov 17 2024 at 18:05):

Alternatives could be to run it on a schedule, maybe once a day on master?

Damiano Testa (Nov 17 2024 at 18:06):

Or rather than saving it as an artifact, just printing the resulting dot file and store it in the CI logs?

Damiano Testa (Nov 17 2024 at 18:06):

As I mentioned, my main concern is the API quota, and I'm not sure of what is "lighter" from this perspective.

Julian Berman (Nov 17 2024 at 18:11):

Do you know which quota Mathlib tends to use up? I suspect it's the minutes quota maybe? I don't think I can see that data, but will double check. (If that's the one, this wouldn't put more pressure on it -- it does use up a bit of the storage quota, but AFAIK the "real stuff" stored, i.e. oleans, are not using GH Actions storage, they are in some cloud bucket?) But it's definitely a good thing to double check.

Julian Berman (Nov 17 2024 at 18:12):

Oh fun, I can indeed see https://github.com/leanprover-community/mathlib4/actions/metrics/usage, that's new.

Bryan Gin-ge Chen (Nov 17 2024 at 18:12):

We don't use any "minutes", I don't think. It's mainly the GitHub API quota in e.g. the GITHUB_TOKEN provided to github actions that we've been concerned about lately.

Julian Berman (Nov 17 2024 at 18:13):

Aha.

Julian Berman (Nov 17 2024 at 18:14):

From rate limiting? Or literally hitting the limit in some period?

Bryan Gin-ge Chen (Nov 17 2024 at 18:15):

Yeah, we've had issues with hitting the limit before so we have been using personal tokens from various "bot" accounts.

Julian Berman (Nov 17 2024 at 18:16):

Got it. OK, that does sound like a concern then. Hm.

Bryan Gin-ge Chen (Nov 17 2024 at 18:16):

I just found this discussion about upload-artifact, which suggests that it might be using a separate quota: https://github.com/actions/upload-artifact/issues/197

If that's true then I see no objection to your PR.

Julian Berman (Nov 17 2024 at 18:18):

Fun, I didn't know that myself.

Damiano Testa (Nov 17 2024 at 18:21):

Ok, I'm glad that we checked! I'm happy to try it out and, potentially, revert it if it causes problems and think of alternatives!

Damiano Testa (Nov 17 2024 at 18:22):

Bryan, are you happy with this as well?

Bryan Gin-ge Chen (Nov 17 2024 at 18:28):

Sure, let's go for it.

Damiano Testa (Nov 17 2024 at 18:29):

I just put it on the queue!


Last updated: May 02 2025 at 03:31 UTC