Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #66
Some of these changes are definitely bugs preventing intended behavior from working, while others are improvements to the existing code to prevent edge cases I discovered. I separated the changes to
examples/phone
from the other changes in two separate commits in case you'd only like the former.phone/components/scene.py
_PHONE_CALL_TO_ACTION
format variable toname
instead ofagent_name
(this caused phone episodes to always fail before executing any phone actions)_PHONE_ACTION_SPEC
to useOutputType.FREE
instead of'FREE'
(which has no matching condition inplayer.act()
)did_conclude
chain of thought to be more descriptive (I was seeing it unable to understand that a task was complete and therefore running for the full 20 steps)_PHONE_CALL_TO_ACTION
so it considers the most recent observation (I was seeing that if the most recent event was "Alice schedules meeting with Bob using smartphone", this prompt sees that as already done, so picks something else to do instead.) I think this wasn't needed previously because another bug was causing phone triggering events to never be observed?phone/components/apps.py
_print
method toPhoneApp
_print
statement toToyCalendar.add_meeting
PhoneApp.invoke_action
(to prevent errors inreturn getattr(self, action.name)(**args)
if a unexpected arg is provided)Phone.description
to: "has only the following apps available" (since I was getting events like "Bob uses the Camera app to take photographs", which triggered the phone scene, but then scheduled an irrelevant meeting)ToyCalendar.check_calendar
app action (since previously I was seeing that an event like, "Alice uses the Calendar app to check her schedule for the day and confirm her appointment with Bob." could only route toadd_meeting
, so it would repeat adding the same meeting). There's probably a better way to check to see if none of the app actions make sense in the context of the event and do nothing instead.phone/components/triggering.py
yes_no_question
clearer in_is_phone_event
and_get_player_from_event
(I was seeing events like, "Alice sent a message to bob to schedule meeting" not being recognized as a phone action)phone/calendar.ipynb
examples.phone.components
import issueSTART_TIME
to be atSETUP_TIME
instead of one hour after (since Alice's plan typically mentions scheduling the meeting atSETUP_TIME
[8 AM], but the simulation was starting at 9 AM, so she seemed to think she already did that and no longer needs to)clock_now
toSimIdentity
victim
variableutterance_from_user
to be more explicit (since Alice was giving false positive confirmation by confusing plans for events)ObservationSummary.timeframe_delta_until
to 15 minutes to match clock step sizeNote: During the interrogation phase, since after 12 episodes, the
current observations
will not be far enough back in time to recall scheduling the meeting, and thesummary of observations
may skip this detail, Alice may answer that she doesn't recall whether she has successfully scheduled the meeting. Although not ideal, this seems better in my opinion than her just assuming she scheduled it because it's in herplan
, as was previously happening.Reminder: Need to comment out the pip installs in this notebook to preserve the below changes (the
thought_chains
modification appeared necessary in my testing to prevent edge cases)observation.py
pre_observe
andobserve
, strip whitespace from observation to improve "[observation]" formattingthought_chains.py
thought_chains.result_to_who_what_where
'sopen_question
from "who the event is about" to "the main person the event is about" (since I was previously seeing outputs like, e.g., "Bob is eating breakfast while Alice is scheduling a meeting", which resulted in triggering a 2nd phone event for Alice, even though Alice had already just scheduled the event and bob is the one currently acting)