Hello! I have few runs that have a couple of step...
# ask-metaflow
j
Hello! I have few runs that have a couple of steps running locally and one using @batch, however when I try
run.code
its is none. Any idea why this could be the case? I know that atleast one run should be outside local env, and this does run on batch. Thank you!
1
v
can you check
run[step_name].task.code
for the task that run on Batch
it is a known issue that
.code
is not persisted for local-only runs
j
Ahh got it. I saw related threads and found 1-"Atleast one run should be non local" and 2-"the code package is same for all steps". So i thought run.code should get the code. But checking the code of the non-local task worked! Thank you!
👍 1
v
yeah, we should fix run.code so that it always returns the code package when it’s available in any step
j
Could I try sending a PR for that or is it complicated?
v
it shouldn't be complicated! Instead of just looking at the
start
step here, loop through all steps until a code package is found: https://github.com/Netflix/metaflow/blob/master/metaflow/client/core.py#L1659 If you start from
start
, the happy common case is not slower than the current version
thankyou 1
j
Thanks for the info, I shall send a PR soon then!
v
awesome! Please refer to this new issue https://github.com/Netflix/metaflow/issues/1322
❤️ 1