-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug bash improvements to Python DX, better error messages (#1346)
- Loading branch information
Showing
10 changed files
with
302 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class ClassWithoutModelInheritance: | ||
def __init__(self): | ||
self._call_count = 0 | ||
|
||
async def predict(self, call_count_increment: int) -> int: | ||
self._call_count += call_count_increment | ||
return self._call_count |
19 changes: 19 additions & 0 deletions
19
truss-chains/tests/import/standalone_with_multiple_entrypoints.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import truss_chains as chains | ||
|
||
|
||
class FirstModel(chains.ModelBase): | ||
def __init__(self): | ||
self._call_count = 0 | ||
|
||
async def predict(self, call_count_increment: int) -> int: | ||
self._call_count += call_count_increment | ||
return self._call_count | ||
|
||
|
||
class SecondModel(chains.ModelBase): | ||
def __init__(self): | ||
self._call_count = 0 | ||
|
||
async def predict(self, call_count_increment: int) -> int: | ||
self._call_count += call_count_increment | ||
return self._call_count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.