You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
Using the "hello_world" example, if you run "loom run start hello_world_step hello_cap=hello.txt world_cap=hello.txt punctuation=_", you will see this runtime error:
Copying inputs failed because file already exists. Are there multiple inputs with the same name? loomengine_utils.exceptions.FileAlreadyExistsError: File already exists at /Users/nhammond/loomdata/tmp/7db0ef03-7abd-4259-bf55-7bc349d53d09/work/hello.txt
The text was updated successfully, but these errors were encountered:
Keep the error as it is now, so users cannot have multiple inputs with the same name.
Change the name when there is a conflict.
Give users a "save_as" option to change the filename.
We have a user running into this issue where he wants to give the same file twice as separate inputs. The only workaround is to copy the file and change the name on one copy, which is a terrible hack. 1. is not a good option.
There is precedent for 2. We already do this for array inputs. If you look at the "word_pairs" example you see matching filenames in an array are given an index, i.e. "cat word_pair__0__.txt word_pair__1__.txt word_pair__2__.txt word_pair__3__.txt word_pair__4__.txt word_pair__5__.txt > all_word_pairs.txt". An advantage to this format is that it reduces the chance of silent failure where a user hard-codes the filename "word_pair.txt" without realizing that it refers to the wrong file. They will be forced to use {{channel_name}} notation in order to get the right filename. We would need to extend the indexing logic to apply simultaneously to all inputs instead of indexing each array input separately.
"save_as" gives control to the user and avoids any magic. But it requires them to write a new template to accommodate a certain set of inputs.
Using the "hello_world" example, if you run "loom run start hello_world_step hello_cap=hello.txt world_cap=hello.txt punctuation=_", you will see this runtime error:
Copying inputs failed because file already exists. Are there multiple inputs with the same name? loomengine_utils.exceptions.FileAlreadyExistsError: File already exists at /Users/nhammond/loomdata/tmp/7db0ef03-7abd-4259-bf55-7bc349d53d09/work/hello.txt
The text was updated successfully, but these errors were encountered: