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

ranking interventions first pass and better simulation output naming #5969

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

shawnyama
Copy link
Contributor

@shawnyama shawnyama commented Jan 7, 2025

Description

  • modelConfigurationId and interventionPolicyId are stored in the metadata.simulationAttributes of datasets resulting from simulations (we will need access to these assets when we rank interventions)
  • Selecting model config and variable can be done in the criteria of interest cards
  • Named the dataset outputs based on the intervention policy name based on these instructions

@shawnyama shawnyama linked an issue Jan 7, 2025 that may be closed by this pull request
@@ -345,7 +345,9 @@ public ResponseEntity<Dataset> createFromSimulationResult(
@PathVariable("id") final UUID id,
@PathVariable("project-id") final UUID projectId,
@RequestParam("dataset-name") final String datasetName,
@RequestParam("add-to-project") final Boolean addToProject
@RequestParam("add-to-project") final Boolean addToProject,
@RequestParam("model-configuration-id") final Optional<UUID> modelConfigurationId,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think Optional is right here, you can just use UUID. If you want to make these params optional it would be done like:

	@RequestParam(
			value = "model-configuration-id",
			required = false
		) final String modelConfigurationId,

@@ -93,6 +93,8 @@ public Dataset createDatasetFromSimulation(
final String datasetName,
final UUID projectId,
final boolean addToProject,
final Optional<UUID> modelConfigurationId,
final Optional<UUID> interventionPolicyId,
Copy link
Member

@mwdchang mwdchang Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to Derek's comment, you don't really need Optionals, just

		final UUID modelConfigurationId,
		final UUID interventionPolicyId,

you can pass in nulls, Optionals are typically when you programmatically fetch something and you are not sure if you will have a result or not.

Also I think there is already an object-mapper instance in the class you can use, don't need to create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: provide good default names for simulation output datasets
4 participants