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.

Question: How to run tasks with dependencies without parameter?

See original GitHub issue

I cannot execute tasks with dependencies as the following example.

import gokart
#import luigi

class TaskA(gokart.TaskOnKart):
    #param = luigi.Parameter()
    def run(self):
        self.dump("Hello")

class TaskB(gokart.TaskOnKart):
    def requires(self):
        #return TaskA(param="called by TaskB")
        return TaskA()
    def run(self):
        res = self.load()
        self.dump(res + "World!")

print(gokart.build(TaskB()))
>>> World

If I write the parameters show in the comments in the code, TaskA will work.

>>> HelloWorld!

Is this behavior a specification?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kgkgzrtkcommented, Oct 18, 2021

@e-mon @mski-iksm It’s work with gokart>=1.0.6 and set serialized_task_definition_check=True. Thank you 😃

1reaction
Hi-kingcommented, Oct 18, 2021

🆒 Thx for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

luigi: task runs other tasks without creating dependency?
Suppose that there are two tasks: MainTask and OtherTask . MainTask is invoked via the command line using various parameters. Depending on the ......
Read more >
Usage | Task
Dependencies run in parallel, so dependencies of a task should not depend one another. If you want to force tasks to run serially,...
Read more >
Build Script Basics - Gradle User Manual
Most of the examples in this user guide are run with the -q command-line option. ... To add a dependency, the corresponding task...
Read more >
DAGs — Airflow Documentation
A DAG (Directed Acyclic Graph) is the core concept of Airflow, collecting Tasks together, organized with dependencies and relationships to say how they...
Read more >
Luigi Patterns — Luigi 2.8.13 documentation - Read the Docs
You'll need to use WrapperTask for this instead of the usual Task class, because this job will not produce any output of its...
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