question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass `inputs` through to Result class

See original GitHub issue

I would like to be able to access a tasks inputs when reading/writing results. This allows properly caching based on the different inputs to a function, for example by templating a filename as experiment;m=5.

Current behavior

Please describe how the feature works today The prefect.context is passed to the read/write(exists?) methods of the Results class

Proposed behavior

Please describe your proposed change to the current behavior Please pass the inputs also.

Example

Please give an example of how the enhancement would be useful This would allow something like the following

@task(result=GCSResult(bucket='bucket', location='{task_name};m={inputs["multiplier"].txt'))
def experiment(multiplier=1):
    # do something
    return

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
joshmeekcommented, Jun 12, 2020

@marwan116 Yes it will be!

1reaction
cicdwcommented, Jun 4, 2020

Hi @pedromachados : target is a keyword you should only use if you intend to affect the way the pipeline runs as described above. target and location are mutually exclusive at the task level, and if both are provided target will be used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python class input argument - Stack Overflow
I know, that is not possible, but how can I pass an input-argument into an instance of a class? python · oop ·...
Read more >
Passing Information to a Method or a Constructor
Arguments are the actual values that are passed in when the method is invoked. ... A parameter can have the same name as...
Read more >
Passing Arguments by Reference | ObjectScript Tutorial
Passing arguments to a class method by reference only works if you precede these arguments with a dot. Passing an array to a...
Read more >
Get input to pass into server script for a service portal widget
I'm trying to get the user input from my widget and pass it into my server script to get a result. HTML. <div...
Read more >
24. Passing Arguments | Python Tutorial
In call-by-value, the argument expression is evaluated, and the result of this evaluation is bound to the corresponding variable in the function ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found