You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is then saved as the new orca table, looses the index name, for example 'household_id'
So the solution I propose is to add this line: new.index.name = hh.index.name
right after this line, to make sure the index name gets preserved.
The agents table is called with the local columns and the settings.get('add_columns', []): hh = agents.to_frame(agents.local_columns + settings.get('add_columns', [])).
But then, when the new table is saved as an orca table, orca.add_table(agents.name, new), all the columns specified in the to_frame() are passed as local_columns which is a change that the model should not do. So I propose that when registering the new data frame as an orca table, we pass the local_columns as well, like this: orca.add_table(agents.name, new[agents.local_columns])
The text was updated successfully, but these errors were encountered:
As part of the update, we should probably check whether there's other code anywhere that assumes the old behavior, in case we need to change anything in those places. One approach could be to find a model that uses utils.full_transition(), set a random seed, and run the whole model once with the old function and once with the new function. If the output is identical, then there probably aren't any side effects from the change.
Okay, I'll do that. I'm thinking that I can include this fix in the linked_tables_addin branch, since that branch is also a fix for the transition model, except that adds something to the simple_transition model. The issue is #36.
So with that branch, we can test the simple and full transition models.
I would like to improve two things in the utils.full_transition model.
new
dataframe that results from this operation:which is then saved as the new orca table, looses the index name, for example
'household_id'
So the solution I propose is to add this line:
new.index.name = hh.index.name
right after this line, to make sure the index name gets preserved.
settings.get('add_columns', [])
:hh = agents.to_frame(agents.local_columns + settings.get('add_columns', [])).
But then, when the new table is saved as an orca table,
orca.add_table(agents.name, new)
, all the columns specified in theto_frame()
are passed as local_columns which is a change that the model should not do. So I propose that when registering the new data frame as an orca table, we pass the local_columns as well, like this:orca.add_table(agents.name, new[agents.local_columns])
The text was updated successfully, but these errors were encountered: