Jesse Myers
04/04/2023, 9:23 PMCompute function of op 'get_data_to_score' has context argument, but no context was provided when invoking
the op with the loop looks like this:
@op
def jit_scoring(trained_model):
result = []
while True:
data_to_score = get_data_to_score()
nrows = data_to_score['row_count']
print(f'JIT NRows: {nrows}')
if nrows < 1:
break
result.append(
key_to_score(data_to_score['df'])
.map(
lambda key: ingest_data_and_score(
recruiter_in_batch=key, trained_model=trained_model
)
)
.collect()
)
return result
Danny Steffy
04/04/2023, 9:30 PMget_data_to_score
takes an argument called context
and you didn't pass one in the invocationJesse Myers
04/04/2023, 9:35 PMcontext
should be passed in by dagster. But just in case i was wrong in this assumption i tried to pass it in explicitly, it still failed with the same errorsandy
04/05/2023, 12:03 AMJesse Myers
04/05/2023, 11:39 PM