How to migrate from using SourceAsset to AssetSpec #24005
-
What's the issue or suggestion?Hi, in the release of dagster 1.8 it is said that SourceAsset are being deprecated and we should use AssetSpec instead. My question is : how to migrate from one to the other? Additional informationNo response Message from the maintainersImpacted by this issue? Give it a 👍! We factor engagement into prioritization. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I have another example where I don't really see how to solve it. We have a machine learning model that must be read in memory using our xgboost io manager. The model is made manually in jupyter notebooks because we could change the hyperparameter, the features etc. With a source Asset , we can specify the io manager to use to load the model, but I do not see how to load the model in another asset using the AssetSpec |
Beta Was this translation helpful? Give feedback.
-
Hello @ShootingStarD, have you tried steps mentioned in migration docs? # before
from dagster import SourceAsset
my_asset = SourceAsset("my_asset", io_manager_key="abc")
# after
from dagster import AssetSpec
my_asset = AssetSpec("my_asset", metadata={"dagster/io_manager_key": "abc"}) |
Beta Was this translation helpful? Give feedback.
-
Oh, sorry I didn't see the migration guide, thanks I'll follow that |
Beta Was this translation helpful? Give feedback.
Hello @ShootingStarD, have you tried steps mentioned in migration docs?