On demand not working after switching to another model
The behavior with texts session -d
is correct, i.e. nothing is evaluated without calling print()
. But with texts session -d -a
the models are evaluated after switching forth and back.
Here a session demonstrating the issue:
$ texts session -d -a
Resource configuration /home/ubuntu/.fireworks/res_config.yaml exists.
Welcome to textS/textM. Type %help for some help.
Input > a = 1
Input > b = a + 1
Input > tag {'test': 'ab'}
Input > %hist
WAITING 2025-02-04T13:47:47+01:00 a = 1
WAITING 2025-02-04T13:47:50+01:00 b = a + 1
Input > %new
Started new session with uuids ('7881a9ee491b44cdaa108303174d2157',)
Input > tag {'test': 'ab'}
Input > a = 1
Input > b = a + 1
Input > %hist
WAITING 2025-02-04T13:48:23+01:00 a = 1
WAITING 2025-02-04T13:48:26+01:00 b = a + 1
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:47:50+01:00 126ff2483e764ec48e645a98def368f9
READY 2025-02-04T13:48:26+01:00 7881a9ee491b44cdaa108303174d2157
Input > %start
Input >
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:47:50+01:00 126ff2483e764ec48e645a98def368f9
COMPLETED 2025-02-04T13:48:49+01:00 7881a9ee491b44cdaa108303174d2157
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:47:50+01:00 126ff2483e764ec48e645a98def368f9
COMPLETED 2025-02-04T13:48:49+01:00 7881a9ee491b44cdaa108303174d2157
Input > %uuid
uuids: '7881a9ee491b44cdaa108303174d2157' ('7881a9ee491b44cdaa108303174d2157',)
Input > %hist
COMPLETED 2025-02-04T13:48:49+01:00 a = 1
COMPLETED 2025-02-04T13:48:49+01:00 b = a + 1
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:47:50+01:00 126ff2483e764ec48e645a98def368f9
COMPLETED 2025-02-04T13:48:49+01:00 7881a9ee491b44cdaa108303174d2157
Input > %uuid 126ff2483e764ec48e645a98def368f9
Input > %hist
COMPLETED 2025-02-04T13:49:50+01:00 a = 1
COMPLETED 2025-02-04T13:49:50+01:00 b = a + 1
Input > %find {'tags': {'~test': 'ab'}}
COMPLETED 2025-02-04T13:49:50+01:00 126ff2483e764ec48e645a98def368f9
COMPLETED 2025-02-04T13:48:49+01:00 7881a9ee491b44cdaa108303174d2157
It is not due to duplicates because using different variable names also reproduces the behavior:
Resource configuration /home/ubuntu/.fireworks/res_config.yaml exists.
Welcome to textS/textM. Type %help for some help.
Input > a = 1
Input > b = a + 1
Input > tag {'test': 'ab'}
Input > %new
Started new session with uuids ('153c5de0d06a48088d34b1f0d0ac14a1',)
Input > c = 1
Input > d = c + 1
Input > tag {'test': 'cd'}
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:57:13+01:00 6dc6e10c994a4bef90a1d5e584dfc5ba
Input > %find {'tags': {'~test': 'cd'}}
READY 2025-02-04T13:57:37+01:00 153c5de0d06a48088d34b1f0d0ac14a1
Input > %start
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:57:13+01:00 6dc6e10c994a4bef90a1d5e584dfc5ba
Input > %hist
COMPLETED 2025-02-04T13:58:04+01:00 c = 1
COMPLETED 2025-02-04T13:58:04+01:00 d = c + 1
Input > %find {'tags': {'~test': 'ab'}}
READY 2025-02-04T13:57:13+01:00 6dc6e10c994a4bef90a1d5e584dfc5ba
Input > %uuid 6dc6e10c994a4bef90a1d5e584dfc5ba
Input > %hist
COMPLETED 2025-02-04T13:59:05+01:00 a = 1
COMPLETED 2025-02-04T13:59:05+01:00 b = a + 1
Edited by Ivan Kondov