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

Ensure DataModel updates are correctly scheduled #5360

Merged
merged 2 commits into from Aug 17, 2023

Conversation

philippjfr
Copy link
Member

DataModel updates were executed even if the Document was locked. Here we correctly schedule these updates.

panel/io/datamodel.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #5360 (11aa268) into main (df0b277) will decrease coverage by 0.04%.
Report is 3 commits behind head on main.
The diff coverage is 22.22%.

@@            Coverage Diff             @@
##             main    #5360      +/-   ##
==========================================
- Coverage   72.70%   72.67%   -0.04%     
==========================================
  Files         274      274              
  Lines       39843    39861      +18     
==========================================
+ Hits        28968    28969       +1     
- Misses      10875    10892      +17     
Flag Coverage Δ
unitexamples-tests 72.67% <22.22%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
panel/io/datamodel.py 47.27% <22.22%> (-3.77%) ⬇️

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ahuang11
Copy link
Contributor

ahuang11 commented Aug 2, 2023

I think something might be one off:

async def echo_callback(
    value: Any, user: str, chat_interface: pn.widgets.ChatInterface
):
    await asyncio.sleep(2)

    message_echo = ""
    for character in value:
        message_echo += character
        await asyncio.sleep(0.1)
        yield {
            "avatar": "https://user-images.githubusercontent.com/42288570/246667324-5cf26789-765f-4f76-a8bf-49309d2ae84f.png",
            "user": "OpenAI",
            "value": message_echo,
        }


chat_card = pn.widgets.ChatCard(callback=echo_callback)
chat_interface = pn.widgets.ChatInterface(value=chat_card)
chat_interface.servable()

This video shows me typing 12345 and I expect the response to be 12345 too, but it only goes up to 1234

Screen.Recording.2023-08-01.at.10.43.28.PM.mov

@philippjfr
Copy link
Member Author

I'm not convinced the issue you're reporting is related to this PR. I'll merge for now and then do some more testing.

@philippjfr philippjfr merged commit 5a12b09 into main Aug 17, 2023
12 of 15 checks passed
@philippjfr philippjfr deleted the schedule_data_model_updates branch August 17, 2023 14:42
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.

None yet

2 participants