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

Add documentation for exposing submission API #793

Merged

Conversation

toan-quach
Copy link
Member

@toan-quach toan-quach commented Jan 18, 2024

#612

  • update submission doc in orchestrator
  • update relnote for changing exposed type of submit function

@toan-quach toan-quach requested review from FabienLelaquais and jrobinAV and removed request for FabienLelaquais January 18, 2024 07:04
Copy link
Member

@FabienLelaquais FabienLelaquais left a 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

@jrobinAV jrobinAV changed the title feature/core/#612 added doc for exposing submission api Add documentation for exposing submission API Jan 18, 2024
Comment on lines +39 to -41
tp.Core().run()

scenario = tp.create_scenario(my_config.monthly_scenario_cfg)

tp.submit(scenario)

tp.Core().run()
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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.

Comment on lines +204 to +217
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())}.')
Copy link
Member

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__":

Copy link
Member Author

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?

Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

OK for me.

Comment on lines 124 to +127
scenario = tp.create_scenario(my_config.monthly_scenario_cfg)
task = scenario.predicting

job = tp.submit(task)
submission = tp.submit(task)
Copy link
Member

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__":

docs/relnotes.md Outdated Show resolved Hide resolved
Comment on lines +204 to +217
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())}.')
Copy link
Member

Choose a reason for hiding this comment

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

OK for me.

@toan-quach toan-quach merged commit 3fa85e0 into develop Jan 23, 2024
1 check passed
@toan-quach toan-quach deleted the feature/core/#612-added-doc-for-exposing-submission-api branch January 23, 2024 08:10
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.

3 participants