valohai / valohai-utils

Python helper library for Valohai
MIT License
2 stars 2 forks source link

download datum://id and datum://alias files, run execution locally, using project data files #134

Closed ccschneidr closed 3 months ago

ccschneidr commented 4 months ago

As discussed in the Continental support channel, we need the possibility to download datum:// input files to run an execution locally. This pull request adds this feature to valohai-utils' download.py. Using this we were able to run a complete execution, locally.

To test, perform the following steps

import valohai

valohai.prepare(
    step="predict",
    default_inputs={
        "model-http": "http://example.com",
        "model-alias": "datum://my_models_alias",
        "model-id": "datum://01941935-832f-16d4-af69-6a9bf6bf4df6",
    },
)

print(valohai.inputs("model-http").path())
print(valohai.inputs("model-id").path())
print(valohai.inputs("model-alias").path())
hylje commented 4 months ago

Thank you for the PR, I will adopt the branch to add improvements and add automated test cases.