streaming icon indicating copy to clipboard operation
streaming copied to clipboard

add jpeg quality option

Open cabreraalex opened this issue 1 year ago • 5 comments

Description of changes:

Adds option for JPEG quality.

Issue #, if available:

  • Fixes #811

Merge Checklist:

Put an x without space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • [ ] I have read the contributor guidelines
  • [ ] This is a documentation change or typo fix. If so, skip the rest of this checklist.
  • [ ] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the MosaicML team.
  • [ ] I have updated any necessary documentation, including README and API docs (if appropriate).

Tests

  • [ ] I ran pre-commit on my change. (check out the pre-commit section of prerequisites)
  • [ ] I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • [ ] I ran the tests locally to make sure it pass. (check out testing)
  • [ ] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes.

cabreraalex avatar Oct 28 '24 23:10 cabreraalex

Hey @cabreraalex , thanks for creating a PR. One minor comment, can you please update your PR with the changes that are not relevant to this PR? Seems like there are some spacing changes, single/double quotes changes, etc.

karan6181 avatar Oct 29 '24 17:10 karan6181

oops yup, done

cabreraalex avatar Oct 29 '24 17:10 cabreraalex

@cabreraalex Mind addressing the review comments when you have some time? Thanks!

snarayan21 avatar Oct 31 '24 23:10 snarayan21

AFAI can tell just the config is passed, e.g. from jpeg:12 only the 12 is passed to from_str: https://github.com/mosaicml/streaming/blob/45c2132fbd3e0621c403496b51b5b56e1c174a22/streaming/base/format/mds/encodings.py#L591

There is no formal type for the quality, just integer

cabreraalex avatar Nov 01 '24 18:11 cabreraalex

@cabreraalex Mind adding the test that @ethantang-db mentioned and we can get this in?

snarayan21 avatar Nov 08 '24 17:11 snarayan21