This repository was archived by the owner on Apr 27, 2024. It is now read-only.
Added docstrings, type hints to following functions:#19
Open
S1ddh4rth wants to merge 3 commits intoeigengravy:mainfrom
Open
Added docstrings, type hints to following functions:#19S1ddh4rth wants to merge 3 commits intoeigengravy:mainfrom
S1ddh4rth wants to merge 3 commits intoeigengravy:mainfrom
Conversation
_compute_accuracy, accuracy_scorer, marginal_gain_scorer
eigengravy
suggested changes
Jun 14, 2023
Owner
eigengravy
left a comment
There was a problem hiding this comment.
also format using black, you can setup vscode to use it by default
Open
accuracy_scorer, marginal_gain_scorer, removing unecessary imports
eigengravy
suggested changes
Jun 14, 2023
|
|
||
|
|
||
| def multikrum_scorer(weights): | ||
| def multikrum_scorer(weights: List[Mapping[str, Any]]): |
Owner
There was a problem hiding this comment.
return type is list of floats
Suggested change
| def multikrum_scorer(weights: List[Mapping[str, Any]]): | |
| def multikrum_scorer(weights: List[Mapping[str, Any]]) -> List[float]: |
|
|
||
|
|
||
| def accuracy_scorer(weights, testloader): | ||
| def accuracy_scorer(weights: List[Mapping[str, Any]], testloader: DataLoader)-> List(float): |
Owner
There was a problem hiding this comment.
typo
Suggested change
| def accuracy_scorer(weights: List[Mapping[str, Any]], testloader: DataLoader)-> List(float): | |
| def accuracy_scorer(weights: List[Mapping[str, Any]], testloader: DataLoader)-> List[float]: |
|
|
||
|
|
||
| def fedavg_models(weights): | ||
| def fedavg_models(weights: list[dict])-> dict: |
| ) | ||
|
|
||
| def forward(self, x): | ||
| def forward(self, x: DataLoader)-> DataLoader: |
Owner
There was a problem hiding this comment.
take lite
Suggested change
| def forward(self, x: DataLoader)-> DataLoader: | |
| def forward(self, x): |
Author
|
Sorry I think I pushed the scorer.py changes by accident, I was waiting until after Druva implemented the other ML Model to complete it properly. I'll Fix these |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_compute_accuracy, accuracy_scorer, marginal_gain_scorer