Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandas wrapper #483

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Pandas wrapper #483

wants to merge 17 commits into from

Conversation

nick-harder
Copy link
Member

@nick-harder nick-harder commented Nov 15, 2024

Pull Request

Related Issue

Closes #[issue number] (if applicable)

Description

As suggested by @maurerle this improves performance of all simulations by a factor of 2 up to 4, by replacing pandas actions with numpy where possible. For this, we are using a wrapper object FastIndex and FastSeries which wraps a numpy array so that we can access it using typical datetime accessors.

The speed up for small simulations is 2x and for large simulations 3x.

Changes Proposed

  • Shift to using special classes of FastIndex and FastSeries
  • Adjust the rest of the code to make use of this new class

Testing

Most of the tests pass and simulations work, but a more extensive testing is required to test full functionality.

Checklist

Please check all applicable items:

  • Code changes are sufficiently documented (docstrings, inline comments, doc folder updates)
  • New unit tests added for new features or bug fixes
  • Existing tests pass with the changes
  • Reinforcement learning examples are operational (for DRL-related changes)
  • Code tested with both local and Docker databases
  • Code follows project style guidelines and best practices
  • Changes are backwards compatible, or deprecation notices added
  • New dependencies added to pyproject.toml
  • A note for the release notes doc/release_notes.rst of the upcoming release is included
  • Consent to release this PR's code under the GNU Affero General Public License v3.0

Additional Notes (if applicable)

[Any additional information, concerns, or areas you want reviewers to focus on]

Screenshots (if applicable)

[Add screenshots to demonstrate visual changes]

@nick-harder
Copy link
Member Author

@maurerle all tests pass except for one in unit_operator def test_get_actual_dispatch. I don't understand why it doesn't work, could you please take a look into it?

@nick-harder nick-harder marked this pull request as draft November 15, 2024 15:22
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