-
Notifications
You must be signed in to change notification settings - Fork 12
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
path_prefix
does not persist through search.json
#918
Comments
I've added a fix but I think the specific exception |
I tested this with the following example code:
However, the two printed
I am not sure if this is related to this issue or something else, but it would be good to understand why this occured. |
When paths is serialised then reloaded the model attribute is dropped so when the identifier is regenerated it gives a different value. I guess we could serialise the identifier to ensure it remains the same? |
Oh actually that does happen. The issue is that Search does not retain Paths when serialised because of the use of kwargs |
I just did a test on the script above on those two branches but still get different unique ids at the end:
|
Ah ok so whenever search or model get set this removes the existing identifier so that it must be generated. I guess this is for safety so we don't accidentally generate output under the wrong directory. I think the model never gets attached back to the paths object giving a different output path when the identifier is regenerated. How important is this issue? I could remove the mechanism that clears the identifier? |
Its unlikely to come up, but when it does pretty toxic, so probably quite important. |
Cool I've thought of a fairly simple fix |
The issue is now resolved |
The following script:
https://github.com/Jammy2211/autofit_workspace_test/blob/main/scripts/database/directory/general.py
Raises the following error:
This is because I added an assertion checking that the
path_prefix
of the search is loaded correct:assert path.join("database", "directory", unique_tag) in search.paths.output_path
The problem it is not, which can be seen in the
search.json
file:The text was updated successfully, but these errors were encountered: