Skip to content

Update applied to models activated later

This is functionally correct if the other models include duplicates and duplicates detection is activated (activated by default). Here a full session showing this behavior:

$ texts session
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 > %hist
WAITING    2025-02-04T11:21:12+01:00 a = 1
WAITING    2025-02-04T11:21:18+01:00 b = a + 1
Input > type(a)
Output > ((name: 'a'), (type: 'Quantity'), (scalar: true), (numeric: true), (datatype: 'int'), ('group UUID': '324ba94922094bdba87b24eca9773da9'), ('model UUID': '3436d240270446b0af18764656fdfed2'), ('node UUID': '0285d332464b447aacb40d7bab7392f5'), ('node ID': 4), ('parent IDs': (2,)), ('node state': 'WAITING'), ('created on': '2025-02-04T11:21:12+01:00'), ('updated on': '2025-02-04T11:21:12+01:00'), (grammar_version: 30), (data_schema_version: 7), (category: 'interactive'), (fworker: null), (dupefinder: true), ('number of launches': 0), ('number of archived launches': 0), (launch_dir: ()), ('archived launch_dir': ()))
Input > tag (('test': 'ab'))
Input > %tag
((test: 'ab'))
Input > %new
Started new session with uuids ('12d9dd48108b4dceae01586b8084f2b8',)
Input > a = 1
Input > b = a + 1
Input > %hist
WAITING    2025-02-04T11:22:23+01:00 a = 1
WAITING    2025-02-04T11:22:28+01:00 b = a + 1
Input > tag (('test': 'ab'))
Input > %find {'tags': {'~test': 'ab'}}
READY      2025-02-04T11:21:18+01:00 3436d240270446b0af18764656fdfed2
READY      2025-02-04T11:22:28+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > %start
Input > %hist
WAITING    2025-02-04T11:22:23+01:00 a = 1
WAITING    2025-02-04T11:22:28+01:00 b = a + 1
Input > %find {'tags': {'~test': 'ab'}}
READY      2025-02-04T11:21:18+01:00 3436d240270446b0af18764656fdfed2
READY      2025-02-04T11:22:28+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > b
Output > 2
Input > %find {'tags': {'~test': 'ab'}}
READY      2025-02-04T11:21:18+01:00 3436d240270446b0af18764656fdfed2
COMPLETED  2025-02-04T11:23:30+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > %uuid
uuids: '12d9dd48108b4dceae01586b8084f2b8' ('12d9dd48108b4dceae01586b8084f2b8',)
Input > %uuid 3436d240270446b0af18764656fdfed2
Input > %hist
WAITING    2025-02-04T11:21:12+01:00 a = 1
WAITING    2025-02-04T11:21:18+01:00 b = a + 1
Input > %find {'tags': {'~test': 'ab'}}
READY      2025-02-04T11:21:18+01:00 3436d240270446b0af18764656fdfed2
COMPLETED  2025-02-04T11:23:30+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > a
Output > n.c.
Input > %find {'tags': {'~test': 'ab'}}
READY      2025-02-04T11:21:18+01:00 3436d240270446b0af18764656fdfed2
COMPLETED  2025-02-04T11:23:30+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > %start
Input > %find {'tags': {'~test': 'ab'}}
READY      2025-02-04T11:21:18+01:00 3436d240270446b0af18764656fdfed2
COMPLETED  2025-02-04T11:23:30+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > %hist
WAITING    2025-02-04T11:21:12+01:00 a = 1
WAITING    2025-02-04T11:21:18+01:00 b = a + 1
Input > a
Output > 1
Input > %hist
COMPLETED  2025-02-04T11:38:04+01:00 a = 1
COMPLETED  2025-02-04T11:38:04+01:00 b = a + 1
Input > %find {'tags': {'~test': 'ab'}}
COMPLETED  2025-02-04T11:38:04+01:00 3436d240270446b0af18764656fdfed2
COMPLETED  2025-02-04T11:23:30+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > a := 3
Input > %find {'tags': {'~test': 'ab'}}
COMPLETED  2025-02-04T11:38:26+01:00 3436d240270446b0af18764656fdfed2
RUNNING    2025-02-04T11:38:26+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > %uuid
uuids: '3436d240270446b0af18764656fdfed2' ('3436d240270446b0af18764656fdfed2',)
Input > %hist
COMPLETED  2025-02-04T11:38:26+01:00 a = 3
COMPLETED  2025-02-04T11:38:26+01:00 b = a + 1
Input > b
Output > 4
Input > %find {'tags': {'~test': 'ab'}}
COMPLETED  2025-02-04T11:38:26+01:00 3436d240270446b0af18764656fdfed2
RUNNING    2025-02-04T11:38:26+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > %uuid 12d9dd48108b4dceae01586b8084f2b8
Input > %uuid
uuids: '12d9dd48108b4dceae01586b8084f2b8' ('12d9dd48108b4dceae01586b8084f2b8',)
Input > %hist
READY      2025-02-04T11:38:26+01:00 a = 1
WAITING    2025-02-04T11:38:26+01:00 b = a + 1
Input > %start
Input > %hist
READY      2025-02-04T11:38:26+01:00 a = 1
WAITING    2025-02-04T11:38:26+01:00 b = a + 1
Input > b
Output > 2
Input > %find {'tags': {'~test': 'ab'}}
COMPLETED  2025-02-04T11:38:26+01:00 3436d240270446b0af18764656fdfed2
COMPLETED  2025-02-04T11:40:18+01:00 12d9dd48108b4dceae01586b8084f2b8
Input > type(a)
Output > ((name: 'a'), (type: 'Quantity'), (scalar: true), (numeric: true), (datatype: 'int'), (dimensionality: 'dimensionless'), (units: 'dimensionless'), ('group UUID': '849ddf70fae349f4a21e6adb6cf5b53e'), ('model UUID': '12d9dd48108b4dceae01586b8084f2b8'), ('node UUID': '7fa7ed764fb14c42b08e1140b7dc3008'), ('node ID': 8), ('parent IDs': (6,)), ('node state': 'COMPLETED'), ('created on': '2025-02-04T11:22:23+01:00'), ('updated on': '2025-02-04T11:40:18+01:00'), (grammar_version: 30), (data_schema_version: 7), (category: 'interactive'), (fworker: null), (dupefinder: true), ('number of launches': 1), ('number of archived launches': 1), (launch_dir: ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-40-18-391572',)), ('archived launch_dir': ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-23-30-262850',)))
Input > %uuid 3436d240270446b0af18764656fdfed2
Input > type(a)
Output > ((name: 'a'), (type: 'Quantity'), (scalar: true), (numeric: true), (datatype: 'int'), (dimensionality: 'dimensionless'), (units: 'dimensionless'), ('group UUID': '324ba94922094bdba87b24eca9773da9'), ('model UUID': '3436d240270446b0af18764656fdfed2'), ('node UUID': '0285d332464b447aacb40d7bab7392f5'), ('node ID': 4), ('parent IDs': (2,)), ('node state': 'COMPLETED'), ('created on': '2025-02-04T11:21:12+01:00'), ('updated on': '2025-02-04T11:38:26+01:00'), (grammar_version: 30), (data_schema_version: 7), (category: 'interactive'), (fworker: null), (dupefinder: true), ('number of launches': 1), ('number of archived launches': 1), (launch_dir: ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-38-26-249064',)), ('archived launch_dir': ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-23-30-262850',)))
Input > type(b)
Output > ((name: 'b'), (type: 'Quantity'), (scalar: true), (numeric: true), (datatype: 'int'), (dimensionality: 'dimensionless'), (units: 'dimensionless'), ('group UUID': '324ba94922094bdba87b24eca9773da9'), ('model UUID': '3436d240270446b0af18764656fdfed2'), ('node UUID': '92694319a99b493aa3b5ec1766dfe6e3'), ('node ID': 5), ('parent IDs': (4,)), ('node state': 'COMPLETED'), ('created on': '2025-02-04T11:21:18+01:00'), ('updated on': '2025-02-04T11:38:26+01:00'), (grammar_version: 30), (data_schema_version: 7), (category: 'interactive'), (fworker: null), (dupefinder: true), ('number of launches': 1), ('number of archived launches': 1), (launch_dir: ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-38-26-481423',)), ('archived launch_dir': ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-23-30-611367',)))
Input > %uuid 12d9dd48108b4dceae01586b8084f2b8
Input > type(b)
Output > ((name: 'b'), (type: 'Quantity'), (scalar: true), (numeric: true), (datatype: 'int'), (dimensionality: 'dimensionless'), (units: 'dimensionless'), ('group UUID': '849ddf70fae349f4a21e6adb6cf5b53e'), ('model UUID': '12d9dd48108b4dceae01586b8084f2b8'), ('node UUID': 'ab3190d43a2d457f81ecc7bbfb2a947b'), ('node ID': 9), ('parent IDs': (8,)), ('node state': 'COMPLETED'), ('created on': '2025-02-04T11:22:28+01:00'), ('updated on': '2025-02-04T11:40:18+01:00'), (grammar_version: 30), (data_schema_version: 7), (category: 'interactive'), (fworker: null), (dupefinder: true), ('number of launches': 1), ('number of archived launches': 1), (launch_dir: ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-40-18-654241',)), ('archived launch_dir': ('/mnt/data/ubuntu/work/vre-language/examples/launcher_2025-02-04-10-23-30-611367',)))

One can see that the archived launch for variable a has been shared between the two models before we updated a. The same is seen for b, after updating a. This is correct.

The only problem is, why the non-modified model did not reuse the shared launch. After the update the shared launch has been archived and the variables in both models have been restarted. It is desirable that the non-modified model continues to use the completed launch. For expensive calculations this is very important and the behavior is a kind of penalty for using duplicate detection, because we end up with three evaluations of each a and b (see the total number of launches) instead of two that are necessary.

Possible solution

Presumably it is due to the default rerun_duplicates=True in the call to this function or this function. It should be set to False.

Edited by Ivan Kondov