Expand regression coverage for pipeline edge cases#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def run(self, _outputs, feeds): | ||
| assert isinstance(feeds, dict) | ||
| probs = fake_np.zeros((1, len(classes)), dtype=float) | ||
| probs[0][1] = 0.9 | ||
| return [["uses"], probs] |
There was a problem hiding this comment.
Guard numpy stub against already-imported numpy
The tests rely on the helper variable fake_np, but it is only created when 'numpy' is not yet present in sys.modules. If any plugin or dependency imports numpy before this module, the if block is skipped and fake_np is never defined, so FakeSession.run will raise NameError when it accesses fake_np.zeros. Consider always defining a local alias (e.g. import numpy as np and fall back to a stub when the import fails) so the tests work regardless of whether numpy is preloaded.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68fb3f383a70832dbe9560f9f3e11c3c