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

Add an option to skip a portion of deletes. Copy the algorithm struct in CompareToOracle. #25

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

LuuO
Copy link
Collaborator

@LuuO LuuO commented Aug 9, 2023

No description provided.

@LuuO LuuO changed the title Feature/skip del prob Add an option to skip a portion of deletes. Copy the algorithm struct in CompareToOracle. Aug 9, 2023
@LuuO LuuO marked this pull request as ready for review August 9, 2023 23:56
@LuuO LuuO requested a review from ScottSallinen August 9, 2023 23:56
Copy link
Owner

@ScottSallinen ScottSallinen left a comment

Choose a reason for hiding this comment

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

Mostly LGTM -- but I think the algorithm New should be also done in algorithm.go (Launch or Run)?

if aOF, ok := any(alg).(AlgorithmOnFinish[V, E, M, N]); ok {
algOracle := alg
if aN, ok := any(alg).(AlgorithmNew[V, E, M, N, A]); ok {
algOracle = aN.New()
Copy link
Owner

Choose a reason for hiding this comment

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

Shouldn't this also be done in the main flow as well as here in the oracle section?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah you're right. I was assuming the user would have called New() themselves before launching the algorithm.

@@ -104,6 +106,11 @@ func FlagsToOptions() (graphOptions GraphOptions) {
tsInterval = uint64(*dEdgePtr)
}
deleteOnExpire := (24 * 60 * 60) * uint64(*windowPtr)
if *skipDelProbPtr != 0 {
if *skipDelProbPtr < 0 || *skipDelProbPtr >= 1 {
log.Panic().Msg("sdp must be in the range [0, 1)")
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
log.Panic().Msg("sdp must be in the range [0, 1)")
log.Panic().Msg("Skip deletion probability must be in the range [0, 1)")

Copy link
Collaborator Author

@LuuO LuuO Aug 17, 2023

Choose a reason for hiding this comment

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

Thanks! Actually I think this option is still not ready yet because its performance is too bad (due to the linear search). Maybe we should hide this command line option. The max-flow algorithm can now handle deletes efficiently so a simple sliding window should be fine for the evaluation.

@LuuO LuuO requested a review from ScottSallinen August 17, 2023 20:40
@LuuO LuuO force-pushed the feature/skip-del-prob branch from 5080ab1 to 96984f0 Compare January 26, 2025 00:02
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.

2 participants