Skip to content

Commit

Permalink
fix: Remove some data from model_status when the size exceeds 3000 (#…
Browse files Browse the repository at this point in the history
…6528)

* Remove some data from model_status

* Update kfservingdeployer.py
  • Loading branch information
nachogarciam authored Sep 9, 2021
1 parent 6d582c9 commit 3a621fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/kubeflow/kfserving/src/kfservingdeployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,13 @@ def main():
# Remove some less needed fields to reduce output size.
del model_status['metadata']['managedFields']
del model_status['status']['conditions']
if sys.getsizeof(model_status) > 3000:
del model_status['components']['predictor']['address']['url']
del model_status['components']['predictor']['latestCreatedRevision']
del model_status['components']['predictor']['latestReadyRevision']
del model_status['components']['predictor']['latestRolledoutRevision']
del model_status['components']['predictor']['url']
del model_status['spec']
except KeyError:
pass

Expand Down

0 comments on commit 3a621fb

Please sign in to comment.