Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ <h3><a href="https://drobyshevdev.github.io/research/" rel="noopener">research
</article>

<article class="card">
<p class="meta"><span>Free course</span><span class="sep">·</span>27 modules<span class="sep">·</span><span lang="ru">Русский</span></p>
<p class="meta"><span>Free course</span><span class="sep">·</span>27 modules<span class="sep">·</span><span lang="ru">Русский</span><span class="sep">·</span>English</p>
<h3><a href="https://drobyshevdev.github.io/lemma/" rel="noopener">lemma — the road into ML, DL and RL</a></h3>
<p>
From the arithmetic of a mean to reproducing a recent paper. No sign-up and no first
Expand Down
2 changes: 1 addition & 1 deletion ru/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ <h3><a href="https://drobyshevdev.github.io/research/ru/" rel="noopener">researc
</article>

<article class="card">
<p class="meta"><span>Бесплатный курс</span><span class="sep">·</span>27 модулей<span class="sep">·</span>русский</p>
<p class="meta"><span>Бесплатный курс</span><span class="sep">·</span>27 модулей<span class="sep">·</span>русский<span class="sep">·</span>английский</p>
<h3><a href="https://drobyshevdev.github.io/lemma/" rel="noopener">lemma — дорога в ML, DL и RL</a></h3>
<p>
От арифметики среднего до воспроизведения свежей статьи. Без регистрации и без «первый
Expand Down
53 changes: 53 additions & 0 deletions scripts/check_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
on this site and in the organisation profile, which
spells the same figures out in words and so escaped
every check that looked for digits
lemma's modules lemma's CITATION.cff, which lemma's own
check_counts.py holds to docs/modules/ -- checked
on both cards here (in digits) and in the profile
(in words, twice)
required dependencies glia's pyproject.toml, read directly
line coverage Codecov, the run that produced it

Expand Down Expand Up @@ -55,6 +59,7 @@
PROFILE = f"{RAW}/.github/master/profile/README.md"
WORDS = {
22: "twenty-two", 23: "twenty-three", 24: "twenty-four", 25: "twenty-five",
26: "twenty-six", 27: "twenty-seven", 28: "twenty-eight",
29: "twenty-nine", 30: "thirty", 31: "thirty-one", 32: "thirty-two",
33: "thirty-three", 34: "thirty-four", 35: "thirty-five",
}
Expand Down Expand Up @@ -87,6 +92,22 @@ def source_counts() -> tuple[int, int, int] | None:
return tuple(int(g) for g in match.groups()) if match else None


def source_lemma_modules() -> int | None:
"""How many modules lemma actually has.

Read from lemma's CITATION.cff, which lemma's own scripts/check_counts.py
holds to docs/modules/ on every push. So this is not a second opinion about
the count -- it is the same count, followed one repository further out.
"""
citation = fetch(f"{RAW}/lemma/main/CITATION.cff")
if citation is None:
return None
match = re.search(r"([a-z]+(?:-[a-z]+)?) modules in [a-z]+ parts", citation.lower())
if match is None:
return None
return next((value for value, word in WORDS.items() if word == match.group(1)), None)


def source_glia_dependencies() -> int | None:
pyproject = fetch(f"{RAW}/glia/master/pyproject.toml")
if pyproject is None:
Expand Down Expand Up @@ -146,6 +167,23 @@ def main(root: Path) -> int:
f"but decisionrl ships {applied}"
)

modules = source_lemma_modules()
if modules is None:
unchecked.append("lemma's modules — its CITATION.cff could not be read, or spells a "
"count this script has no word for")
else:
for name in PAGES:
page = (root / name).read_text(encoding="utf-8")
# Цифрами на карточке курса: "27 modules" / "27 модулей".
quoted = re.findall(r"(\d+) (?:modules|модул\w+)", page)
if not quoted:
problems.append(f"{name}: no longer states how many modules lemma has")
for value in quoted:
if int(value) != modules:
problems.append(
f"{name}: says {value} modules, lemma has {modules}"
)

dependencies = source_glia_dependencies()
if dependencies is None:
unchecked.append("required dependencies — glia's pyproject.toml could not be read")
Expand Down Expand Up @@ -190,6 +228,21 @@ def main(root: Path) -> int:
f"decisionrl ships {word} ({value})"
)

if modules is not None:
profile = fetch(PROFILE)
if profile is None:
unchecked.append("the organisation profile could not be read for lemma's count")
else:
word = WORDS[modules]
stated = re.findall(r"([a-z]+(?:-[a-z]+)?) modules", profile.lower())
if not stated:
problems.append("organisation profile: no longer states a count of modules")
for said in stated:
if said != word:
problems.append(
f"organisation profile: says {said} modules, lemma has {word} ({modules})"
)

unchecked.append(
"praxis on real models — the offline column of its quality table is pinned by a "
"test; recall@5 0.92 and MRR 0.94 need a GPU CI does not have"
Expand Down
Loading