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
When e.g. sim2sumo is being ran as a CLI directly in the /scratch/ structure, fmu-dataio will no longer detect that we are running in an FMU environment. Hence it will produce incomplete (and invalid) metadata.
This means: sim2sumo can no longer be used as a direct CLI.
Confirmation and recreation:
In an existing FMU case on /scratch;
(mypath is equivalent to: /scratch/asset/user/case/realization-0/iter-0/)
mypath $ sim2sumo execute --config_path fmuconfig/output/global_variables.yml
> Sumo uploader: 1 OK, 3 failed, 4 total
On inspection, the entire fmu block is missing from the metadata. This is expected behavior when fmu-dataio fails to detect that we are in an FMU run.
Unclear if this should be fixed, i.e. is it a requirement for sim2sumo to run as a CLI (other than for development purposes)? We generally do not want users to (manually) upload data to Sumo, as a separate process from actually running FMU.
For development purposes, it may be necessary to run sim2sumo outside the ERT context.
Some options include:
Emulating the ERT context by explicitly setting these environment variables directly in sim2sumo and invoke this behavior with an argument
Request that ERT dumps these environment variables to file on RUNPATH, and use that instead in fmu-dataio (or use it as fallback)
The text was updated successfully, but these errors were encountered:
Ref discussions in #42, one alternative way could be to provide a (separate) script in sim2sumo that sets up the environment. If running sim2sumo directly as a CLI, this would have to be invoked up front.
Ref discussion started in #40
From version
2.1.0
,fmu-dataio
will read environment variables set by ERT rather than parse the file path to get necessary and required information about the FMU context.When e.g.
sim2sumo
is being ran as a CLI directly in the/scratch/
structure,fmu-dataio
will no longer detect that we are running in an FMU environment. Hence it will produce incomplete (and invalid) metadata.This means:
sim2sumo
can no longer be used as a direct CLI.Confirmation and recreation:
In an existing FMU case on /scratch;
On inspection, the entire
fmu
block is missing from the metadata. This is expected behavior whenfmu-dataio
fails to detect that we are in an FMU run.https://github.com/equinor/fmu-dataio/blob/a24774ba4f76868cd1e21de2f444b091cacf8c84/src/fmu/dataio/_fmu_provider.py#L115
When explicitly setting the following environment variables:
...result is 4 files OK.
Unclear if this should be fixed, i.e. is it a requirement for
sim2sumo
to run as a CLI (other than for development purposes)? We generally do not want users to (manually) upload data to Sumo, as a separate process from actually running FMU.For development purposes, it may be necessary to run
sim2sumo
outside the ERT context.Some options include:
sim2sumo
and invoke this behavior with an argumentfmu-dataio
(or use it as fallback)The text was updated successfully, but these errors were encountered: