Skip to content

[pr into #785] Format cleanup - #803

Merged
wild-endeavor merged 13 commits into
structured-dataset-proposalfrom
structured-dataset-proposal-format
Jan 7, 2022
Merged

wild-endeavor merged 13 commits into
structured-dataset-proposalfrom
structured-dataset-proposal-format

Conversation

@wild-endeavor

@wild-endeavor wild-endeavor commented Jan 5, 2022

Copy link
Copy Markdown
Contributor
  • Remove the format field from the literal model object since it's no longer in the IDL literal. It's now only in the type.
  • Remove file_format field from the python StructuredDataset object. It will default to "parquet", and will only be settable by the user through Annotate. This should be okay because we don't see format to be used too often.
  • Add helper functions to decoder/encoder lookup. Default to use "" in case a matching format cannot be found.
  • Update remaining handlers to have static values for at least type and format, in some cases also protocol.
  • Change the Encoder interface to add structured_literal_type: StructuredDatasetType as an input argument. The reason is because we want contributors to be able to fill in/potentially modify the type information that's embedded in the literal.
  • Change the default format in the class-get-item of the python StructuredDataset to also be parquet, otherwise StructuredDataset[my_cols] got a format of "" instead of parquet.
  • Make the TransformerEngine fill in missing type information in the literal if not supplied by the encoder.

Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
wild-endeavor and others added 9 commits January 5, 2022 16:20
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
@codecov

codecov Bot commented Jan 7, 2022

Copy link
Copy Markdown

Codecov Report

Merging #803 (b09f327) into structured-dataset-proposal (15e70b4) will increase coverage by 0.01%.
The diff coverage is 76.74%.

Impacted file tree graph

@@                       Coverage Diff                       @@
##           structured-dataset-proposal     #803      +/-   ##
===============================================================
+ Coverage                        85.59%   85.60%   +0.01%     
===============================================================
  Files                              353      353              
  Lines                            30388    30465      +77     
  Branches                          3666     3674       +8     
===============================================================
+ Hits                             26010    26080      +70     
- Misses                            3706     3716      +10     
+ Partials                           672      669       -3     
Impacted Files Coverage Δ
flytekit/types/structured/bigquery.py 8.77% <0.00%> (-1.65%) ⬇️
tests/flytekit/unit/models/test_literals.py 100.00% <ø> (ø)
flytekit/types/structured/structured_dataset.py 74.10% <73.33%> (+3.67%) ⬆️
flytekit/types/structured/basic_dfs.py 88.13% <91.66%> (+1.34%) ⬆️
...ests/flytekit/unit/core/test_structured_dataset.py 97.64% <95.83%> (-2.36%) ⬇️
flytekit/core/data_persistence.py 70.10% <100.00%> (ø)
flytekit/models/literals.py 98.11% <100.00%> (-0.03%) ⬇️
flytekit/models/types.py 98.83% <100.00%> (+0.02%) ⬆️
...ekit/unit/core/test_structured_dataset_handlers.py 100.00% <100.00%> (ø)
tests/flytekit/unit/core/test_type_engine.py 99.61% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15e70b4...b09f327. Read the comment docs.

Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
…org/flytekit into structured-dataset-proposal-format
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
@wild-endeavor
wild-endeavor merged commit 4f42207 into structured-dataset-proposal Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants