Skip to content

plugin runner fixes (corrupted environment cleanup & remove poetry) - #21

Merged
kvfairchild merged 28 commits into
mainfrom
kvf/conda_fix
Aug 9, 2022
Merged

kvfairchild merged 28 commits into
mainfrom
kvf/conda_fix

Conversation

@kvfairchild

@kvfairchild kvfairchild commented Aug 1, 2022 •

Copy link
Copy Markdown
Contributor

This PR addresses 2 issues affecting the plugin runner:

1. Replaces poetry with pip for project and plugin setup

Due to limitations in poetry, plugin environment setup has been working locally but failing silently in Travis. This replaces poetry with pip for both plugin and project setup. (This is a somewhat bittersweet farewell to poetry as we are losing its nice dependency conflict management!).

2. Adds cleanup for corrupted conda environments

If a conda environment is corrupted during setup (which can occur via keyboard interrupt or other common events), it is not recognized by conda as an environment and cannot be removed by conda env remove.

This adds a fallback method (shutil.rmtree()) that attempts to directly remove a corrupted environment directory, and on failure raises a warning to the user that the environment should be manually deleted.

@mschrimpf mschrimpf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

my take is still that if conda can't remove an environment, we shouldn't further touch it. Have you encountered this case? If yes, under which conditions does it occur?

Comment thread tests/test_test_plugins.py Resolved
@kvfairchild

Copy link
Copy Markdown
Contributor Author

my take is still that if conda can't remove an environment, we shouldn't further touch it. Have you encountered this case? If yes, under which conditions does it occur?

This is unfortunately common when environment creation is disrupted (see PR description). @d-val ran into it almost immediately:
image

@kvfairchild kvfairchild changed the title automatic removal of corrupted conda environments plugin runner fixes (corrupted environment cleanup & remove poetry) Aug 9, 2022
@kvfairchild
kvfairchild merged commit 98d5ffa into main Aug 9, 2022
@kvfairchild
kvfairchild deleted the kvf/conda_fix branch August 9, 2022 21:46
mschrimpf added a commit that referenced this pull request Oct 26, 2022
…#21)

* directly remove env dir if corrupted

* thorough test for env teardown

* nit

* add comment

* add plugin env path to test runner

* nit

* poetry update

* poetry revert

* poetry test

* poetry test

* poetry --> pip

* update setuptools to beta for PEP660 support

* update setuptools to beta for PEP660 support

* update conda env setup command

* extend conda base test

* stop plugin tests failing silently

* update conda base test

* remove not-yet-existent benchmark import

* add datasets

* fix typo

* add datasets

* add travis fold around plugin tests

* remove travis fold around plugin tests

Co-authored-by: Katherine Fairchild <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
KartikP added a commit that referenced this pull request Oct 14, 2026
Run the coordinated four-package checks for Language PRs and pushes
targeting v2. The shared workflow builds and tests installed wheels on
Ubuntu and macOS and runs the OpenPI client profile.

The caller supplies the exact PR head and source repository, including
forks. Other peers stay pinned. Both the workflow and Unified source use
immutable commit `d445bdb`; no secrets are inherited and token access is
read-only. Existing Jenkins jobs remain in place for domain and plugin
checks.

Depends on [Unified
#21](KartikP/brainscore-unified#21). Validation:
actionlint passes; the local required Language selection passes (67
tests). The shared runner has 14 new revision-resolution cases and
passed its full local offline suite.

After the caller merges, require the reported `UMI v2 / ...` statuses on
v2. This PR does not change branch protection or publish packages.
Supports brain-score/unified-model-interface#16 and #18.
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.

2 participants