Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix problem when learner has no more points for BalancingLearner#214

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
basnijholt wants to merge5 commits intomain
base:main
Choose a base branch
Loading
fromfix_balancing_learner_and_sequence_learner

Conversation

@basnijholt
Copy link
Member

@basnijholtbasnijholt commentedSep 4, 2019
edited
Loading

Closes#213.

# Take the points from the cache
ifindexnotinself._ask_cache:
self._ask_cache[index]=learner.ask(n=1,tell_pending=False)
points,loss_improvements=self._ask_cache[index]
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

here one would need a double break, but because that doesn't exist I make it into a function.

@basnijholt
Copy link
MemberAuthor

Wow! This seems to break a lot of tests, will investigate some time later.

Copy link
Contributor

@jbwestonjbweston left a comment

Choose a reason for hiding this comment

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

I think that there's something I must be missing.

Currently the Learner APIdoes not allow a learner to indicate that it has no more points.
If a learner is asked forn points and it returns any more or less thann points then it is in violation of the API. This means that stuff that relies on learners accurately implementing the API is liable to break in unexpected ways.

I notice that the SequenceLearner actually does violate the API, which is why this "bug" appears in the first place. I would imagine that it is a complete accident that the SequenceLearner happens to work with other adaptive infrastructure (specifically the Runner).

It may indeed be a good idea for learners to be able to indicate that they have no more points, but this is something that needs to be looked at carefully and should not just be implemented in an ad-hoc way.

akhmerov reacted with thumbs up emoji
self._ask_cache[index]=learner.ask(n=1,tell_pending=False)
points,loss_improvements=self._ask_cache[index]
ifnotpoints:# cannot ask for more points
returnto_select
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a couple of things I don't understand here:

  • seems thisreturn should be acontinue; just because learneri could not give any more points does not mean that no other learners can give any!
  • I cannot see when this branch will ever be executed.learner.ask(1) is guaranteed to return a point. At the moment there is no way for a learner to indicate that it has "no more points". If a learner returns no points then it is in violation of the API and other stuff is liable to break

@akhmerov
Copy link
Contributor

It may indeed be a good idea for learners to be able to indicate that they have no more points, but this is something that needs to be looked at carefully and should not just be implemented in an ad-hoc way.

Indeed, this is#88

@jbweston
Copy link
Contributor

jbweston commentedNov 21, 2019
edited
Loading

Seems to me that this should be closed, and we should refer to#88.

@basnijholt@akhmerov upvote if you agree

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jbwestonjbwestonjbweston requested changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

BalancingLearner of SequenceLearners does not finish calculation

4 participants

@basnijholt@akhmerov@jbweston

[8]ページ先頭

©2009-2025 Movatter.jp