-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
dev(narugo): add support for headers and binary body in recorder #683
base: master
Are you sure you want to change the base?
Conversation
one more thing Aftering saving the binary responses to yaml file (some images from danbooru, 0.5MB~50MB per image) using this pr, I found it be really slow when calling Maybe a better format should be used to optimize it? I'm cosidering to save the binary body to extra binary files instead of simply put it in yaml with base64 code. |
Performance will be always an issue if we try to save binaries in yaml We need to enhance the method to allow to supply file path. Then we can store binaries close to yamls. That will be more human readable and performant Can you please update the PR with the change |
yep, I am also re-designing these code according to this idea. draft it for now |
@beliaev-maksim now the binary data are saved to files. For example, if you specify the config file I'm now using the code in this pr for the unittest in my own project, and it works well on ubuntu20.04, Python3.8. Here are some yaml and binary files I created to my unittest (the zip files in this repo): https://huggingface.co/datasets/deepghs/waifuc_responses/tree/main . I think cross-platform testing is needed now, especially on the Windows platform, and the |
Discovered a new issue: 'responses' cannot handle HEAD requests with the Update: fixed in commit 523857e |
Now ready for a review, as this version has already been deployed in our own project and is running as expected. Additionally, all unit tests have passed in Github Actions. |
Related issue: #682
In addition, after our testing, this version can be compatible with the yaml format of the previous version.