Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

max-time! only returns first result #129

Closed
AdrickTench opened this issue Sep 19, 2024 · 3 comments
Closed

max-time! only returns first result #129

AdrickTench opened this issue Sep 19, 2024 · 3 comments
Assignees
Labels
bug Issues that represent errors in the code

Comments

@AdrickTench
Copy link
Collaborator

max-time! only returns the first result but should return all (assuming it completes with the time limit). For example

metta+>!(max-time! 1 (superpose (a b c)))
[a]

should return [a, b, c]

@AdrickTench AdrickTench added the bug Issues that represent errors in the code label Sep 19, 2024
@AdrickTench
Copy link
Collaborator Author

Interesting to consider how we should handle getting some results before timing out. Do we throw time_limit_exceeded and discard results? Or can we somehow throw without losing the incremental results?

@TeamSPoon
Copy link
Collaborator

TeamSPoon commented Sep 19, 2024

secretly my intent was to give results up until the time.. sicne we are using a lazy iterator... they already have the answers (we canty take them back if we wanted to)

then at timeout should they get an exception, they can catch,? and if they want they can continue to get more?

TeamSPoon added a commit that referenced this issue Oct 4, 2024
@TeamSPoon
Copy link
Collaborator

metta+>!(max-time! 1 (superpose (a b c)))
[a

, b

, c]

@TeamSPoon TeamSPoon self-assigned this Oct 4, 2024
@trueagi-io trueagi-io locked and limited conversation to collaborators Oct 4, 2024
@TeamSPoon TeamSPoon converted this issue into discussion #142 Oct 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Issues that represent errors in the code
Projects
None yet
Development

No branches or pull requests

2 participants