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

[WIP] Load scenes from clients #79

Closed
wants to merge 11 commits into from
Closed

[WIP] Load scenes from clients #79

wants to merge 11 commits into from

Conversation

Marsolo1
Copy link
Collaborator

Description

Added a system to load scenes with controllers, using grpc.

Related Issue (if applicable)

closes #63

How to Test

Launch the server

python3 scripts/run_server.py

Launch the Panel interface

panel serve scripts/run_interface.py --autoreload

instanciate a NotebookController

from vivarium.controllers.notebook_controller import NotebookController
controller = NotebookController()

call the load_scene func

controller.load_scene("session_1")

Now the scene should have changed and controller.agents should only show 1 agent.

IMPORTANT: Currently does not work with the web interface, you have to run it again to see the changes

@Marsolo1 Marsolo1 added enhancement New feature or request work in progress labels Apr 16, 2024
@Marsolo1 Marsolo1 changed the title Load scenes from clients [WIP] Load scenes from clients Apr 17, 2024
@Marsolo1
Copy link
Collaborator Author

@clement-moulin-frier @corentinlger
For now the server part of loading scenes work, however the web interface causes lots of errors if it is active when loading a scene because of the periodic callback. Do you have any idea on how we could prevent that?

@corentinlger
Copy link
Collaborator

@clement-moulin-frier @corentinlger For now the server part of loading scenes work, however the web interface causes lots of errors if it is active when loading a scene because of the periodic callback. Do you have any idea on how we could prevent that?

@clement-moulin-frier To fix this we just used a lock system on the server side (to prevent sending data to clients if the new state hasn't been loaded yet). Now @Marsolo1 is seing how to reload the configs on client side when the scene has been updated on the server.

@corentinlger
Copy link
Collaborator

I close the PR because it is no longer compatible with current project API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to load and close scenes from clients (the interface and the notebook)
2 participants