-
Notifications
You must be signed in to change notification settings - Fork 26
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 documentation for exposing submission API #793
Add documentation for exposing submission API #793
Conversation
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.
Minor and repetitive changes
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
Co-authored-by: Fabien Lelaquais <[email protected]>
tp.Core().run() | ||
|
||
scenario = tp.create_scenario(my_config.monthly_scenario_cfg) | ||
|
||
tp.submit(scenario) | ||
|
||
tp.Core().run() |
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.
Why changing that? It is the opposite of what is described above.
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.
In the doc above: "Note that jobs can only be executed after the Taipy Core service is started." => The tp.Core().run()
must be run first before we submit the scenario, the previous code was incorrect in that sense, no?
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.
Not really. The Core service can be run before or after submitting jobs.
But the execution starts only when the service is started.
These lines are here to show how to submit jobs before running the service.
tp.Core().run() | ||
|
||
scenario = tp.create_scenario(scenario_config) | ||
tp.submit(scenario) | ||
|
||
# Retrieve all submission. | ||
print(f'(2) Number of submissions: {len(tp.get_submissions())}.') | ||
|
||
# Get the latest created submission of the scenario. | ||
tp.get_latest_submission(scenario) | ||
|
||
# Then delete it. | ||
tp.delete(submission) | ||
print(f'(3) Number of submissions: {len(tp.get_submissions())}.') |
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.
Can we set this under a
if __name__ == "__main__":
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.
I think we can but I don't think it's the convention in taipy-doc
?
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.
No it is not. But I am thinking of adding it, actually.
What do you think?
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.
haha it makes sense to! But in that case, then change should be applied to everywhere in the doc for consistency. Should we keep it in a separate PR?
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.
OK for me.
scenario = tp.create_scenario(my_config.monthly_scenario_cfg) | ||
task = scenario.predicting | ||
|
||
job = tp.submit(task) | ||
submission = tp.submit(task) |
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.
Can we add
if __name__ == "__main__":
Co-authored-by: Jean-Robin <[email protected]>
Co-authored-by: Jean-Robin <[email protected]>
Co-authored-by: Jean-Robin <[email protected]>
Co-authored-by: Jean-Robin <[email protected]>
tp.Core().run() | ||
|
||
scenario = tp.create_scenario(scenario_config) | ||
tp.submit(scenario) | ||
|
||
# Retrieve all submission. | ||
print(f'(2) Number of submissions: {len(tp.get_submissions())}.') | ||
|
||
# Get the latest created submission of the scenario. | ||
tp.get_latest_submission(scenario) | ||
|
||
# Then delete it. | ||
tp.delete(submission) | ||
print(f'(3) Number of submissions: {len(tp.get_submissions())}.') |
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.
OK for me.
#612