Skip to content

Bump actions/setup-python from 4 to 5 - #88

Merged
epwalsh merged 3 commits into
mainfrom
dependabot/github_actions/actions/setup-python-5
Nov 8, 2024
Merged

epwalsh merged 3 commits into
mainfrom
dependabot/github_actions/actions/setup-python-5

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 8, 2024 •

Copy link
Copy Markdown
Contributor

Bumps actions/setup-python from 4 to 5.

Release notes

Sourced from actions/setup-python's releases.

v5.0.0

What's Changed

In scope of this release, we update node version runtime from node16 to node20 (actions/setup-python#772). Besides, we update dependencies to the latest versions.

Full Changelog: actions/setup-python@v4.8.0...v5.0.0

v4.8.0

What's Changed

In scope of this release we added support for GraalPy (actions/setup-python#694). You can use this snippet to set up GraalPy:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4 
  with:
    python-version: 'graalpy-22.3' 
- run: python my_script.py

Besides, the release contains such changes as:

New Contributors

Full Changelog: actions/setup-python@v4...v4.8.0

v4.7.1

What's Changed

Full Changelog: actions/setup-python@v4...v4.7.1

v4.7.0

In scope of this release, the support for reading python version from pyproject.toml was added (actions/setup-python#669).

      - name: Setup Python
        uses: actions/setup-python@v4
</tr></table> 

... (truncated)

Commits
  • 0b93645 Enhance workflows: Add macOS 13 support, upgrade publish-action, and update d...
  • 9c76e71 Bump pillow from 7.2 to 10.2.0 in /tests/data (#956)
  • f4c5a11 Revise isGhes logic (#963)
  • 19dfb7b Bump default versions to latest (#905)
  • e9675cc Merge pull request #943 from actions/Jcambass-patch-1
  • 3226af6 Upgrade IA publish
  • 70dcb22 Merge pull request #941 from actions/Jcambass-patch-1
  • 65b48c7 Create publish-immutable-actions.yml
  • 29a37be initial commit (#938)
  • f677139 Bump pyinstaller from 3.6 to 5.13.1 in /tests/data (#923)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot @github

dependabot Bot commented on behalf of github Nov 8, 2024

Copy link
Copy Markdown
Contributor Author

The following labels could not be found: dependencies/actions.

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/github_actions/actions/setup-python-5 branch from 360f6b9 to 6549c0a Compare November 8, 2024 18:36
@epwalsh
epwalsh enabled auto-merge (squash) November 8, 2024 18:42
@epwalsh
epwalsh merged commit 53efa8c into main Nov 8, 2024
@epwalsh
epwalsh deleted the dependabot/github_actions/actions/setup-python-5 branch November 8, 2024 18:43
dhgottesman pushed a commit to dhgottesman/OLMo-core that referenced this pull request Dec 30, 2025
dhgottesman pushed a commit to dhgottesman/OLMo-core that referenced this pull request Dec 30, 2025
jason718 added a commit that referenced this pull request Nov 7, 2026
Stacked on #916. This prepares an ablation PT asked for: Run 2 (the
"Ablation 2" config, row 34 of the midtraining results sheet: 256K,
`lm1e-4` alignment parent, MT+ with agentic data, vision v6), rerun with
EMo turned **on with causal pools** during mid-training instead of EMo
off. The hero recipe currently runs every downstream stage with EMo off.

## Why

From Akshita's write-up and MaxText work (oe-planning #86–#88, #97):
- Whole-document EMo picks each document's pool from router scores
summed over the **entire** document, future tokens included. A
document's first tokens are therefore routed with information they won't
have at inference.
- The cost in her tests:
  - First-16-token loss is 1.3–1.9 nats worse.
- On a bare prompt, the model ends the document immediately in 13 of 16
cases.
- Causal pools fix this and keep modularity on her tiny-model decay
(step 9,499):

| Decay | First-16 CE (all experts) | Own 64-expert pool CE | Bare
prompt ends immediately |
|---|---|---|---|
| EMo off | 3.33 | 2.135 | 0/16 |
| EMo on | 5.20 | 2.092 | 13/16 |
| Causal | 3.34 | 2.067 | 0/16 |

Causal pools haven't been tested in mid-training yet, which is what this
run is for. The bar is "no regression against Run 2" on our evals. PT
runs the modularity checks on the checkpoint.

## What changes

### 1. `EmoRouterConfig.causal_pool`
Off by default; the default path is unchanged. This is the same rule as
the MaxText `emo_causal_pool` flag (AkshitaB/maxtext@7b2380e):
- MaxText's `csum_end - csum_before` (whole document) becomes `csum -
csum_before`: the sum of the document's scores up to and including each
token, in fp32 on the softmax scores. Here that's `ops.doc_prefix_sum`,
used in place of `ops.doc_sum_scatter`.
- Each token's pool is the top-P experts by those sums. A document's
first token keeps its own top experts, the pool narrows as the document
goes on, and the last token's pool equals the whole-document pool.
- In causal mode the env-gated fused `document_pool_keep_mask` profiling
kernel is bypassed.

### 2. EMo document boundaries in `MultimodalLM` (no MaxText
counterpart)
- Until now the LM derived EMo documents from EOS tokens
(`segment_ids_from_eos`). That matched attention in text pretraining.
- In mixed mid-training batches, attention documents aren't
EOS-delimited:
- The text side is 32 unrelated 8K chunks per 256K instance, with no EOS
at chunk ends.
  - Packed vision examples need not end in EOS.
- Without this change, a pool would span unrelated chunks or examples.
- `MultimodalLM` now passes its attention documents to
`Transformer._prepare_inputs` as `emo_segment_ids`. These come from
`example_ids`, or `document_ids` when set: the text stage's EOS +
8K-chunk segments. A padding run counts as one document.
- Pools therefore restart exactly where attention and KDA state restart.
- Nothing is passed when the LM has no EMo routers, and plain
`Transformer` callers are unchanged.

## Pool sizes: same as pretraining

When a stage keeps EMo (`apply_stage_routing(use_emo=True)` in
scaling-ladders), it reuses the source checkpoint's router config
unchanged. I checked both source checkpoints
(`olmo35-small-hero-20260907/emo/14T` and
`olmo35-small-14t-plus600bdecay-20261008-emo/step870229`):
- 512 routed experts, top-k 16.
- `min_document_expert_pool=16`, `max_document_expert_pool=512`: each
document draws one pool size P uniformly from 16–512, independently in
each MoE layer. Each token picks its 16 experts from inside its pool.
  - P = 16: every token in the document uses the same 16 experts.
  - P = 512: no restriction.
- `eval_document_expert_pool=512`: eval and HF export use all experts,
so EMo (causal or not) is a no-op for our standard evals. Only PT's
modularity checks use small pools.

The {32, 64, 256} sizes (probabilities 1/8, 1/8, 3/4) in the write-up
are MaxText's tiny-model "r3" recipe. The write-up finds those sizes
aren't special.

## Tests

`src/test/nn/moe/emo_router_v2_test.py`. The two router tests mirror
MaxText's `EmoEvalPoolsTest` cases:
- Same setup: router weight = identity so expert logits are given
directly; pools sampled in [2, 8] of 8 experts.
- Same documents: 6 + 10 tokens in row 0 and 16 tokens in row 1.
- The pool mask is read from the router's `pool_keep_mask` call.

| Test | Checks |
|---|---|
| `test_causal_pool_ignores_later_tokens` | Noise added to tokens 9
onward leaves the pool masks of tokens 0–8 unchanged and changes later
ones (as MaxText's `test_causal_pool_ignores_later_tokens`) |
| `test_causal_pool_first_token_keeps_its_own_top_experts` | Each
document's first token keeps exactly its own top-P logits, and its last
token's mask equals the whole-document one (as MaxText's test of the
same name) |
| `test_doc_prefix_sum_matches_per_document_cumsum` | Prefix sums match
a brute-force per-document cumsum over 4 segment layouts, and the last
token of each document matches `doc_sum_scatter` |
| `test_multimodal_emo_segments_follow_example_ids` | Document numbering
from `example_ids`, including the padding run |

Differences from MaxText's tests:
- Segment ids are 0-based, as OLMo-core's are.
- The seed is chosen so every first-token pool actually restricts its
document (pools of 3, 7 and 6 experts). The test asserts this, so it
can't pass trivially with a full pool.

Results (CPU):
- EMo tests (`emo_router_v2_test.py` + `emo_document_pool_test.py`): 16
passed, 5 skipped (GPU-only kernel tests).
- With causal mode disabled in the router, both causal tests fail, as
they should.
- `src/test/nn/vision/multimodal_test.py`: 46 passed.
- isort, black and ruff are clean. mypy reports nothing in the changed
files (the 9 errors it prints are pre-existing, in `data/multimodal/*`
and `multimodal_train_module.py`).

## Not in this PR / next
- The scaling-ladders switch that runs Run 2's config with
`use_emo=True` and `causal_pool=True` (#83 follow-up).
- A GPU smoke run: loss at Run 2's start, and the step-time overhead of
EMo routing compared with Run 2.
- The full run: 64 GPUs for about 2 days, pending compute from Taira.
Checkpoints go to PT for modularity checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant