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

GIVpower Boosting | Make projected rank update dynamically #1904

Closed
laurenluz opened this issue Dec 7, 2022 · 21 comments
Closed

GIVpower Boosting | Make projected rank update dynamically #1904

laurenluz opened this issue Dec 7, 2022 · 21 comments
Assignees
Labels
GIVeconomy GIVPower GIVpower Test Env

Comments

@laurenluz
Copy link
Member

From GIVeconomy call, we want to have projected rank show impact immediately (or as fast as possible).

Planning to make a hack in the frontend & build and API.

@MohammadPCh & @aminlatifi have a plan. Notes from GIVeconomy call are here

cc @MoeNick @maryjaf

@laurenluz
Copy link
Member Author

cc @CarlosQ96 @GriffGreen

@laurenluz
Copy link
Member Author

Giveth/impact-graph#755

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 9, 2022

Please check this scenario @MohammadPCh @aminlatifi
I boosted a project(The Foundation for Enhancing Communities) that didn't have a boost, and according to the boost amount, the expected rank is correctly displayed as 22.

image

But I expected that the current project, which has a rank 22(Cascades Raptor Center) and the following ranks will decrease by one rank(22->23/23->24/....)
But as you can see in the picture, it is unchanged for rank 22 and 25
image
image

But some like 23 and 24 are calculated correctly
image
image

1- I think there is a problem here that the expected rank for all projects is not calculated correctly
2- After a few minutes the current rank of "The Foundation for Enhancing Communities" changed from "--" into "25"
and i didn't understand why 25?
image

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 9, 2022

3- I think we have another problem because for this project (and some project else) https://giveconomy.vercel.app/project/greater-vancouver-food-bank
more than 3 round the current rank =10 projected round =11

image

@aminlatifi
Copy link
Member

Please check this scenario @MohammadPCh @aminlatifi I boosted a project(The Foundation for Enhancing Communities) that didn't have a boost, and according to the boost amount, the expected rank is correctly displayed as 22.

image

But I expected that the current project, which has a rank 22(Cascades Raptor Center) and the following ranks will decrease by one rank(22->23/23->24/....) But as you can see in the picture, it is unchanged for rank 22 and 25 image image

But some like 23 and 24 are calculated correctly image image

1- I think there is a problem here that the expected rank for all projects is not calculated correctly 2- After a few minutes the current rank of "The Foundation for Enhancing Communities" changed from "--" into "25" and i didn't understand why 25? image

It's normal 😄
As it's implemented, we calculate the instant power of a project and will tell the user where the project will stand if it has this power for a full round. Actually nothing changes in the db, and they are run independently.
For example if a project with rank 22 has power 10,000, and rank 21 has power 12,000;
the future rank of projects with the instant power of 11,000, 10,000 and 11,000 will be 22. Because they assume in the next ranking calculation nothing is touched and only they will have that power. So they will be 22.

2- After a few minutes the current rank of "The Foundation for Enhancing Communities" changed from "--" into "25"
and i didn't understand why 25?

Probably the project didn't have that power (corresponding to rank 22) for all the previous round!

@aminlatifi
Copy link
Member

3- I think we have another problem because for this project (and some project else) https://giveconomy.vercel.app/project/greater-vancouver-food-bank more than 3 round the current rank =10 projected round =11

image

Nice catch @maryjaf
The project total power is "totalPower": 59077.433625, but in frontend when we query we use 59077.43 (the rounded number). @MohammadPCh @alireza-sharifpour Can we fix it in the frontend? or needs some support in the backend?

@MohammadPCh
Copy link
Collaborator

@laurenluz @maryjaf @aminlatifi I increased the accuracy of decimal numbers. So it must be fixed.

@aminlatifi
Copy link
Member

@laurenluz @maryjaf @aminlatifi I increased the accuracy of decimal numbers. So it must be fixed.

No, it didn't solve the issue. We must solve it fundamentally!
The problem is in rounding in the backend and the frontend. We must set some precision for calculating givpower on the backend, and conform to the same policy on the frontend.
I suggest having a precision of 2 fraction digits! Going to make the backend PR now.

@aminlatifi
Copy link
Member

aminlatifi commented Dec 9, 2022

I made these PRs
#1921
Giveth/impact-graph#757

The backend has issues with tests, it's late here maybe Carlos can found the issue and solve them. If that goes through the frontend PR will be ready for review

@aminlatifi
Copy link
Member

Backend PR is merged, the fronend must work fine. But I made a PR to improve it
#1921, waiting for review by @MohammadPCh or @alireza-sharifpour

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 10, 2022

Please mention me when the changes are ready to retest on Giveconomy barnch @aminlatifi @MohammadPCh @alireza-sharifpour

@alireza-sharifpour
Copy link
Member

alireza-sharifpour commented Dec 11, 2022

Please mention me when the changes are ready to retest on Giveconomy barnch @aminlatifi @MohammadPCh @alireza-sharifpour

The Amin's PR on the Frontend is merged and it's on Giveconomy branch. @maryjaf

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 11, 2022

image

Two projects are shown as #11 ranked @aminlatifi @alireza-sharifpour

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 11, 2022

image

image

at the same time the projected rank for two project with different givpower is calculated "21"!

@aminlatifi
Copy link
Member

image

Two projects are shown as #11 ranked @aminlatifi @alireza-sharifpour

@maryjaf Are their total power different?

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 11, 2022

image Two projects are shown as #11 ranked @aminlatifi @alireza-sharifpour

@maryjaf Are their total power different?

No, it is the same for both
49,287.45
If Give Power was the same, the Rank of both projects would be the same, is the expected result?
I am not sure that they are exactly the same in decimal

@aminlatifi
Copy link
Member

aminlatifi commented Dec 11, 2022

image Two projects are shown as #11 ranked @aminlatifi @alireza-sharifpour

@maryjaf Are their total power different?

No, it is the same for both 49,287.45 If Give Power was the same, the Rank of both projects would be the same, is the expected result? I am not sure that they are exactly the same in decimal

@maryjaf Yes, they must have the same rank. In backend we limited the power precision to 2 fraction digits

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 11, 2022

image image

at the same time the projected rank for two project with different givpower is calculated "21"! Plz check this @aminlatifi

Thanks @aminlatifi
Please take a look at this as well

@aminlatifi
Copy link
Member

image image at the same time the projected rank for two project with different givpower is calculated "21"! Plz check this @aminlatifi

Thanks @aminlatifi Please take a look at this as well

If their future total power is more than or equal power of the 21st project and less than the 20th project, that value is correct. @maryjaf Is it the case/

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 11, 2022

image image at the same time the projected rank for two project with different givpower is calculated "21"! Plz check this @aminlatifi

Thanks @aminlatifi Please take a look at this as well

If their future total power is more than or equal power of the 21st project and less than the 20th project, that value is correct. @maryjaf Is it the case/

Total Givpower of "Jewish Federation of Northern New Jersey, Inc" was 8084 Giv and "Cascades Raptor Center" was 6206 Giv but for both of them the projected rank = 21
I think it would be better if we check this case together in a call tomorrow

@maryjaf
Copy link
Collaborator

maryjaf commented Dec 12, 2022

According to the conversation we had with @aminlatifi , with the new changes, it has been accepted that the calculated projected rank is not necessarily correct @laurenluz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GIVeconomy GIVPower GIVpower Test Env
Projects
None yet
Development

No branches or pull requests

5 participants