https://dagster.io/ logo
#ask-community
Title
# ask-community
j

Jeremy

04/05/2023, 8:40 AM
Hello, I'm trying to do model evaluation with dagster so I have some models that are each trained as assets then an op/graph job that does the evaluation. I found the issue where I have to convert the asset to a source asset to use in op/graph job, so it works fine hard-coding to a specific model (as per the code below) . My question is, is it possible to select between models (assets) using the job's config?
Copy code
@asset
def model1():
    ...

@asset
def model1():
    ...

model1_source = model1.to_source_asset()
model2_source = model2.to_source_asset()

@job
def evaluate_model():
    data, labels = load_data_from_config)
    predictions = run_model(model1_source, data)
    evaluate_model(labels, predictions)
s

sandy

04/05/2023, 6:48 PM
Hi Jeremy - there isn't currently a straightforward way to do this. If you file an issue on Github, we might be able to get to this at some point
j

Jeremy

04/05/2023, 9:06 PM
Will do, any suggestions on designing this with what's available in the mean time? I can't be the first person to try do model train; model eval in dagster.
Created the issue here. Unfortunately, I'm not yet familiar enough with dagster's execution engine to suggest possible implementations.