-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add inventorization for ML-related objects (#56)
* update readme * add tests * add impl for models * switch to getattr function * switch to getattr
- Loading branch information
1 parent
ccd8b4a
commit 6a18748
Showing
7 changed files
with
110 additions
and
9 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from collections.abc import Iterator | ||
|
||
from databricks.sdk.service.ml import ModelDatabricks | ||
|
||
from uc_migration_toolkit.providers.client import provider | ||
|
||
|
||
class CustomListing: | ||
""" | ||
Provides utility functions for custom listing operations | ||
""" | ||
|
||
@staticmethod | ||
def list_models() -> Iterator[ModelDatabricks]: | ||
for model in provider.ws.model_registry.list_models(): | ||
model_with_id = provider.ws.model_registry.get_model(model.name).registered_model_databricks | ||
yield model_with_id |
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