-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task
: make workdir.output
more intuitive
#414
Comments
(Seeing that nobody jumps in) I like this idea and believe that it's a good compromise between the two opposed approaches we've been discussing all this time:
|
Examples of increasing complexity following this proposal: resource "iterative_task" "example" {
···
storage {
workspace = "." # input
artifacts = "./output" # output
}
} resource "iterative_task" "example" {
···
storage {
workspace = "."
artifacts = ["./output", "./models/**.hdf5"]
}
} resource "iterative_task" "example" {
···
storage {
workspace = "."
artifacts = ["./output", "./models/**.hdf5"]
output = "./experiments/1"
}
} Don't get distracted by naming, it's subject to change. |
Uploads of |
All of this functionality can be trivially implemented with the |
That's exciting. Are we talking about also of running within a go executor? 😃 |
No, we are talking about using |
By the way, @DavidGOrtega, you were assigned to this issue because of the discussion. What do you think about these proposals? Not about naming, but functionality. |
strongly against I'd rather just change the current behaviour of |
Sounds fair. @casperdcl, [how] would we solve #306? |
This comment was marked as off-topic.
This comment was marked as off-topic.
I... don't know what #306 is. At some point everyone agreed it was a duplicate of #307 (which is fully supported by #414 here). However @DavidGOrtega changed his mind with a comment I couldn't follow. |
How does #414 (self) address this case? Can you share an example HCL block and the desired behavior? |
before #414resource "iterative_task" "example1" {
script = "./run.py --epochs=1 --output=."
storage {
input = "."
output = "one"
}
}
resource "iterative_task" "example2" {
script = "./run.py --epochs=2 --output=."
storage {
input = "."
output = "two"
}
} results in:
while running
after #414resource "iterative_task" "example1" {
script = "./run.py --epochs=1 --output=./one"
storage {
input = "."
output = "one"
}
}
resource "iterative_task" "example2" {
script = "./run.py --epochs=2 --output=./two"
storage {
input = "."
output = "two"
}
} results in:
and running locally would give a consistent:
|
Yes, exactly as they would intuitively do when running jobs in parallel locally (before clouds existed). |
Crystal clear. Thank you very much! ☁️ |
@0x2b3bfa0 any stopper that you might discuss? |
Fortunately, I haven't found any major stoppers. Thanks anyway! 🙏🏼 |
Still I like the idea of having several output globs, but it's more of a future–facing API choice than a real need for basic use cases. resource "iterative_task" "example1" {
script = "./run.py --metrics=metrics.json --output=./output"
storage {
input = "."
outputs = ["output", "metrics.json"]
}
} Also, a bikesheddish remark: should we rename |
I think In terms of outputs being a list, does the schema support entries that are |
No, it would have to be a list, even if users only want to specify a single directory. resource "iterative_task" "example1" {
script = "./run.py --metrics=metrics.json --output=./output"
storage {
workspace = "."
outputs = ["output"]
}
} |
In that case I'd prefer UNIX & Windows-style path separators ( |
This comment was marked as resolved.
This comment was marked as resolved.
What if we ship storage {
workspace = "."
output = "output"
} storage {
workspace = "."
outputs = ["one", "two", "three/**.json"]
} |
This kind of behavior has several precedents in official providers. For example:
|
right now task
destroy
doescp remote://input local://output
but I think we needcp remote://output local://output
apply
(cp local://input remote://input
)detailed before-and-after spec
The text was updated successfully, but these errors were encountered: