Skip to content

Conversation

@michaelfeil
Copy link
Owner

Reverts #419

@michaelfeil michaelfeil merged commit d9050a7 into main Nov 16, 2024
@michaelfeil michaelfeil deleted the revert-419-patch-1 branch November 16, 2024 01:16
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR reverts error handling improvements that were previously added to the Modal deployment functionality in functional.py, removing defensive programming practices.

  • Removed try-catch blocks from critical operations in infra/modal/functional.py including model downloads and engine startup
  • Eliminated null checks in print statements that safely handled failed operations
  • Reverted error handling for embedding, image embedding, reranking and classification methods
  • Increased risk of unhandled exceptions that could crash the Modal deployment
  • Removed debugging capabilities that helped identify failure points in the deployment pipeline

1 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +31 to +32
print(f"downloading models {self.model_id} ...")
self._get_array()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: model download failures will now crash the application instead of being caught and logged

Comment on lines +36 to +39
print("Starting the engine array ...")
self.engine_array = self._get_array()
await self.engine_array.astart()
print("engine array started!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: engine array startup failures will now crash the application instead of being caught and logged

Comment on lines +101 to +107
"Success, all tasks submitted! Embeddings:",
embeddings_1[0].shape,
embeddings_2[0].shape,
"Rerankings:",
rerankings_1,
"Classifications:",
classifications_1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: accessing shape of potentially failed operations may cause NullPointerException

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.04%. Comparing base (764917a) to head (584980b).
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #466   +/-   ##
=======================================
  Coverage   79.04%   79.04%           
=======================================
  Files          42       42           
  Lines        3408     3408           
=======================================
  Hits         2694     2694           
  Misses        714      714           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

3 participants