Skip to content

Get rid of ModelLoaded event (recovery 1/3) #3319

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

Merged
merged 1 commit into from
May 25, 2024
Merged

Get rid of ModelLoaded event (recovery 1/3) #3319

merged 1 commit into from
May 25, 2024

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented May 22, 2024

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

Issue: #2831

What is the current behavior?

We had three events: SessionCreated, ModelLoaded, and ModelReady.

SessionCreated is emitted when a new session is launched. A session may be based on an existing model (filename is set).

ModelLoaded is emitted when a model is loaded, and it also contains the file name

ModelReady is emitted when a model is loaded.

What is the new behavior?

Cleaned up event structure.

There's some overlap in those events. Back in the day we had the option to load a model in an existing session. We do not allow that anymore. Therefore the ModelLoaded event is a redundant and has been removed.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I ran into this while implementing #3284.

@github-actions github-actions bot added the python Pull requests that update Python code label May 22, 2024
We had three events: SessionCreated, ModelLoaded, and ModelReady.

SessionCreated is emitted when a new session is launched. A session may
be based on an existing model (`filename` is set).

ModelLoaded is emitted when a model is loaded, and it also contains
the file name

ModelReady is emitted when a model is loaded.

There's some overlap in those events. Back in the day we had the option
to load a model in an existing session. We do not allow that anymore.
Therefore the ModelLoaded event is a bit redundant.
@amolenaar amolenaar requested a review from danyeaw May 23, 2024 08:35
@amolenaar amolenaar changed the title Drop ModelLoaded event Refactorings and cleanup May 25, 2024
@amolenaar amolenaar changed the title Refactorings and cleanup Get rid of ModelLoaded event May 25, 2024
@amolenaar amolenaar changed the title Get rid of ModelLoaded event Get rid of ModelLoaded event (recovery 1/3) May 25, 2024
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Thanks @amolenaar, this changes look great!

@danyeaw danyeaw added chore Maintenance related PR and removed python Pull requests that update Python code labels May 25, 2024
@danyeaw danyeaw merged commit 45ed103 into main May 25, 2024
@danyeaw danyeaw deleted the model-ready branch May 25, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants