-
Notifications
You must be signed in to change notification settings - Fork 119
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
add additional documentation for the with_overrides feature #1181
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jill <gohd8731@gmail.com>
Signed-off-by: jill <gohd8731@gmail.com>
requests=Resources(cpu="1", mem="200Mi"), | ||
limits=Resources(cpu="2", mem="350Mi"), | ||
) | ||
def run_tfjob() -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This task shouldn't just return a string — it should actually showcase a TF operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain it? If I understand correctly, are you suggesting that I should providing a detailed description of the entire TensorFlow training code, as this might overshadow the importance of discussing the with_overrides
method? or can I provide a link to this file that explains the TensorFlow processing, allowing us to focus on how to override the task_conf
and how to run it? I want to emphasize that our primary focus here is on demonstrating the usage of overrides, or what my thought that is wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Could you then include this as part of a note but not as a code block? Not a code block because we aren't including a full-fledged code snippet.
return run_tfjob().with_overrides(task_config=TfJob( | ||
num_workers=num_workers, | ||
num_ps_replicas=1, | ||
num_chief_replicas=1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include a new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the code using black and isort.
examples/productionizing/productionizing/customizing_resources.py
Outdated
Show resolved
Hide resolved
You shouldn't remove the existing example. Please update the doc by adding a new one to it. |
ok, I see! |
Signed-off-by: jill <gohd8731@gmail.com>
limits=resources, | ||
container_image=custom_image, | ||
) | ||
def mnist_tensorflow_job(hyperparameters: Hyperparameters) -> training_outputs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a simpler task. Let's not make this complicated, and every task has to have a definition.
@dado5688, just added a comment. Is it possible for you to take a look at them and incorporate the changes? |
@samhita-alla sure! I still trying to write a simpler tf job for example. |
Signed-off-by: jill <gohd8731@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @dado5688 could you resolve the merge conflict
TL;DR
Enable users to understand how
with_overrides
can be used in dynamically update various task configurationsComplete description
Add a new example in
Using with_overrides
sectionTracking Issue
Fixes flyteorg/flyte#4067
Follow-up issue
NA