Skip to content

Avoid uncecessary iteration in SequenceLearner #380

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

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Conversation

jbweston
Copy link
Contributor

This change is relevant when a SequenceLearner is used with an object that provides the Sequence interface, but lazily evaluates its elements.

Description

Please include a summary of the change and which (if so) issue is fixed.

Fixes #(ISSUE_NUMBER_HERE)

Checklist

  • Fixed style issues using pre-commit run --all (first install using pip install pre-commit)
  • pytest passed

Type of change

Check relevant option(s).

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • (Code) style fix or documentation update
  • This change requires a documentation update

This change is relevant when a SequenceLearner is used with an object that
provides the Sequence interface, but lazily evaluates its elements.
@jbweston jbweston requested a review from basnijholt October 14, 2022 20:34
@jbweston
Copy link
Contributor Author

If we could make a patch release once this is merged that would be cool.

@codecov-commenter
Copy link

Codecov Report

Merging #380 (88b0326) into main (e06b34c) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #380      +/-   ##
==========================================
- Coverage   77.76%   77.70%   -0.06%     
==========================================
  Files          37       37              
  Lines        5423     5423              
  Branches      982      981       -1     
==========================================
- Hits         4217     4214       -3     
- Misses       1061     1062       +1     
- Partials      145      147       +2     
Impacted Files Coverage Δ
adaptive/learner/sequence_learner.py 76.10% <100.00%> (ø)
adaptive/runner.py 68.60% <0.00%> (-0.69%) ⬇️
adaptive/tests/test_cquad.py 91.61% <0.00%> (-0.65%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@basnijholt basnijholt enabled auto-merge (squash) October 14, 2022 20:44
Copy link
Member

@basnijholt basnijholt left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@basnijholt basnijholt disabled auto-merge October 14, 2022 20:47
@basnijholt basnijholt merged commit 5ce6da5 into main Oct 14, 2022
@basnijholt basnijholt deleted the avoid-iteration branch October 14, 2022 20:47
@basnijholt
Copy link
Member

basnijholt pushed a commit that referenced this pull request Apr 7, 2023
This change is relevant when a SequenceLearner is used with an object that
provides the Sequence interface, but lazily evaluates its elements.
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.

3 participants