Skip to content
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

conflate_model and gpkg_from_ras should take model_name parameter rather than inferring it #186

Open
ar-siddiqui opened this issue Sep 17, 2024 · 4 comments · May be fixed by #313
Open

Comments

@ar-siddiqui
Copy link
Collaborator

When submitting jobs for these processes, there is no way to provide a model_name. It is inferred from the parent folder name. This is wrong because model_name could be different. For example if model_stac_id is 'ROCKY_BRANCH' and the model_name is 'ROCKY BRANCH' then the following will fail as the GPKG name will be 'ROCKY BRANCH.gpkg'.

{
    "source_model_directory": "Z:\\collections\\ble_12040103_EastForkSanJacinto\\source_models\\ROCKY_BRANCH",
    "source_network": {
        "file_name": "Z:\\reference_data\\nwm_flowlines_with_bbox.parquet",
        "version": "2.1",
        "type": "nwm_hydrofabric"
    }
}
{
    "jobID": "0b81956a-c9ff-4b57-ab14-2e52bec5ae31",
    "processID": "conflate_model",
    "result": {
        "err": "Z:\\collections\\ble_12040103_EastForkSanJacinto\\source_models\\ROCKY_BRANCH\\ROCKY_BRANCH.gpkg: No such file or directory",
        "val": null
    },
    "status": "failed",
    "submitter": "",
    "type": "process",
    "updated": "2024-09-17 20:28:56"
}
@slawler
Copy link
Member

slawler commented Jan 21, 2025

Let's adjsut the payload above to include a model_name parameter (for now) we can discuss prefernces as they come along:

{
    "source_model_directory": "Z:\\collections\\ble_12040103_EastForkSanJacinto\\ROCKY_BRANCH",
    "model_name": "ROCKY_BRANCH",
    "source_network": {
        "file_name": "Z:\\reference_data\\nwm_flowlines_with_bbox.parquet",
        "version": "2.1",
        "type": "nwm_hydrofabric"
    }
}

Inference will be updated to use:

f"{source_model_directory} \ {model_name}.prj" 

@mdeshotel
Copy link
Collaborator

When calling ras_to_gpkg we don't yet know what the model_name is. We find the model name by first grabbing all .prj files then assessing if prj file is the RAS project file.

For conflate model, the model_name has been added as a required arg. Note that it is the path to the source model geopackage that we infer with the souce_model_directory and model_name; i.e., not the .prj file.

@ar-siddiqui
Copy link
Collaborator Author

When calling ras_to_gpkg we don't yet know what the model_name is. We find the model name by first grabbing all .prj files then assessing if prj file is the RAS project file.

For conflate model, the model_name has been added as a required arg. Note that it is the path to the source model geopackage that we infer with the souce_model_directory and model_name; i.e., not the .prj file.

@mdeshotel I didn't understand the last sentence, can you describe it with an example of API/Schema changes before and after?

@mdeshotel
Copy link
Collaborator

When calling ras_to_gpkg we don't yet know what the model_name is. We find the model name by first grabbing all .prj files then assessing if prj file is the RAS project file.
For conflate model, the model_name has been added as a required arg. Note that it is the path to the source model geopackage that we infer with the souce_model_directory and model_name; i.e., not the .prj file.

@mdeshotel I didn't understand the last sentence, can you describe it with an example of API/Schema changes before and after?

Seth's comment above was saying we infer the .prj file.

f"{source_model_directory} \ {model_name}.prj" 

My comment was just pointing out that we don't infer the .prj file we actually only infer the .gpkg file.

f"{source_model_directory} \ {model_name}.gpkg" 

This was referenced Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants