Commands
- floatcsep.commands.main.floatcsep()[source]
Entry point for the floatCSEP command-line interface (CLI).
This function parses command-line arguments and executes the appropriate function (run, stage, plot, or reproduce) based on the user’s input. It also supports logging and debugging options
Example usage from a terminal:
floatcsep run <config>
- Parameters:
None (arguments are parsed via the command-line interface)
- Returns:
None
- Return type:
None
- floatcsep.commands.main.plot(config, **kwargs)[source]
Generates plots for an already executed experiment. It will not create any forecasts nor run any evaluation.
This function loads the experiment configuration, stages the models to identify the required time-windows and results to be plotted.
Example usage from a terminal:
floatcsep plot <config>
- Parameters:
config (str) – Path to the experiment configuration file (YAML format).
**kwargs – Additional configuration parameters to pass to the experiment.
- Returns:
None
- Return type:
None
- floatcsep.commands.main.reproduce(config, **kwargs)[source]
Reproduces the results of a previously run experiment.
This function re-runs an experiment based on its original configuration and compares the new results with the original run. It generates a reproducibility report by comparing the two sets of results.
Example usage from a terminal:
floatcsep reproduce <config>
- Parameters:
config (str) – Path to the experiment configuration file (YAML format).
**kwargs – Additional configuration parameters to pass to the experiment.
- Returns:
None
- Return type:
None
- floatcsep.commands.main.run(config, **kwargs)[source]
Core routine of the floatCSEP workflow. It runs the experiment using the specified YAML configuration file. The main steps are:
An Experiment is initialized from the configuration parameters, setting the time window, region, testing catalogs, models and evaluations.
Stages the models by accessing the model’s forecast files or source code, or by detecting them in the filesystem. If necessary, the computational environment is built for each model.
According to the experiment and model characteristics (e.g., time-dependent, time-windows, evaluations) a set of tasks is created to create/load the forecasts, filter testing catalogs, and evaluate each forecasts with its corresponding test catalog.
The tasks are executed according to the experiment logic. Soon to be parallelized.
Postprocessing, such as plotting the catalogs, forecasts, results and user-based functions is carried out, as well as creating a human-readable report.
Makes the experiment reproducible, by creating a new configuration file that can be run in the future and then compared to old results.
Example usage from a terminal:
floatcsep run <config>
- Parameters:
config (str) – Path to the experiment configuration file (YAML format).
**kwargs – Additional configuration parameters to pass to the experiment.
- Returns:
None
- Return type:
None
- floatcsep.commands.main.stage(config, **_)[source]
This function is a preliminary step that stages the models before the experiment is run. It is helpful to deal with models that generate forecasts from a source code. Staging means to get a source code from a web repository (e.g., zenodo, github) or locate the model in the filesystem. It will build the computational environment, install each model dependencies and build the source codes.
Example usage from a terminal:
floatcsep stage <config>
- Parameters:
config (str) – Path to the experiment configuration file (YAML format).
**_ – Additional keyword arguments are not used.
- Returns:
None
- Return type:
None
- floatcsep.commands.main.view(config, **kwargs)[source]
Launch an interactive Panel-based data viewer for an existing experiment.
This function loads the experiment configuration, reconstructs the model and evaluation file tree, and starts a Panel server so that the user can explore the catalogs, forecasts, and test results in a web browser.
Example usage from a terminal:
floatcsep view <config>
- Parameters:
config (str) – Path to the experiment configuration file (YAML format).
**kwargs – Additional configuration parameters forwarded to Experiment.from_yml.
- Return type:
None