Skip to content
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

Fix Kubeflow TF Operator GetTaskPhase Bug #4469

Conversation

Future-Outlier
Copy link
Member

@Future-Outlier Future-Outlier commented Nov 22, 2023

#4167

Describe your changes

  • Add a function getReplicasCount to give replica pointer with default value.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Setup Process

image_spec = ImageSpec(
            packages=["flytekit",
                    "flytekitplugins-kftensorflow",
                    "tensorflow"],
            registry="localhost:30000")

# build-essential git
task_config = TfJob(
    worker=Worker(replicas=1),
    chief=Chief(replicas=0),
    ps=PS(replicas=0),
    evaluator=Evaluator(replicas=0),
)

@task(
    task_config=task_config,
    cache=True,
    requests=Resources(cpu="1"),
    cache_version="1",
    container_image=image_spec,
)
def my_tensorflow_task(x: int = 10, y: str = "abc") -> int:
    return x


if __name__ == "__main__":
    print(my_tensorflow_task(x=10, y="hello"))

Screenshots

image
image

Future Outlier added 3 commits November 22, 2023 13:07
Signed-off-by: Future Outlier <eric901201@gmai.com>
Signed-off-by: Future Outlier <eric901201@gmai.com>
Signed-off-by: Future Outlier <eric901201@gmai.com>
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (568e686) 58.61% compared to head (e844ad4) 59.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4469      +/-   ##
==========================================
+ Coverage   58.61%   59.81%   +1.19%     
==========================================
  Files         510      632     +122     
  Lines       45746    53649    +7903     
==========================================
+ Hits        26815    32091    +5276     
- Misses      16732    19033    +2301     
- Partials     2199     2525     +326     
Flag Coverage Δ
unittests 59.81% <100.00%> (+1.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Future Outlier and others added 2 commits November 23, 2023 00:02
Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. could you also check Pytorch and MPI plugin? Maybe they have the same issue

@Future-Outlier
Copy link
Member Author

Thanks. could you also check Pytorch and MPI plugin? Maybe they have the same issue

No problem!

@pingsutw pingsutw merged commit ea72bbd into flyteorg:master Nov 23, 2023
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants