flytekit icon indicating copy to clipboard operation
flytekit copied to clipboard

Remove `from json` and `to json `in the Dataclass transformer

Open Future-Outlier opened this issue 1 year ago • 1 comments

Tracking issue

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • [ ] I updated the documentation accordingly.
  • [ ] All new and existing tests passed.
  • [ ] All commits are signed-off.

Related PRs

Docs link

Future-Outlier avatar Jul 03 '24 22:07 Future-Outlier

TODO: I have to use these code to support JsonParamType in click_types.py.

decoder = JSONDecoder(self._python_type)
return decoder.decode(json.dumps(parsed_value))

Future-Outlier avatar Jul 05 '24 21:07 Future-Outlier

Codecov Report

Attention: Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 75.02%. Comparing base (a6a8651) to head (be9602e). Report is 9 commits behind head on master.

Files Patch % Lines
flytekit/core/type_engine.py 94.11% 1 Missing :warning:
flytekit/extras/pytorch/checkpoint.py 0.00% 1 Missing :warning:
flytekit/extras/tensorflow/record.py 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2557      +/-   ##
==========================================
- Coverage   76.27%   75.02%   -1.25%     
==========================================
  Files         183      254      +71     
  Lines       18716    21726    +3010     
  Branches     3694     3689       -5     
==========================================
+ Hits        14275    16301    +2026     
- Misses       3804     4772     +968     
- Partials      637      653      +16     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 06 '24 04:07 codecov[bot]

TODO: Check test_guess_dict4's behavior by debugger to know why we can't construct dataclass correctly by convert_mashumaro_json_schema_to_python_class.

Future-Outlier avatar Jul 06 '24 06:07 Future-Outlier

@Future-Outlier thanks for this PR! We would really like it if it could be completed soon. Is there anything we can do to expedite it? is anything broken with this code? All tests are passing... so why is it still a draft?

guyarad avatar Aug 13 '24 16:08 guyarad

@Future-Outlier thanks for this PR! We would really like it if it could be completed soon.

Is there anything we can do to expedite it? is anything broken with this code?

All tests are passing... so why is it still a draft?

I am in the military service, will come back in the next two weeks

Future-Outlier avatar Aug 14 '24 12:08 Future-Outlier