Don't return full list of results
yuanz4 opened this issue · comments
When call paper_result_list(), it only return results on first page. I look at source code, now it only did:
self.http.get(f"/evaluations/{evaluation_id}/results/")
But for all later pages, it should also call self.http.get(f"/evaluations/{evaluation_id}/results/?page=2")
Please fix this bug or provide new api, thanks!
I have the same issues with other functions, for instance paper_repository_list
Results are limited to 10 results and the function does not allow for checking other pages, which should be possible based on the Paper with Code API:
Example of a paper with 11+ repos linked:
client = PapersWithCodeClient()
func = client.paper_repository_list
args = ['sgdr-stochastic-gradient-descent-with-warm'] # paper id
el_number = func(*args).count
res_list = func(*args)
print(el_number, len(res_list.results))
print(res_list)
16 10
count=16 next_page=2 previous_page=None results=[Repository(url='https://github.com/bluesky314/Cyclical_LR_Scheduler_With_Decay_Pytorch', is_official=False, description='Cyclical_LR_Scheduler_With_Decay_Pytorch', stars=31, framework='pytorch'), Repository(url='https://github.com/MrtnMndt/Rethinking_CNN_Layerwise_Feature_Amounts', is_official=False, description='PyTorch implementation of our paper "Rethinking Layer-wise Feature Amounts in Convolutional Neural Network Architectures"', stars=6, framework='pytorch'), Repository(url='https://github.com/yumatsuoka/check_cosine_annealing_lr', is_official=False, description='Used torch.optim.lr_scheduler.CosineAnnealingLR()', stars=25, framework='torch'), Repository(url='https://github.com/Harshvardhan1/cyclic-learning-schedulers-pytorch', is_official=False, description='A PyTorch Implementation of popular cyclic learning rate schedules', stars=32, framework='pytorch'), Repository(url='https://github.com/longjj/Caffe-SGDR', is_official=False, description='Caffe implementation of SGDR', stars=2, framework='none'), Repository(url='https://github.com/tmbluth/Distracted-Drivers-Detection', is_official=False, description='Keras image detection of drivers in 10 different states, 9 of which are dangerous', stars=0, framework='none'), Repository(url='https://github.com/gurucharanmk/PyTorch_CosineAnnealingWithRestartsLR', is_official=False, description='Set the learning rate of each parameter group using a cosine annealing schedule.', stars=3, framework='pytorch'), Repository(url='https://github.com/jolibrain/caffe', is_official=False, description='Caffe: a Fast framework for deep learning. Custom version with built-in sparse inputs, segmentation, object detection, class weights, and custom layers', stars=37, framework='none'), Repository(url='https://github.com/PatriciaRodrigues1994/pytorch-facebook-udacity-challenge', is_official=False, description='Implementations of the various techniques using to solve the Facebook Pytorch Udacity Challenge.', stars=0, framework='pytorch'), Repository(url='https://github.com/SevenZhan/Pytorch', is_official=False, description='self-used pytorch utilities', stars=0, framework='pytorch')]
As we can see, 16 repos are linked to the paper, the list however only counts 10 (only 10 available in results). Trying to add the 'page' parameter in the call (similarly to the task_paper_list
function) results in an error as the parameter is not implemented in the function:
Would it be possible to implement this? Thanks!
Fixed and released in 0.2.1
version of paperswithcode-client
.