Skip to content

Refactor test setup with temporary directories - #95

Merged
cpaniaguam merged 13 commits into
mainfrom
cpaniaguam/move-test-artifacts-to-tempdir
Oct 14, 2026
Merged

cpaniaguam merged 13 commits into
mainfrom
cpaniaguam/move-test-artifacts-to-tempdir

Conversation

@cpaniaguam

@cpaniaguam cpaniaguam commented Jul 1, 2026 •

Copy link
Copy Markdown
Collaborator

Introduce temporary directories for test artifacts and streamline the end-to-end test setup. This change enhances test isolation and reduces clutter in the main directory.

Summary by CodeRabbit

  • Tests
    • Updated end-to-end test setup to use shared temporary folders for generated data and model artifacts.
    • Improved file-path handling for saved and loaded training state files.
    • Simplified test code by moving data-generation helpers into reusable fixtures.
    • Marked one end-to-end test as slow and documented how to exclude slow tests during test runs.

Copilot AI review requested due to automatic review settings July 1, 2026 16:40
@coderabbitai

This comment was marked as spam.

This comment was marked as spam.

coderabbitai[bot]

This comment was marked as outdated.

@codecov

This comment was marked as resolved.

Copilot AI review requested due to automatic review settings July 1, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@AlexanderFengler

Copy link
Copy Markdown
Member

@cpaniaguam this test-tempdir refactor has conflicted with main since July. Rebase if it is still wanted, otherwise close; the test layout has moved on since. @digicosmos86 is requested as reviewer.

digicosmos86
digicosmos86 previously approved these changes Oct 14, 2026

@digicosmos86 digicosmos86 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Easy fix for merge conflict. Otherwise merge away

@cpaniaguam

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

…artifacts-to-tempdir

# Conflicts:
#	pyproject.toml

Co-authored-by: cpaniaguam <68481491+cpaniaguam@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:08
Co-authored-by: cpaniaguam <68481491+cpaniaguam@users.noreply.github.com>

Copilot AI commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merged main, resolved the pyproject.toml marker conflict while retaining both markers, and addressed the workflow-permissions alert. Merge commit: 6ee01fc; permissions fix: dc4c3e8.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The JAX OPN parameterization incorrectly saves and reloads artifacts under the CPN network type.

1 open finding

🧠 Review effort: Balanced

Comment thread tests/test_end_to_end_jax.py Outdated
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The JAX OPN case still saves and reloads its artifact under the incorrect CPN identity.

1 open finding
Previously missed (1)

In code that hasn't changed since last review

Medium severity Pass parameterized network type to prevent OPN mislabeling

tests/​test_end_to_end_jax.py:150

The OPN case is still deliberately mapped to cpn, so this end-to-end test writes and reloads an OPN model under the wrong network identity. ModelTrainerJaxMLP.train_and_evaluate supports network_type specifically because logits cannot distinguish CPN from OPN, and tests/test_run_identity.py:311-322 documents that the fallback is the legacy mislabeling. Pass the parameterized type to the trainer and use it in the expected state filename.

🧠 Review effort: Balanced

Co-authored-by: cpaniaguam <68481491+cpaniaguam@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The fixture refactor consistently isolates artifacts while preserving the tested training workflows.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@digicosmos86 digicosmos86 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@cpaniaguam
cpaniaguam merged commit f2664b0 into main Oct 14, 2026
13 checks passed
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.

5 participants