holoviz / lumen

Illuminate your data.
https://lumen.holoviz.org
BSD 3-Clause "New" or "Revised" License
173 stars 19 forks source link

Revert speculative cast #695

Closed ahuang11 closed 1 month ago

ahuang11 commented 1 month ago

Reverts https://github.com/holoviz/lumen/commit/0365383efcc8c881bd43cfabc10196ba0f036146

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 56.62%. Comparing base (42700fc) to head (e5a5a05). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #695 +/- ## ========================================== - Coverage 56.63% 56.62% -0.01% ========================================== Files 98 98 Lines 11720 11690 -30 ========================================== - Hits 6638 6620 -18 + Misses 5082 5070 -12 ```

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

philippjfr commented 1 month ago

Thanks, I think what we should do is ensure we limit the number of enum entries. What triggered this change in the first place was that I saw a mistyped float column generating a 100MB JSON schema.

ahuang11 commented 1 month ago

I am trying to track this down, but I think all of ai/ uses utils/get_schema which limits the number of enum entries https://github.com/holoviz/lumen/blob/main/lumen/ai/utils.py#L86-L88

image

My guess is the enum is nested somewhere else in the spec.

philippjfr commented 1 month ago

I am trying to track this down, but I think all of ai/ uses utils/get_schema which limits the number of enum entries https://github.com/holoviz/lumen/blob/main/lumen/ai/utils.py#L86-L88

Sorry, I wasn't talking about Lumen AI, this is for the schema generation of the source itself.