Changelog#
All notable changes of this project will be documented here.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Version 6.3.0 (2025-10-14)#
Added#
The drivers have an new setting named
progress_bar_data_namefor overloading the information displayed at each iteration of the progress bar in the case of anOptimizationProblem; this is the name of aBaseProgressBarDataclass. By default, only the objective value and feasibility are displayed when the optionlog_problemisTrue(default). #349The
gemseo.configurationvariable can be used to configure GEMSEO instead of usinggemseo.configure.The
gemseo.configuration.loggingvariable can be used to configure logging for GEMSEO and its plugins instead of usinggemseo.configure_logger.The global configuration settings can be specified via environment variables of the form
GEMSEO_{OPTION_NAME}andGEMSEO_LOGGING_{OPTION_NAME}, and can also be defined in a file named.env.Configuring GEMSEO is documented in the user guide. #1474
The progress bar used by
OptimizationProblemandMDOScenarioobjects can log whether an iteration is feasible. #1574DOE algorithms have a new option, called
preprocessors, to perform preprocessing before each sample generation. #1601BaseScenario.post_processcan handle output values stored in the database by listeners.EvaluationProblem.add_listener,Database.add_new_iter_listenerandDatabase.add_store_listenerhave a new argument, calledoutput_names, to declare the names of the output variables whose values are stored in the database by the associated listener.Database.listener_output_nameslists the names of the output variables whose values are stored in the database by listeners. #1606FCERegressorcan create functional chaos expansion (FCE) models from linear model fitting algorithms.FCERegressor_Settingsis the class for defining the settings of aFCERegressor, including the choice of the orthonormal function basis (polynomial (default), Fourier or Haar) and the ability to learn Jacobian data (gradient-enhanced FCE).gemseo.mlearning.linear_model_fittingis a sub-package containg linear model fitting algorithms.BaseLinearModelFitteris the base class for interfacing linear model fitting algorithms, with a methodfit(input_data, output_data) -> coefficientsBaseLinearModelFitter_Settingsis the base class for defining the settings of aBaseLinearModelFitter.BaseSKLearnLinearModelFitteris the base class for interfacing linear model fitting algorithms from scikit-learn.BaseSKLearnLinearModelFitter_Settingsis the base class for defining the settings of aBaseSKLearnLinearModelFitter_Settings.Classes interfacing linear model fitting algorithms from scikit-learn:
LinearRegression,ElasticNet,Lasso,Ridge,LARS, andOrthogonalMatchingPursuit, these classes are equiped with settings classes of the formAlgoName_Settings.Classes interfacing linear model fitting algorithms with build-in cross-validation from scikit-learn:
LinearRegressionCV,ElasticNetCV,LassoCV,RidgeCV,LARSCV, andOrthogonalMatchingPursuitCV, these classes are equiped with settings classes of the formAlgoName_Settings.SPGL1is the class for defining an SPGL1 (Spectral Projected Gradient for L1 minimization) algorithm. #1610BaseFCERegressoris the base class for defining functional chaos expansion regressors.BaseFCERegressor_Settingsis the base class for defining the settings of aBaseFCERegressor. #1611An example about batch sampling in the gallery of examples related to design of experiments (DOE). #1613
OptAsMDOScenariosupports vectorial design variables. #1635save_show_figureandsave_show_figure_from_file_path_managerhave a new argument, namedclose(default:None), for closing the matplotlib figures.show_close_figuresis a helper function to show and close matplotlib figures. #1639
Fixed#
The
BaseSettingsclass validates the default field values. #1608The output values of an iteration are all stored in the database before the termination criteria are examined. #1617
The progress bar is logged, whether the calculations are performed in parallel or not, using the database or not. #1618
The inner MDA settings model is now properly used to determine which inner MDA class to instantiate. #1620
Sellar2no longer crashes wheny_1is a collection of samples. #1621GlobalConfiguration now allows extra fields in .env files, preventing validation errors when third-party applications have their own environment variables. #1632
OptAsMDOScenariosupports more than 2 strongly coupled disciplines by default. #1634The
time_limitsetting of theScipy_MILPalgorithm is now properly passed toscipy.optimize.milp. Themaxiterandtolsettings of the SciPy linear programming library is now properly passed toscipy.optimize.linprog. #1636matplotlib-based post-processors no longer raise a
TclErrorwhen showing more than one figure. #1639
Changed#
Logging is now enabled by default; use the following to disable it:
from gemseo import configuration; configuration.logging.enable = False.The default value of the
loggerargument ofLoggingContextis the GEMSEO logger.The module
gemseo.utils.logging_toolshas been renamedgemseo.utils.logging; the former is deprecated. #1474BaseFormulationhas a new argument, calledminimize_objective, to indicate whether the optimisation problem is a minimisation problem (default) or maximisation problem. This does not change theBaseScenarioAPI, which still has itsmaximize_objectiveargument (default:False). #1607The gallery of examples about design of experiments (DOE) has been divided into generic features and algorithms. #1614
The following functions now include the argument
delimiterwhich allows users to choose the delimiter character for CSV files:write_design_space,read_design_space,DesignSpace.from_file,DesignSpace.to_file,DesignSpace.from_csvandDesignSpace.to_csv.The
**optionsargument inDesignSpace.from_filehas been deprecated.The
**table_optionsargument inDesignSpace.to_csvhas been deprecated.The
header_charargument inDesignSpace.to_csvhas been deprecated. #1627
Version 6.2.0 (2025-08-06)#
Added#
The argument
validity_domainofBaseMLSupervisedAlgois the hypercube defined by the lower and upper bounds of the input variables computed from the training dataset. TheSurrogateDisciplinelogs a warning message when its execution or linearization is done at an input point outside the domain of validity of the surrogate. #363The argument
n_componentsofPCAcan be either the number of components, the minimum amount of variance to be explained by the components, the constant"mle"to guess this number orNoneto define it asmin(n_samples, n_features). #521DOE algorithms have a new option, called
"vectorize", to sample the functions in a vectorized way. #1118Data converters for custom discipline variable types are now easier to set thanks to the
set_data_converterfunction. #1359The probability distributions can be instantiated from Pydantic models, e.g.
OTNormalDistribution(settings=OTNormalDistribution_Settings(mu=0.2, sigma=1.4)). The argumentdistributionofParameterSpace.add_random_variablecan be a Pydantic model defining the settings of the distribution. The argumentdistributionofParameterSpace.add_random_vectorcan be a collection of Pydantic models defining the settings of the marginal distributions. #1432The argument
timeout_with_processcan be used to choose how theRetryDisciplinehandlestimeout. #1469Add the possibility to have iteration callbacks for MDAs, i.e. functions that are called at the end of each iteration. #1477
The
NameGeneratorhas a new naming:Naming.DATED_UUID. It helps the user to sort directories, while keeping the unicity of the names for multi-processes. The names now get the date (format: YYYY-MM-DD), the hour and the UUID. For instance, a new generated name: 2025-07-28_15h53min02s_UUID. #1483OTParametricStatistics(formerlyParametricStatistics) andSPParametricStatisticsallow to estimate statistics parametrically, using data-fitted probability distributions from OpenTURNS and SciPy respectively. #1484The arguments
output_namesandinput_namesofTaylorDisciplinedefine the output variables of the wrapped discipline to expand as Taylor polynomials and the input variables of these polynomials. If empty, use all the input and output variables of the discipline. #1490The default output values of the
TaylorDisciplinecorrespond to the first term of the Taylor polynomial; they can be accessed usingtaylor_discipline.io.output_grammar.defaults. #1491Added a
ParameterSpaceFactoryto createParameterSpaceobjects. #1492The method
BaseRegressor.predict_hessianallows to compute the Hessian of a regressor. This feature is implemented only in the case ofOTGaussianProcessRegressor. #1499Post processors can now take an
OptimizationDatasetas an argument instead of anOptimizationProblem. #1500BaseFormulation.get_top_level_disciplineshas a new argumentinclude_sub_formulations(default:False) to include the top level disciplines of the sub-formulations. #1507Documentation (home page): a button to subscribe to the RSS feeds of GEMSEO and its plugins. #1508
All post-processors are based on the
OptimizationDatasetclass, and can be initiated with it by passing the attributemisc['optimization_metadata']using theOptimizationMetadataclass. The post-processorGradientSensitivitystill requires theOptimizationProblemclass if the optioncompute_missing_gradientis set to true. #1513Documentation (optimization algorithms): a button to display all the optimization algorithms instead of filtering them. #1527
Added a
DesignSpaceFactoryto createDesignSpaceobjects. #1529The entering and exiting timestamps of a
Timercontext are now accessible. #1534The boolean option
include_weak_coupling_targetsofIDF_SettingsmakesIDFinclude both the strong couplings and the weak couplings in the optimization problem, in the form of optimization variables supplemented by consistency constraints (default). Otherwise, this MDO formulation includes the strong couplings only. #1548The function
update_default_input_valuesmakes it easy to update the default values of certain inputs of several disciplines. #1555generate_coupling_graphhas an optionclean_upto remove the DOT source file (default:True). #1556BiLevelhas a new optionset_x0_before_optto warm start the sub-optimizations from the input data of the top-level disciplines. #1564The function
configurehas a new option, namedenable_parallel_execution(default:True), to let use parallelism (multi-processing or multi-threading) by default. #1565The
seedoption ofNLOPT_COBYLAenables to change the seed used bynloptfor pseudo-randomizing the simplex steps in the COBYLA algorithm. #1582Add support to NumPy version 2 and NLopt version 2.9. #1584
OTGaussianProcessRegressorandGaussianProcessRegressorhave a new methodpredict_covarianceto predict the output covariance matrix. #1585BaseScenario,BaseFormulationandOptimizationProblemhave an attributeConstraintTypeenumerating the constraint types, namely"eq"and"ineq". #1599BiLevelstores the optimal values of the local design variables in the database. #1600The description of the bi-level BCD formulation has been added to the documentation, in the user guide section. The description of the standard IRT bi-level, in the user guide, has been updated. #1883
Fixed#
An end user cannot set a constraint name that is already taken by another problem function (objective, observable, constraint). #1271
AutoPyDisciplinedid not support subscripted type annotations, e.g.RealArraydefined asNDArray[floating[Any]], when parsing the function signature. #1292The field
linear_solver_settingsofBaseMDASettingscan be a Pydantic model of typeBaseLinearSolverSettings, e.g.LGMRES_Settings. #1402The handling of the Windows path separator
";"in the environment variableGEMSEO_PATH. #1444A missing integer value in the database is no longer an issue for exporting data as a dataset. #1452
The
timeouthandling is now faster when using a thread instead of a process. #1469A Discipline executed remotely now correctly reports all errors happening remotely. #1515
Fixed an issue with the
aggregatefunction that caused it to generate the same names for different groups of constraints when the argumentgroupswas used. #1518Documentation (optimization algorithms): the import paths for Pydantic settings models have been corrected. #1521
Documentation (optimization algorithms): unchecking "require gradient evaluations" lists the gradient-free optimization algorithms. #1527
The
HDF5Cache,MemoryFullCache, andSimpleCachenow handle properly input and output data that includesstrorarray([str]). In the past, some of these caches would crash while others would run but miss hits for existing entries. #1536infvalues are now converted tonullduring the JSON serialization of algorithm settings, addressing a limitation of the JSON standard which does not support infinity values. #1540Fixed an issue with the
Correlationspost-processor that caused it to ignore entries of the design vector across all iterations, thus producing an incorrect plot. #1542Fixed an issue with the
Database.get_history_arraymethod that caused it to return incomplete design vectors when the argumentwith_x_vectwas set toTrue. #1546create_disciplineandDisciplineFactory.createaccept positional arguments, which makes it possible to create disciplines with positional arguments according to their signatures, e.g.create_discipline("AnalyticDiscipline", {"y": "2*x"}). #1557Fixed an issue that prevented the export a
Databasewithstrorarray([str])variables to an HDF5 file. #1559Fixed an issue that prevented the evaluation of an observable with
strorarray([str])outputs. #1561CorrelationAnalysis,HSICAnalysis,MorrisAnalysisandSobolAnalysissupport constant output components. In this case,analysis.indices.method_name[output_name][component]isNone. #1566JobSchedulerDisciplineWrapperdid not support namespaces. #1572Fixed the update of convergence metrics for MDA quasi-Newton supporting callbacks #1579
Fixed an issue with the
JobSchedulerDisciplineWrapperthat did not handle cases where the Jacobian is computed in the _run method.JobSchedulerDisciplineWrappernow handles namespaces in execute() and linearize(). #1587MDOScenariocan compute the derivatives of a disciplinary output when no design variable is an input of this discipline. #1602Fixed an issue that caused
BaseDisciplineto crash at instantiation whenBaseDiscipline.default_cache_typewas set toBaseDiscipline.CacheType.HDF5. #1605
Changed#
In order to improve the performance of disciplines, the execution status and statistics of disciplines, as well as the statistics of problem functions are now disabled by default. Use
configure()to enable them. Various internal changes have also been made in order to improve performance. #1384The subpackage
gemseo.utils.xdsmbrings together the modules linked to the XDSM concept. #1262For grammars of type
JSONGrammar, a grammar item defined only with the typendarrayand no type for the array elements will now consider that the elements are of typenumber, i.e.floatorcomplex. This convention was implicit, it is now made explicit. #1359The field
main_mda_nameofMDF_Settingsis ignored when the fieldmain_mda_settingsis a Pydantic model. The fieldinner_mda_nameofMDAChain_Settingsis ignored when the fieldinner_mda_settingsis a Pydantic model. The fieldlinear_solverofBaseMDASettings, e.g.MDAJacobi_Settings, is ignored when the fieldlinear_solver_settingsis a Pydantic model. The fieldnewton_linear_solver_nameofBaseMDASettings, e.g.MDANewtonRaphson_Settings, is ignored when the fieldnewton_linear_solver_settingsis a Pydantic model. #1402In the module
opt_as_mdo_scenario, the argumentscoupling_equationsandlink_discipline_classof the functioncreate_disciplinesare now optional; by default, the coupling equations and the link discipline are linear. #1514API CHANGE: The output
final_timeofODEDisciplineis now a float instead of a NumPy array. The wrapperScipyODEAlgosfor the solution of ODEs by Scipy casts the argumenttermination_timeofODEResultas a float. #1523It is now possible to provide input/output data converters to the
HDF5Cacheat instantiation. These converters are optional and only necessary when input/output data cannot be casted directly to a NumPy array. #1536The methods
OptimizationProblem.to_datasetandDatabase.to_datasetwill group functions accordingly to their optimization role with the argumentsgroup_functionsfor theOptimizationProblemclass andgroup_variablesfor theDatabaseclass. #1537The log of the
OptimizationProblemdistinguishes between equality and inequality constraints. The log of theOptimizationProblemwrites equality constraints asc(x) = 0, for consistency with mathematical writing. #1541The method
Database.get_history_arraynow raises an exception when the number of names passed with the argumentinput_namesdoes not match the dimension of the design vector. #1546The SOM post processor now is based on the external library
minisom. Therefore, the third party modulegemseo.third_party.sompyhas been removed. #1547The
IDFformulation now names consistency constraints with the format"consistency_{variable_name}". This makes the constraints created by the formulation easily identifiable. It also reduces the possibility of naming conflicts with existing problem functions (objective, constraints, observables). #1581
Removed#
Version 6.1.0 (2025-03-17)#
Added#
The Gantt chart created by the
create_gantt_chartfunction displays the time unit and the legend for the blue and red areas. #216The
BiLevelformulation and its derived classes now include settings for the scenario adapters used to run the sub-scenarios. These settings are:keep_opt_history: To control whether the databases of the sub-scenarios are be kept in memory after each execution.save_opt_history: To control whether the databases of the sub-scenarios are saved to the disk after each execution. The database files use theScenario.nameattribute of each sub-scenario to prefix the name of the files. Use this setting if the sub-scenarios are running in parallel.naming: To select the id to append to the prefix of each database file whensave_opt_history=True. SeeNameGenerator.Namingfor more details.
In
LinearCombination, the inputs are averaged wheninput_coefficientsis empty and the new argumentaverageisTrue(default:False). #924New discipline RetryDiscipline: it wraps a discipline to retry the execution several times. It tries to execute the discipline, if it raises an exception then it retries up to a maximum number of attempts. It can pass a tuple of exceptions that, if one of them raised, do not retry the execution. #927
The normalization of integer design variables can be switched on and off thanks to the property
DesignSpace.normalize_integer_variables. #1000The
VariableRenamerclass can be used to create translators, which are translation dictionaries of the form{discipline_name: {variable_name: new_variable_name}}from tuples, dictionaries, CSV files and spreadsheets. These dictionaries can then be used to create aRemappingDisciplineor aNameMappingdata processor. #1005Jacobian can be approximated hybridly by defining certain elements of the Jacobian within the discipline and then calling the
linearizemethod and passing one of the hybrid Approximation modes:HYBRID_FINITE_DIFFERENCES,HYBRID_CENTERED_DIFFERENCES,HYBRID_COMPLEX_STEP#1166The
compare_dict_of_arraysfunction now handlesNaNsvia thenan_are_equalargument. By default,nan_are_equal=Falsethat isNaN != NaNin the component-wise comparison. #1167PCERegressor.predict_jacobian_against_substitutecan predict the Jacobian with respect to inputs substitute at a given input point when the learning dataset includes gradient information; similar attributes are available for the Jacobian of the mean, standard deviation and variance. #1285Documentation and examples about the classes
ODEDisciplineandODEProblem. #1302The
SequenceTransformerclass now has aset_boundsmethod which allows to set lower and/or upper bounds for the computed transformed iterates. When components of the iterates fall outside of the bounds, they are projected onto the appropriate bound. The bounds must be provided has NumPy arrays with same size as the iterates. TheBaseMDASolver,MDAChainandMDASequentialclasses now have aset_boundsmethod which allows to set lower and/or upper bound for each resolved variables (coupling or state). The bounds must be provided as a mapping from variable names to tuple of the form(lower_bound, upper_bound), wherelower_boundand/orupper_boundmust be NumPy arrays with the same size as the resolved variable. #1358So far, the methods
BaseScenario.to_dataset,EvaluationProblem.to_datasetandDatabase.to_datasetexport theDatabaseto aDataset. Now, they also store at the key"input_space"of the dictionaryDataset.miscthe input space (of typeDesignSpace) used to generate the data. #1373The mNBI example on the Binh-Korn problem now illustrates the user defined refinement of the Pareto front. #1379
The DOE algorithms have a new option, named
"eval_func"(default:True), to sample the functions computing output data. By deactivating it, only functions calculating Jacobian data are sampled ifeval_jacisTrue(default:False). #1380MDA now has a new setting
max_consecutive_unsuccessful_iterationsand corresponding stopping criteria that allows to break the MDA loop when a given number of consecutive unsuccessful iterations is reached. An iteration is unsuccessful if the normalized residual norm has increased. The default value is 8. #1381EmpiricalToleranceIntervalallows to estimate tolerance intervals from samples without any distribution assumption.EmpiricalStatistics.compute_tolerance_interval,EmpiricalStatistics.compute_a_valueandEmpiricalStatistics.compute_b_valueare now implemented. #1382The
OptAsMDOScenariocan make a mono-disciplinary optimization problem multi-disciplinary. #1399The function
rename_discipline_variablescan be used to rename some discipline variables. #1422The grammars have a new dictionary-like attribute, called
descriptions, to set the descriptions of the elements. #1424MDOScenariosupports DOE algorithms, making it possible to use a DOE and an optimizer with the same scenario. #1436Add an example to create multi-point processes using namespaces. #1448
The
get_discipline_variable_propertiesfunction returns the properties of the input and output discipline variables, such as the original name, the current name, and the current name without namespace.The module
gemseo.disciplines.utilshas been merged intogemseo.utils.discipline. #1458Added a
protocolargument to theto_picklefunction and to thedeserialize_and_runcommand line for specifying the pickling protocol. #1467The
MDOScenarioAdapternow includes the argumentsave_opt_history(default:False) to save the optimization history of each run to the disk. This setting is also accessible via the attribute of the same name. #1470BaseDistributionFitteris the base class to fit a probability distribution to data, from which theOTDistributionFitterclass using the OpenTURNS library is derived.SPDistributionFitteris the class to fit a probability distribution to data using the SciPy library; the fitting criteria are the following statistical significance tests: Anderson-Darling, Cramer-von Mises, Filliben and Kolmogorov-Smirnov. #1471The class
NameGeneratorgenerates unique names based on the givenNameGenerator.Namingthrough thegenerate_name()method. #1472The wing weight problem has been added to benchmark and illustrate UQ algorithms; see
gemseo.problems.uncertainty.wing_weight. #1473"BiLevelBCD" is a formulation derived from "BiLevel" that uses the Block Coordinate Descent algorithm to solve the lower-optimization problem. #1538
The function
get_class_namereturns the name of a class whose settings are defined from a Pydantic model.The SVG version of a full coupling graph displays the original and current names of the coupling variables when hovered over.
Fixed#
The
save_data_arrays_to_xmlfunction of theggobi_exportmodule no longer inverts input names when the tags have a return to line. #649BaseScenario.to_datasetcan export theDatabaseto aDatasetin presence of homonymous inputs and outputs. #1352Missing information for handling UML diagrams when building the documentation. #1360
Normalizing a vector, relative to a design space of integer variables, using an integer NumPy array as value of the
outargument ofDesignSpace.normalize_vectno longer crashes. #1362Discipline.check_jacobiannow correctly uses theinput_dataargument for the approximate Jacobian when provided. #1369The return value of
DesignSpace.get_current_valuewhen accessing an integer design variable has now integer data type.A self-explanatory exception is raised when trying to access the current value of a design variable that has none. #1370
PCERegressor.learnworks properly when its argumentsamplesis not empty and the learning dataset includes gradient information. #1374The
log_convergenceattribute ofMDASequentialis cascaded to the sub-MDAs. #1375TaylorDisciplineuses the same order of input variables as the original discipline. #1377The attributes
input_namesandoutput_namesofAutoPyDiscipline, which were supposed to be non-modifiable, are now read-only and will be removed in the next major release.The attributes
py_funcandpy_jacofAutoPyDiscipline, which were supposed to be non-modifiable, are now read-only.The attribute
sizesappearing in the documentation ofAutoPyDisciplinehas been removed as it was not used (not even initialized).AutoPyDisciplineno longer logs a warning message whenpy_funchas no type hints, neither for arguments nor return variables. #1386Data processors are now compatible with namespaces and
NameMapping.NameMappingis now compatible with the new way of implementing theDiscipline._runmethod since GEMSEO 6, i.e. using input data passed as a dictionary and returning output data as a dictionary. #1406The methods
plot_boxplot,plot_cdfandplot_pdfofEmpiricalStatisticssave one figure per variable, instead of the figure for the last variable only. Forplot_foo, the file name for the variable called"bar"is"foo_bar". #1413A broken example, relying on an older implementation of
ODEDisciplineand no longer functional, has been removed from the documentation. #1426ODEDisciplineis insensitive to the order of state variable names passed to the argumentstate_names. #1427HSICAnalysis.sort_input_variablesnow correctly returns the input parameters sorted by order of influence. #1429The
BiLevelandBiLevelBCDformulations no longer include a system-level variable in the warm-starting mechanism even if the variable is an output of the MDA1, the MDA2, or the sub-scenarios. #1434TaylorDisciplineis now deterministic (independent of the Python hash seed). #1437The
copymethod of a grammar was partly returning a shallow copy which did not have a consistent state. It now returns a deep copy. #1438The method
OptimizationResult.from_optimization_problem()properly returns anOptimizationResultobject when giving anOptimizationProblemas an argument. #1450A
SimpleGrammarbuilt from aJSONGrammar, which validates float data, validates in turn float data. #1455The
BaseSensitivityAnalysisnow uses the same order for I/O names when it is instantiated from a dataset. #1459The
MDOScenarioAdapternow includes the argumentnamingwhich allows to decide whether to use integers or uuid's for database names when exporting them to the disk. The"UUID"strategy is the only multiprocessing-safe option and it shall always be used when running the adapter inside a parallel execution context. Before this change, different sub-processes would overwrite the database files and the data from some runs would be lost. #1472The documentation has been updated to inform the end-user not to use
namespaces_separator(default:":") in discipline variable names, as GEMSEO uses this special character to separate the original names from the namespace associated with these variables. The end-user must never add the namespaces by hand but always use the dedicated methods such asDiscipline.add_namespace_to_input,Discipline.add_namespace_to_outputandBaseGrammar.add_namespace. #1476The method
SobolAnalysis.unscale_indicessupports negative estimates of Sobol' indices. #1488The
DesignSpace.__eq__operator is now symmetrical. #1696Warnings issued from some pydantic models.
PolynomialRegressor_Settings: the default value ofdegreeis a positive integer.The minimum required versions of the dependencies of the GEMSEO packages were not up to date.
Changed#
BREAKING CHANGES:
It is no longer necessary to set the option
keep_opt_historytoTrueto save the optimization database to the disk after each execution of theMDOScenarioAdapter. If you wish to save the optimization database to the disk, use the optionsave_opt_historyinstead. Concerningkeep_opt_history, you may set it toFalseif you are not interested in accessing the databases in memory or toTrueotherwise. This setting will not affect the saving of the optimization database to the disk. Storing many databases in memory can lead to high memory consumption. From now on, the optionopt_history_file_prefixonly sets the prefix of the files to be saved and no longer controls whether the optimization databases are saved to the disk or not. You shall set the optionsave_opt_historytoTrueif you wish to save the optimization database to the disk. If it is not provided, the default prefix isMDOScenarioAdapter.DEFAULT_DATABASE_FILE_PREFIX. #1470NameMappingis no longer compatible with the way of implementing theDiscipline._runmethod before GEMSEO 6, i.e. getting input data from thelocal_dataand writing output data in thelocal_data. #1406
In
LinearCombination, the default value of theinput_sizeargument is1rather thanNone, which in practice does not change the definition of the discipline.In
LinearCombination, the default value of theinput_coefficientsargument is an empty dictionary rather thanNone, which in practice does not change the definition of the discipline. #924Integer design variables are no longer normalized by default. #1000
API change: In
gemseo.problems.mdo.scalable.data_driven.discipline, renameScalableDisciplineintoDataDrivenScalableDiscipline. #1092Added documentation about ODEDiscipline and ODEProblem. #1302
Changed input and output names of ODEDiscipline #1353
PCERegressoruses a probability space of typeParameterSpaceto define the input random variables. Now, this probability space can be passed to the argumentdataof typeIODataset, by means of its dictionary attributemisc, e.g.io_dataset.misc["input_space"] = probability_space. When theIODatasetis the result of sampling on theParameterSpace, using thesample_disciplinesfunction or theDOEScenariowith itsto_datasetmethod for example, thisParameterSpaceis automatically stored inio_dataset.misc["input_space"]. #1373The signature of the
MDAGSNewtonconstructor is now the same as all the other MDA classes. TheMDAGSNewton_Settingssettings model has two new fields, namelygauss_seidel_settingsandnewton_settings, to provide the settings of theMDAGaussSeidelandMDANewtonRaphsonrespectively. These settings can be provided either as key/value pairs or with the appropriate settings model. #1375The data processor
NameMappingcan be used to rename only certain input and output variables. #1407The
BiLevelandBiLevelBCDformulations now log a warning when a coupling variable is removed from the design space. #1434At the end of its execution, a scenario logs its time execution calculated from its
execution_statistics.duration, to be consistent with itsexecution_statistics. If theseexecution_statisticsare disabled, the time execution is not logged. #1445Updated the default protocol for the
to_picklefunction toHIGHEST_PROTOCOL. #1467The class
DirectoryCreatornow inherits fromNameGenerator. Its argumentdirectory_naming_methodwill be deprecated in the next major release of GEMSEO in favor ofnaming. The classDirectoryNamingMethodis now an alias forNameGenerator.Naming. It will be deprecated in the next major release of GEMSEO in favor ofNameGenerator.Naming. #1472The
BiLevelformulation has been refactored in order to simplify theBiLevelBCDintegration or any other formulation that may inherit from it. #1794ExecutionStatistics.record: now useExecutionStatistics.record_executionandExecutionStatistics.record_linearization.ExecutionStatistics.n_calls: now useExecutionStatistics.n_executions.ExecutionStatistics.n_calls_linearize: now useExecutionStatistics.n_linearizations.ExecutionStatus.run: now useExecutionStatistics.handle.ExecutionStatus.linearize: now useExecutionStatistics.handle.The integer type of a design variable is now
int64instead ofint32, this matches the type of pythonintand the default type of integer in NumPy 2 which we will support later.base_cache.DATA_COMPARATOR: now useBaseCache.compare_dict_of_arrays.PolynomialRegressor: specifying thedegreeis no longer mandatory; the default value is2.
Version 6.0.0 (2024-11-08)#
Added#
Optimization & DOE#
HessianHistoryis anOptPostProcessorto visualize the history of the diagonal of the Hessian matrix of the objective. #463The optimizer
MultiStartenables multi-start optimization, by combining an optimization algorithm and a DOE algorithm. #645EvaluationProblem, of whichOptimizationProblemis a subclass, allows to evaluateMDOFunctions over aDesignSpaceand store the evaluations in aDatabase. #678The drivers can now take the option
store_jacobian(default:True). When set toFalse, the Jacobian matrices are not saved in the database. This reduces the RAM requirements for large optimization problems. #1094The maximum dimension of a design space to be logged can be passed as the optional argument
max_design_space_dimension_to_logofBaseDriverLibrary.execute. Hence it can be passed to any DOE library or optimization library as the optionmax_design_space_dimension_to_log. #1163The
MNBImulti-objective algorithm can be used to refine a specific part of the Pareto front. #1171The
sample_disciplinesfunction allows to sample a system of disciplines based on an MDO formulation (default: MDF) and DOE settings (formerly ingemseo-mlearning). #1180ProblemFunctionis anMDOFunctionwrapping anotherMDOFunction. Itsfuncandjacmethods call the corresponding methods of the underlyingMDOFunctionafter pre-processing input value and before post-processing output value. Each function attached to anEvaluationProblemis replaced by aProblemFunctionwhen callingEvaluationProblem.preprocess_functions. Calls to the function can be counted via theenable_statisticsandn_callsattributes. #1222BaseToleranceTesteris a new base class to check whether a tolerance criterion is met, with specific subclasses:DesignToleranceTester,ObjectiveToleranceTesterandKKTConditionsTester. #1224All the figures generated by
OptHistoryViewhave a vertical red line representing the optimum iteration. #1236Add support of SciPy's version of the
COBYQAalgorithm. #1261SciPy's algorithms
L-BFGS-B,NELDER-MEAD,TNCandSLSQPsupport thestop_crit_n_xoption. #1265AlgorithmDescriptionand its derived classes now include the class attributeAlgorithmDescription.settingsto store algorithm-specific settings. This is useful specially for algorithm libraries that wrap different algorithms in a single class. The following linear solvers have been added toScipyLinalgAlgos:Conjugate Gradient (CG),
Conjugate Gradient Stabilized (CGS),
Generalized Conjugate Residual with Optimal Truncation (GCROT),
Transpose-Free Quasi-Minimum Residual (TFQMR).
The
ScipyLinproglibrary now handles integer variables. #1450
MDO processes#
The MDA settings can now be passed at instantiation as a Pydantic model as well as key/value pairs. The following properties has been added to
BaseMDASolver:acceleration_method,over_relaxation_factor.
The
JobSchedulerDisciplineWrapperand thedeserialize_and_runentry point implement_compute_jacobian. #1191RemappingDisciplineaccepts an empty name mapping, in which case no remapping is applied. #1197BackupSettingsis a dataclass to pass the backup settings to functions relying onBaseScenario.set_optimization_history_backup, e.g.sample_disciplinesandBaseSensitivityAnalysis.compute_samples. #1204The
differentiated_input_names_substituteargument ofBaseFormulation,BaseMDOFormulation,MDF,IDF,BiLevelandDisciplinaryOptdefines the names of the differentiated inputs; if empty, the formulation will consider all the inputs. It enables derivatives to be calculated with respect to discipline inputs that are not in the design space attached to the formulation. #1207ArrayBasedFunctionDisciplinewraps a function whose both the unique argument and the return value are NumPy arrays. #1219Add the GEMSEO Web study GUI to the documentation. #1232
XDSMizercan be applied to any discipline, and not just the scenarios. This is useful for seeing the dataflow and workflow of a multidisciplinary process, e.g.MDAJacobi.generate_xdsmcan generate the XDSM of any discipline. #1257The
IDFformulation now accepts options at instantiation for theMDAChainexecuted at the begining of the process whenstart_at_equilibrium=True. #1259BaseMDARoothas a new argumentexecute_before_linearizingto execute the disciplines before linearizing them. #1278
Surrogate models#
The package
gemseo.utils.metricsinclude metrics to compare two quantities:The base class is
BaseMetricand its factory isMetricFactory.BaseCompositeMetricis the base class for metrics relying on another metric.The
ElementWiseMetricis a composite metric to compare two collections using an underlying metric; it returns a collection.DatasetMetricis a composite metric to compare twoDatasets row-wisely using an underlying metric; it returns aDataset.The
MeanMetricis a composite metric to compare two collections using an underlying metric; it returns an array.The
SquaredErrorMetricis a composite metric returning the squared difference between two quantities.
The quality of an
MLRegressorAlgocan be assessed by plotting its cross-validation error. #1122MAEMeasureandMEMeasureare respectively the mean absolute error and the maximum error to assess the quality of aBaseRegressor(formerly ingemseo_mlearning).GradientBoostingRegressorwraps the scikit-learn's gradient boosting regressor (formerly ingemseo_mlearning).MLPRegressorwraps the scikit-learn's multilayer perceptron (MLP) (formerly ingemseo_mlearning).OTGaussianProcessRegressorwraps the OpenTURNS' Gaussian process (GP) regressor (formerly ingemseo_mlearning).SVMRegressorwraps the scikit-learn's support vector machine (SVM) regressor (formerly ingemseo_mlearning).TPSRegressoris a specificRBFRegressorfor thin plate spline regression (TPS) (formerly ingemseo_mlearning).RegressorChainis a composition ofBaseRegressorobjects trained sequentially, each one learning the relationship between the inputs and the error made by the previous one (formerly ingemseo_mlearning). #1128Quality assessment:
ClassifierQualityFactoryis a factory of objects to assess the quality of classification algorithms.ClustererQualityFactoryis a factory of objects to assess the quality of clustering algorithms.BaseClassifierQualityis the base class to assess the quality of classification algorithms.
OptimizationProblem.evaluation_counteris anEvaluationCounterto count the number of times a new iteration is stored inOptimizationProblem.database. #1135OTGaussianProcessRegressorhas a new methodcompute_samplesto generate samples from the conditioned Gaussian process. #1140Resampler.plotcan be used to visualize the train-test partitions. #1156
Sensitivity analysis#
SobolAnalysis.compute_indicescan estimate the Sobol' indices more precisely using control variates. #1185Use the optional argument
n_replicatesofSobolAnalysis.compute_indicesto set the number of replicates to estimate the confidence intervals by bootstrap. #1189BaseSensitivityAnalysisand its subclasses (MorrisAnalysis,SobolAnalysis,CorrelationAnalysisandHSICAnalysis) handles backup and crash management with thebackup_settingsargument of thecompute_samplesmethod.MorrisDOEis a DOE algorithm used byMorrisAnalysis; it repeats an oat-at-a-time (OAT) sampling N times, starting from N different points selected from a DOE algorithm.OATDOEis a DOE algorithm used byMorrisDOE; it applies the oat-at-a-time (OAT) sampling strategy, given an initial point. #1213
Miscellaneous#
Support for Python 3.12 #1530
compare_dict_of_arraysreturnsFalsein the case of variables with arrays of different sizes. #1049MDANewtonRaphson.NewtonLinearSolveris the enumeration of linear solvers for the Newton method. #1084MDOLinearFunction.normalizetransforms a basicMDOLinearFunctioninto anMDOLinearFunctionusing a scaled input vector. #1104Sellar problem:
The local design variables and the coupling variables are vectors of dimension \(n\) (default: 1), instead of scalars.
Sellar2has a new local design variable \(x_2\) which intervenes also in the objective expression (default: 0)The disciplines
Sellar1andSellar2have a coefficient \(k\) to control the strength of the coupling (default: 1).The coefficient
0.2inSellar1is now an input variable named \(\gamma\) (default: 0.2).The coefficient
3.16inSellarSystemis now an input variable named \(\alpha\) (default: 3.16).The coefficient
24.0inSellarSystemis now an input variable named \(\beta\) (default: 24.0).
The function
to_picklesaves the pickled representation of an object on the disk.The function
from_pickleloads the pickled representation of an object from the disk.BaseFormulation.variable_sizesstores the sizes of both the design variables and the differentiated inputs. #1230String tools:
gemseo.utils.string_tools.get_name_and_componentreturns a(name, component)tuple from anameor(name, component)object.gemseo.utils.string_tools.convert_strings_to_iterablereturns an iterable of strings from a string or an iterable of strings.gemseo.utils.string_tools.filter_namesfilters original names from a selection of names to keep by preserving their order.gemseo.utils.string_tools.get_variables_with_componentsreturns a collection of(name, component)objects from anameor(name, component)object or a collection of such objects.
The function
import_databasecan create either aDatasetor aDatabasefrom the HDF5 file storing theDatabaseassociated to anEvaluationProblem.Databasehas an optional argument calledinput_spaceto define the input space to which the input vectors belong; by default, this input space includes a unique variable calledDatabase.DEFAULT_INPUT_NAME. #1303The
executemethod of post-processing tools (seeBasePost) returns a dictionary of matplotlib figures ofDatasetPlot, depending on whether or not it is based on aDatasetPlot. This allows interactive visualization in a web page when the HTML format is supported by theDatasetPlot. This is the case ofBasicHistorywhose HTML version is based on the plotly library. When available, setfile_extensionto"html". #1308DesignSpace.to_scalar_variables()creates a design space of scalar variables from a design space. #1333generate_coupling_graphdoes not save the graph whenfile_pathis empty. This can be useful when we simply want to use the returnedGraphView, to display it in a web page or a notebook for example. #1341
Fixed#
Optimization & DOE#
The
Databaseis now correctly appended at each iteration when scalar and vectorial outputs are mixed. #1194DesignSpace.filter_dimensions(formerlyDesignSpace.filter_dim) updates the mappingDesignSpace.__names_to_indices#1218CenteredDifferences.f_gradientworks whenCenteredDifferencesis not instantiated from a ``DesignSpace. #1253The algorithm
MNBIcorrectly handles the optionnormalize_design_space. #1255When the computation of the Lagrange multipliers crashes with
scipy.optimize.nnls, fall back toscipy.optimize.lsq_linear. #1340Algorithm
"Augmented_Lagrangian_order_1"now updates all the Lagrange multipliers, even those which correspond to constraints that are inactive at the current iteration. #1342DesignSpace.normalizenot longer erroneously flags design variables with equal lower and upper bounds as not to be normalized. #1346
MDO processes#
When building the warm started chain it now considers the variables coming from the MDA 1 and the MDA 2. #1116
The method
MDA.plot_residual_history()no longer crashes when theMDAhas been executed more than once and then_iterationsargument is smaller than the total amount of iterations. #1157The
DesignSpaceattached to theMDFformulation can be reset. #1179MDOParallelChainhandles disciplines whose inputs are not NumPy arrays. #1209Remove the update of local data performed in the end of the
MDAGaussSeidel. #1251When changing the residual scaling method of an
MDASequentialor andMDAChain, the change is applied to all inner MDAs. #1280MDAChaincorrectly runs withinitialize_defaultsset to True when some outputs of the chain are not coupling variables. #1281The
toleranceandlinear_solver_toleranceargs are correctly passed to the main and sub-MDAs inMDAGSNewton. #1294Local data in MDA are no longer modified via
self.local_data[key] = valuebut rather using thestore_local_datamethod to ensure proper handling of namespaces. #1309The XDSM generation through PDF format can now handle MDA within an
MDOParallelChainwith the correct workflow. #1441
Surrogate models#
Miscellaneous#
The
DependencyGraphrepresents homonymous disciplines with specific nodes. #1264BaseAlgorithmLibraryand its derived classes no longer allow users to pass settings that are not included in the validation model. In the past, unknown settings were allowed to pass up to the wrapped algorithm level, which was error prone. Theineq_tolerancewas not used for theScipy_MILPalgorithm, it is now done. #1450
Changed#
Database.get_function_historyraises aKeyErrorwhen the database contains no value of the output, instead of returning an empty array.RemappingDisciplineuses the same types for the grammar elements as the grammars of the underlying discipline. #1095IODataset: the "group name, default variable name" pairs for theIODatasetare "i, inputs" and "o, outputs".OptimizationDataset: the "group name, default variable name" pairs for theOptimizationDatasetare "d, designs", "o, observables", "f, objectives" and "c, constraints". #1275XDSM: the
pdf_cleanupoption removes all intermediate files, including .tikz and .tex files. #1263The convergence of MDAs is now checked after the execution of the disciplines instead of after the acceleration. This change affects the absolute value of the output coupling variables when running an MDA with acceleration methods. The difference has an order of magnitude at most equal to the MDA tolerance. The change should be harmless in most cases but could anyway have effects for numerically sensitive problems. #1251
The post-processing algorithms use the 10-based logarithm. The post-processing algorithms using matplotlib use the
tight_layout()command. #593
Removed#
API Changes#
See Upgrading GEMSEO for more information.
Version 5.3.2 (2024-08-08)#
Added#
The
IDFformulation now accepts options at instantiation for theMDAChainexecuted at the begining of the process whenstart_at_equilibrium=True. #1259
Fixed#
Remove the update of local data performed in the end of the
MDAGaussSeidel. #1251BaseScenario.to_datasetcan export theDatabaseto aDatasetin presence of homonymous inputs and outputs.
Changed#
The convergence of MDAs is now checked after the execution of the disciplines instead of after the acceleration. This change affects the absolute value of the output coupling variables when running an MDA with acceleration methods. The difference has an order of magnitude at most equal to the MDA tolerance. The change should be harmless in most cases but could anyway have effects for numerically sensitive problems. #1251
Version 5.3.1 (2024-06-06)#
Fixed#
The method
OptimizationProblem.to_datasetnow considers the type of each variable. #1154GEMSEO no longer sets the
maxiteroption ofTNCthat does not exist butmaxfun. #1181The
Databaseexport to an HDF5 file works in "append" mode and when storing data successively for the same input value. #1216
Version 5.3.0 (2024-03-28)#
Added#
The SciPy implementation of the
Nelder-Meadgradient-free algorithm is now available. #875HSICAnalysis.compute_indicesalso computes the p-values for screening purposes in two different ways: through permutations and from asymptotic formula. #992Added the modified Normal Boundary Intersection (mNBI) multi-objective optimization algorithm, for use with
"MNBI"as algorithm name. Added the classMultiObjectiveOptimizationResultto store and display results from optimization problems with more than one objective. Added the classParetoFrontto store the points of interest of aMultiObjectiveOptimizationResult. Added thePolonianalytical multi-objective optimization problem. Added theFonsecaFlemminganalytical multi-objective optimization problem. Added theViennetanalytical multi-objective optimization problem. #1012The method
DataConverter.is_continuouscan tell if a variable is continuous. #1066The
Datasetclass can now be created from aDataFrameusing the new class method:from_dataframe. #1069The boolean attribute
DatasetPlot.gridallows to add a grid to theDatasetPlot. #1074HSICAnalysis.compute_indicesproposes two new sensitivity analysis (SA) types, namely conditional SA and target SA. #1078LinesandBarPlothave HTML-based interactive versions based on plotly. #1082The method
AbstractCache.get_all_entriesthat returns all the entries, whatever the tolerance.The module
gemseo.typingthat contains common type annotations. #1090Dataset.from_csvhas a new attributefirst_column_as_index, which permits to readcsvfiles that contain the index as the first column. #1093MDOFunctionsupports elementwise multiplication and division by NumPy arrays.Addition, substraction, multiplication and division of a function expecting normalized inputs with a function that does not raise
RuntimeError.The function values \(f(x)\) passed to optimizers can optionally be scaled relative to \(|f(x_0)|\) where \(x_0\) is the current value of the
DesignSpace. This functionality is enabled by passing a positive value \(\epsilon\) as the optionscaling_thresholdof any optimizer: the function values passed to the optimizer are then \(f(x) / \max\{ |f(x_0)|, \epsilon \}\). The purpose of \(\epsilon\) is to avoid division by a value close to zero. The (default) valueNonefor the optionscaling_thresholddisables the scaling. #1100DOELibrary.compute_doeandcompute_doecan use a variables space dimension instead of a variables space. #1102Each DOE algorithm available in GEMSEO has a new option named
"callbacks"to pass a list of functions to be evaluated after each call toOptimizationProblem.evaluate_functions. #1111Implement "hdf_node_path" for "opt_problem","design_space" and "database".
Allow "opt_problem" to be exported/imported to/from a node in a specified hdf file. #1119
The plotting methods of
SensitivityAnalysisandStatisticsclasses returnDatasetPlotobjects or figures from data visualization libraries, e.g. Matplotlib and Plotly.A Plotly figure can be passed to a Plotly plot. #1121
OptimizationProblem.get_all_functionshas a new argumentoriginalto return the original functions given to the problem. #1126A property
figuresallows to retrieve the figures generated by aDatasetPlot. #1130DriverLibrary.clear_listenersremoves the listeners added by theDriverLibraryfrom theDatabaseattached to theOptimizationProblem. #1134The
Seederclass is a seed generator for features using random numbers, e.g.DOELibrary; itsget_seedmethod returns either the user seed or the initial seed incremented by the number of calls. #1148
Fixed#
The stratified DOE algorithms
OT_AXIAL,OT_COMPOSITEandOT_FACTORIALcorrectly support the argumentsn_samples,centers,dimensionandlevels. #88The
MDODisciplinecan be linearized after execution when itscache_typeis set toMDODiscipline.CacheType.Noneand both inputs and outputs arguments of linearize are empty. #804MDAJacobiandMDAGaussSeidelhave now different XDSM representations which are in line with the convention proposed in [LM12].MDAChainis not represented anymore in the XDSM. Add tests for the pdf generation of XDSMs. Bugfixes for XDSM pdf generation. #1062The expression
LinearComposition.expris now correct. #1063Non-continuous variables can no longer be differentiated. #1066
The upper bound KS aggregation function is really called when aggregating constraints in an
OptimizationProblem#1075The user no longer has to provide an initial design point to solve an optimization problem with gradient approximation. #1076
The method
Scenario.set_optimization_history_backup()no longer causes the execution to crash at the first iteration when the Scenario includes equality or inequality constraints. #1089The
DirectoryCreatorcan now consider non-existing root directory while usingDirectoryNamingMethod.NUMBERED. #1097The missing closing parenthesis in the expression of
Rosenbrockis no longer missing.Addition, substraction, multiplication and division of functions expecting normalized inputs yield functions expecting normalized inputs. #1100
CustomDOE.compute_doeno longer raises an error and works correctly. #1103The axes generated by
EmpiricalStatistics.plot_cdfare no longer switched. #1105The BiLevel formulation can now be warm started even when the MDA1 does not exist (case of weakly coupled disciplines). #1107
The attribute
ParameterSpace.distributionsis correctly updated when renaming a random variable. #1108OptimizationProblem.databaseis not used whenuse_databaseisFalsein the case of aDOELibrary. #1110Dataset.to_dict_of_arraysno longer raises anAttributeErrorwhen bothby_entryandby_groupareTrueand works properly. #1112When
function_callsisTrue,OptimizationProblem.resetresets the number of calls of the original functions. #1126DesignSpace.rename_variablecan be applied to a variable without value. #1127Requesting an optimized LHS with size 1 raises an exception instead of a freeze. #1133
Databasecannot store the same listener several times. #1134The
Alternate2Deltamethod now handles degenerated (ill-conditioned) least squares problems. In this case, the method now returns the iterate without transformations. #1137Dataset.add_groupworks correctly whenvariable_namesdefines a single variable. #1138The transformers passed to an
MLAlgoare correctly applied when thefit_transformersargument of thelearnmethod isFalse. #1146The
MDOChainJacobian is made reproducible, making the sum of composite derivative terms in an order that does not depend on the code execution. #1150The
PydanticGrammarwas not able to validateDisciplineDataobjects. #1153
Changed#
The methods
OptimizationProblem.from_hdf()andOptimizationProblem.to_hdf()no longer log messages when they are called. The methodDatabase.to_ggobi()no longer logs messages when it is called. #579The option
dispof theSciPyalgorithms shall now be passed as abooleaninstead of aninteger. #875The method
Scenario.set_optimization_history_backup()now starts generating plots only after the first two iterations have been computed. TheOptHistoryViewplots created byScenario.set_optimization_history_backup()with the optiongenerate_opt_plotare no longer updated at eachDatabase.store(), only at each new iteration. #1089API change:
AbstractCache._{INPUTS,OUTPUTS,JACOBIAN}_GROUPhas been replaced byAbstractCache.Group. #1090Methods
executeandlinearizeofgemseo.problems.sobieski.core.structure.SobieskiStructurecatch theValueErrorraised by the computation of the logarithm of a non-positive weight ratio. Methodexecutereturnsnumpy.nanfor the mass term. #1101It is now possible to solve
MDAinstances that include non-numeric couplings (weak or strong), typically strings or arrays of string. The non-numeric couplings are automatically filtered during the numerical solution of theMDA. A warning message is shown in the log atDEBUGlevel with the variables that were filtered. #1124Database.clear_listenersreturns the listeners after removing them from theDatabase. #1134OptimizationProblem.objective = mdo_functionsetsmdo_function.f_typetomdo_function.FunctionType.OBJ; no need to do it by hand anymore. #1141The argument
uniform_distribution_nameofIshigamiProblemandIshigamiSpaceallows to use a uniform distribution from a library other than SciPy, e.g. OpenTURNS. #1143API change:
SEEDmoved togemseo.utils.seeder. #1148
Removed#
Support for reStructuredText docstring format.
The function
get_default_option_values; useinspect.get_callable_argument_defaults(cls.__init__)instead ofget_default_option_values(cls). #1059
Version 5.2.0 (2023-12-20)#
Added#
Setting
file_format="html"inDatasetPlot.executesaves on the disk and/or displays in a web browser a plotly-based interactive plot.DatasetPlot.DEFAULT_PLOT_ENGINEis set toPlotEngine.MATPLOTLIB; this is the default plot engine used byDatasetPlot.DatasetPlot.FILE_FORMATS_TO_PLOT_ENGINESmaps the file formats to the plot engines to override the default plot engine. #181Add
OptimizationProblem.get_last_pointmethod to get the last point of an optimization problem. #285The disciplines
Concatenater,LinearCombinationandSplitternow have sparse Jacobians. #423The method
EmpiricalStatistics.plot_barplotgenerates a boxplot for each variable. The methodEmpiricalStatistics.plot_cdfdraws the cumulative distribution function for each variable. The methodEmpiricalStatistics.plot_pdfdraws the probability density function for each variable. #438MLRegressorQualityViewerproposes various methods to plot the quality of anMLRegressionAlgo`.DatasetPlot.executecan use a file name suffix.SurrogateDiscipline.get_quality_viewerreturns aMLRegressorQualityViewer. #666ScatterMatrixcan set any option of the pandasscatter_matrixfunction.ScatterMatrixcan add trend curves on the scatter plots, with either the enumerationScatterMatrix.Trendor a custom fitting technique.Scattercan add a trend curve, with either the enumerationScatter.Trendor a custom fitting technique. #724ScenarioResultis a new concept attached to aScenario. This concept enables to post-process more specifically the results of a given scenario. In particular, theScenarioResultcan be derived in order to implement dedicated post-treatments depending on the formulation.OptimizationResult.from_optimization_problemcreates anOptimizationResultfrom anOptimizationProblem.BaseFormulation.DEFAULT_SCENARIO_RESULT_CLASS_NAMEis the name of the defaultOptimizationResultclass to be used with the given formulation.ScenarioResultstores the result of aScenariofrom aScenarioor an HDF5 file.BiLevelScenarioResultis aScenarioResultto store the result of aScenariousing aBiLevelformulation.ScenarioResultFactoryis a factory ofScenarioResult.Scenario.get_resultreturns the result of the execution of theScenarioas aScenarioResult.create_scenario_resultstores the result of aScenariofrom aScenarioor an HDF5 file.
The
LinearCombinationdiscipline now has a sparse Jacobian. #809The
normalizeoption ofBasicHistoryscales the data between 0 and 1 before plotting them. #841The type of the coupling variables is no longer restricted to NumPy arrays thanks to data converters attached to grammars. #849
gemseo.mlearning.samplingis a new package with resampling techniques, such asCrossValidationandBootstrap.MLAlgo.resampling_resultsstores the resampling results; a resampling result is defined by aResampler, the machine learning algorithms generated during the resampling stage and the associated predictions. The methods offered byMLQualityMeasureto estimate a quality measure by resampling have a new argument calledstore_resampling_resultto store the resampling results and reuse them to estimate another quality measure faster. #856SciPyDOEis a newDOELibrarybased on SciPy, with five algorithms: crude Monte Carlo, Halton sequence, Sobol' sequence, Latin hypercube sampling and Poisson disk sampling. #857When third-party libraries do not handle sparse Jacobians, a preprocessing step is used to convert them as dense NumPy arrays. #899
R2Measure.evaluate_bootstrapis now implemented. #914Add diagrams in the documentation to illustrate the architecture and usage of ODEProblem. #922
MDA can now handle disciplines with matrix-free Jacobians. To define a matrix-free Jacobian, the user must fill in the
MDODiscipline.jacdictionary withJacobianOperatoroverloading the_matvecand_rmatvecmethods to respectively implement the matrix-vector and transposed matrix-vector product. #940The
SimplerGrammaris a grammar based on element names only.SimplerGrammar` is even simpler than ``SimpleGrammarwhich considers both names and types. #949HSICAnalysisis a newSensitivityAnalysisbased on the Hilbert-Schmidt independence criterion (HSIC). #951Add the Augmented Lagrangian Algorithm implementation. #959
Support for Python 3.11. #962
Optimization problems with inequality constraints can be reformulated with only bounds and equality constraints and additional slack variables thanks to the public method:
OptimizationProblem.get_reformulated_problem_with_slack_variables.#963The subtitle of the graph generated by
SobolAnalysis.plotincludes the standard deviation of the output of interest in addition to its variance. #965OTDistributionFactoryis aDistributionFactorylimited toOTDistributionobjects.SPDistributionFactoryis aDistributionFactorylimited toSPDistributionobjects. Thebase_class_nameattribute ofget_available_distributionscan limit the probability distributions to a specific library, e.g."OTDistribution"for OpenTURNS and"SPDistribution"for SciPy. #972The
use_one_line_progress_bardriver option allows to display only one iteration of the progress bar at a time. #977OTWeibullDistributionis the OpenTURNS-based Weibull distribution.SPWeibullDistributionis the SciPy-based Weibull distribution. #980MDAChainhas an option to initialize the default inputs by creating aMDOInitializationChainat first execution. #981The upper bound KS function is added to the aggregation functions. The upper bound KS function is an offset of the lower bound KS function already implemented. #985
CenteredDifferencesApproximation mode is now supported for jacobian computation. This can be used to calculateMDODisciplineandMDOFunctionsjacobians setting the jacobian approximation mode as for the Finite Differences and the Complex Step schemes. This is a second order approach that employs twice points but as a second order accuracy with respect to the Finite Difference scheme. When calculating a Centered Difference on one of the two bounds of the Design Space, the Finite Difference scheme is used instead. #987The class
SobieskiDesignSpacederiving fromDesignSpacecan be used in the Sobieski's SSBJ problem. It offers new filtering methods, namelyfilter_coupling_variablesandfilter_design_variables. #1003The
MDODisciplinecan flag linear relationships between inputs and outputs. This enables theFunctionFromDisciplinegenerated from theseMDODisciplineto be instances ofLinearMDOFunction. AnOptimizationProblemis now by default a linear problem unless a non-linear objective or constraint is added to the optimization problem. #1008The following methods now have an option
as_dictto request the return values as dictionaries of NumPy arrays instead of straight NumPy arrays:DesignSpace.get_lower_bounds,DesignSpace.get_upper_bounds,OptimizationProblem.get_x0_normalizedandDriverLibrary.get_x0_and_bounds_vects. #1010gemseo.SEEDis the default seed used by GEMSEO for random number generators. #1011HiGHS solvers for linear programming interfaced by SciPy are now available. #1016
Augmented Lagrangian can now pass some of the constraints to the sub-problem and deal with the rest of them thanks to the
sub_problem_constraintsoption. #1026An example on the usage of the
MDODiscipline.check_jacobianmethod was added to the documentation. Three derivative approximation methods are discussed: finite differences, centered differences and complex step. #1039The
TaylorDisciplineclass can be used to create the first-order Taylor polynomial of anMDODisciplineat a specific expansion point. #1042The following machine learning algorithms have an argument
random_stateto control the generation of random numbers:RandomForestClassifier,SVMClassifier,GaussianMixture,KMeans,GaussianProcessRegressor,LinearRegressorandRandomForestRegressor. Use an integer for reproducible results (default behavior). #1044BaseAlgoFactory.createinitializes the grammar of algorithm options when it is called with an algorithm name. #1048
Fixed#
There is no longer overlap between learning and test samples when using a cross-validation technique to estimate the quality measure of a machine learning algorithm. #915
Security vulnerability when calling
subprocess.runwithshell=True. #948Fixed bug on
LagrangeMultipliersevaluation when bound constraints are activated on variables which have only one bound. #964The iteration rate is displayed with appropriate units in the progress bar. #973
AnalyticDisciplinecasts SymPy outputs to appropriate NumPy data types (as opposed to systematically casting tofloat64). #974AnalyticDisciplineno longer systematically casts inputs tofloat. #976MDODiscipline.set_cache_policycan useMDODiscipline.CacheType.NONEascache_typevalue to remove the cache of theMDODiscipline. #978The normalization methods of
DesignSpacedo no longer emit aRuntimeWarningabout a division by zero when the lower and upper bounds are equal. #1002The types used with
PydanticGrammar.update_from_typeswithmerge=Trueare taken into account. #1006DesignSpace.dict_to_arrayreturns anndarraywhose attributedtypematches the "commondtype" of the values of itsdictargumentdesign_valuescorresponding to the keys passed in its argumentvariables_names. So far, thedtypewas erroneously based on all the values ofdesign_values. #1019DisciplineDatawith nested dictionary can now be serialized withjson. #1025Full-factorial design of experiments: the actual number of samples computed from the maximum number of samples and the dimension of the design space is now robust to numerical precision issues. #1028
DOELibrary.executeraises aValueErrorwhen a component of theDesignSpaceis unbounded and theDesignSpaceis not aParameterSpace.DOELibrary.compute_doeraises aValueErrorwhenunit_samplingisFalse, a component of the design space is unbounded and theDesignSpaceis not aParameterSpace. #1029OptimizationProblem.get_violation_criteriano longer considers the non-violated components of the equality constraints when calculating the violation measure. #1032A
JSONGrammarusing namespaces can be serialized correctly. #1041RadarChartdisplays the constraints at iterationiwheniteration=i. #1054
Changed#
API:
The class
RunFolderManageris renamedDirectoryGenerator.The class
FoldersIteris renamedIdentifiers.The signature of the class
DirectoryGeneratorhas changed:folders_iteris replaced byidentifiersoutput_folder_basepathis replaced byroot_directory
The subpackage
gemseo.mlearning.data_formattersincludes theDataFormattersused by the learning and prediction methods of the machine learning algorithms. #933The argument
use_shellof the disciplineDiscFromExeis no longer taken into account, executable are now always executed without shell. #948The existing KS function aggregation is renamed as
lower_bound_KS. #985The log of the
ProgressBarno longer displays the initialization of the progress bar. #988The
samplesoption of the algorithmCustomDOEcan be a 2D-array shaped as(n_samples, total_variable_size), a dictionary shaped as{variable_name: variable_samples, ...}wherevariable_samplesis a 2D-array shaped as(n_samples, variable_size)or ann_samples-length list shaped as[{variable_name: variable_sample, ...}, ...]wherevariable_sampleis a 1D-array shaped as(variable_size, ). #999PydanticGrammarhave been updated to support Pydantic v2. For such grammars, NumPy ndarrays shall be typed withgemseo.core.grammars.pydantic_ndarray.NDArrayPydanticinstead of the standardndarrayorNDArraybased of annotations. #1017The example on how to do a Pareto Front on the Binh Korn problem now uses a
BiLevelformulation instead of anMDOScenarioAdaptermanually embedded into aDOEScenario. #1040ParameterSpace.__str__no longer displays the current values, the bounds and the variable types when all the variables are uncertain. #1046
Removed#
Support for Python 3.8. #962
Version 5.1.1 (2023-10-04)#
Security#
Upgrade the dependency pillow to mitigate a vulnerability.
Version 5.1.0 (2023-10-02)#
Added#
The argument
scenario_log_levelofMDOScenarioAdapterallows to change the level of the root logger during the execution of its scenario.The argument
sub_scenarios_log_levelofBiLevelallows to change the level of the root logger during the execution of its sub-scenarios. #370DesignSpacehas a pretty HTML representation. #504The method
add_random_vector()adds a random vector with independent components to aParameterSpacefrom a probability distribution name and parameters. These parameters can be set component-wise. #551The high-level function
create_datasetreturns an emptyDatasetby default with a default name. #721OptimizationResulthas new fieldsx_0_as_dictandx_opt_as_dictbounding the names of the design variables to their initial and optimal values. #775Enable the possibility of caching sparse Jacobian with cache type HDF5Cache. #783
Acceleration methods for MDAs are defined in dedicated classes inheriting from
SequenceTransformer.Available sequence transformers are:
The alternate 2-δ method:
Alternate2Delta.The alternate δ² method:
AlternateDeltaSquared.The secante method:
Secante.The Aitken method:
Aitken.The minimum polynomial method:
MinimumPolynomial.The over-relaxation:
OverRelaxation.
The values of the constraints can be passed to method
OptimizationProblem.get_number_of_unsatisfied_constraints.#802RegressorQualityFactoryis a factory ofMLErrorMeasure.SurrogateDiscipline.get_error_measurereturns anMLErrorMeasureto assess the quality of aSurrogateDiscipline; use one of its evaluation methods to compute it, e.g.evaluate_learnto compute a learning error. #822The
DatasetFactoryis a factory ofDataset.The high-level function
create_datasetcan return any type ofDataset. #823Datasethas a string propertysummaryreturning some information, e.g. number of entries, number of variable identifiers, ... #824MLAlgo.__repr__returns the same asMLAlgo.__str__before this change andMLAlgo.__str__does not overloadMLAlgo.__repr__. #826The method
Dataset.to_dict_of_arrayscan break down the result by entry with the boolean argumentby_entrywhose default value isFalse. #828Added Scipy MILP solver wrapper. #833
DesignSpace.get_variables_indexesfeatures a new optional argumentuse_design_space_orderto switch the order of the indexes between the design space order and the user order. #850ScalableProblem.create_quadratic_programming_problemhandles the case where uncertain vectors are added in the coupling equations. #863MDODisciplineAdapterGeneratorcan use a dictionary of variable sizes at instantiation. #870The multi-processing start method (spawn or fork) can now be chosen. #885
Acceleration methods and over-relaxation are now available for
MDAJacobi,MDAGaussSeidelandMDANewtonRaphson. They are configured at initialization via theacceleration_methodandover_relaxation_factorand can be modified afterward via the attributesMDA.acceleration_methodandMDA.over_relaxation_factor.Available acceleration methods are:
Alternate2Delta,AlternateDeltaSquared,Aitken,Secant,MinimumPolynomial,
CouplingStudyAnalysishas a new methodgenerate_coupling_graph.The CLI
gemseo-studygenerates the condensed and full coupling graphs as PDF files. #910The
check_disciplines_consistencyfunction checks if two disciplines compute the same output and raises an error or logs a warning message if this is the case.MDOCouplingStructurelogs a message withWARNINGlevel if two disciplines compute the same output. #912The default value of an input variable of a
LinearCombinationis zero. #913BaseFactory.createsupports positional arguments. #918The algorithms of a
DriverLibraryhave a new option"log_problem"(default:True). Set it toFalseso as not to log the sections related to an optimization problem, namely the problem definition, the optimization result and the evolution of the objective value. This can be useful when aDOEScenariois used as a pure sampling scenario. #925SensitivityAnalysis.plot_barandSensitivityAnalysis.plot_radarhave new argumentssortandsorting_outputto sort the uncertain variables by decreasing order of the sensitivity indices associated with a sorting output variable.DatasetPlothas a new argumentxtick_rotationto set the rotation angle of the x-ticks for a better readability when the number of ticks is important. #930SensitivityAnalysis.to_datasetstores the second-order Sobol' indices in the dictionaryDataset.miscwith the key"second". #936The string representation of a
ComposedDistributionuses both the string representations of the marginals and the string representation of the copula.The string representation of a
Distributionuses both the string representation of its parameters and its dimension when the latter is greater than 1. #937The default value of the argument
outputsof the methodsplot_barandplot_radarofSensitivityAnalysisis(). In this case, theSensitivityAnalysisuses all the outputs. #941N2HTMLcan use any sized default inputs (NumPy arrays, lists, tuples, ...) to deduce the size of the input variables. #945
Fixed#
Fix the MDA residual scaling strategy based on sub-residual norms. #957
An XDSM can now take into account several levels of nested scenarios as well as nested
MDA. An XDSM with a nested Scenario can also take into account more complex formulations thanDisciplinaryOpt, such asMDF. #687The properties of the
JSONGrammarcreated byBaseFactory.get_options_grammarare no longer required. #772If
time_vectoris not user-specified, then it is generated by the solver. As such, the array generated by the solver belongs in theODEResult. #778Fix plot at the end of the Van der Pol tutorial illustrating an
ODEProblem. #806The high-level function
create_datasetreturns a baseDatasetby default. #823SurrogateDiscipline.__str__is less verbose by inheriting fromMDODiscipline; useSurrogateDiscipline.__repr__instead of the olderSurrogateDiscipline.__repr__. #837OptHistoryViewcan be executed withvariable_names=Noneto explicitly display all the design variables.The variable names specified with the argument
variable_namesofOptHistoryVieware correctly considered.OptimizationProblem.from_hdfsetspb_typeanddifferentiation_methodas string.OptHistoryView,ObjConstrHistandConstraintsHistorydisplay a limited number of iterations on the x-axis to make it more readable by avoiding xtick overlay.DesignSpacehas a new propertynames_to_indicesdefining the design vector indices associated with variable names. #838execute_postcan post-process aPath. #846The MDA chain can change at once the
max_mda_iterof all its MDAs. The behaviour of themax_mda_iterof this class has been changed to do so. #848The methods
to_datasetbuildDatasetobjects in one go instead of adding variables one by one. #852CorrelationAnalysisandSobolAnalysisuse the input names in the order provided by theParameterSpace. #853The
RunFolderManagercan now work with a non-emptyoutput_folder_basepathwhen usingfolders_iter = FoldersIter.NUMBERED. Their name can be different from a number. #865The argument
output_namesofMorrisAnalysisworks properly again. #866The argument
n_samplespassed toMorrisAnalysisis correctly taken into account. #869DOELibraryworks when the design variables have no default value. #870The generation of XDSM diagrams for MDA looping over MDOScenarios. #879
BarPlothandles now correctly aDatasetwhose number of rows is higher than the number of variables. #880The DOE algorithms consider the optional seed when it is equal to 0 and use the driver's one when it is missing. #886
PCERegressornow handles multidimensional random input variables. #895get_all_inputsandget_all_outputsreturn sorted names and so are now deterministic. #901OptHistoryViewno longer logs a warning when post-processing an optimization problem whose objective gradient history is empty. #902The string representation of an
MDOFunctionis now correct even after several sign changes. #917The sampling phase of a
SensitivityAnalysisno longer reproduces the full log of theDOEScenario. Only the disciplines, the MDO formulation and the progress bar are considered. #925The
Correlationsplot now labels its subplots correctly when the constraints of the optimization problem include an offset. #931The string representation of a
Distributionno longer sorts the parameters. #935SobolAnalysiscan export the indices to aDataset, even when the second-order Sobol' indices are computed. #936One can no longer add two random variables with the same name in a
ParameterSpace. #938SensitivityAnalysis.plot_barandSensitivityAnalysis.plot_radaruse all the outputs when the argumentoutputsis empty (e.g.None,""or()). #941A
DesignSpacecontaining a design variable without current value can be used to extend anotherDesignSpace. #947Security vulnerability when calling
subprocess.runwithshell=True. #948
Changed#
Distribution: the default value ofvariableis"x"; same forOTDistribution,SPDistributionand their sub-classes.SPDistribution: the default values ofinterfaced_distributionandparametersareuniformand{}.OTDistribution: the default values ofinterfaced_distributionandparametersareUniformand(). #551The high-level function
create_datasetraises aValueErrorwhen the file has a wrong extension. #721The performance of
MDANewtonRaphsonwas improved. #791The classes
KMeansuse"auto"as default value for the argumentn_initof the scikit-learn'sKMeansclass. #825output_nameswas added toMDOFunction.DICT_REPR_ATTRin order for it to be exported when saving to an hdf file. #860OptimizationProblem.minimize_objectiveis now a property that changes the sign of the objective function if needed. #909The name of the
MDOFunctionresulting from the sum (resp. subtraction, multiplication, division) of twoMDOFunctions named"f"and"g"is"[f+g]"(resp."[f-g]","[f*g]","[f/g]").The name of the
MDOFunctiondefined as the opposite of theMDOFunctionnamed"f"is-f.In the expression of an
MDOFunctionresulting from the multiplication or division ofMDOFunctions, the expression of an operand is now grouped with round parentheses if this operand is a sum or subtraction. For example, for"f(x) = 1+x"and"g(x) = x"the resulting expression forf*gis"[f*g](x) = (1+x)*x".The expression of the
MDOFunctiondefined as the opposite of itself is-(expr). #917Renamed
MLQualityMeasure.evaluate_learntoMLQualityMeasure.compute_learning_measure.Renamed
MLQualityMeasure.evaluate_testtoMLQualityMeasure.compute_test_measure.Renamed
MLQualityMeasure.evaluate_kfoldstoMLQualityMeasure.compute_cross_validation_measure.Renamed
MLQualityMeasure.evaluate_lootoMLQualityMeasure.compute_leave_one_out_measure.Renamed
MLQualityMeasure.evaluate_bootstraptoMLQualityMeasure.compute_bootstrap_measure. #920The argument
use_shellof the disciplineDiscFromExeis no longer taken into account, executable are now always executed without shell. #948
Version 5.0.1 (2023-09-07)#
Added#
The MDAJacobi performance and memory usage was improved. #882
Fixed#
The MDAJacobi executions are now deterministic. The MDAJacobi m2d acceleration is deactivated when the least square problem is not well solved. #882
Version 5.0.0 (2023-06-02)#
Main GEMSEO.API breaking changes#
The high-level functions defined in
gemseo.apihave been moved togemseo.Features have been extracted from GEMSEO and are now available in the form of
plugins:gemseo.algos.opt.lib_pdfohas been moved to gemseo-pdfo, a GEMSEO plugin for the PDFO library,gemseo.algos.opt.lib_psevenhas been moved to gemseo-pseven, a GEMSEO plugin for the pSeven library,gemseo.wrappers.matlabhas been moved to gemseo-matlab, a GEMSEO plugin for MATLAB,gemseo.wrappers.template_grammar_editorhas been moved to gemseo-template-editor-gui, a GUI to create input and output file templates forDiscFromExe.
Added#
PCERegressorhas new arguments:use_quadratureto estimate the coefficients by quadrature rule or least-squares regression.use_larsto get a sparse PCE with the LARS algorithm in the case of the least-squares regression.use_cleaningandcleaning_optionsto apply a cleaning strategy removing the non-significant terms.hyperbolic_parameterto truncate the PCE before training.
The argument
scaleofPCAallows to scale the data before reducing their dimension. #743
GradientSensitivityplots the positive derivatives in red and the negative ones in blue for easy reading. #725TopologyViewallows to visualize the solution of a 2D topology optimization problem. #739ConstraintsHistoryuses horizontal black dashed lines for tolerance. #664Animationis a newOptPostProcessorto generate an animated GIF from aOptPostProcessor. #740
JSchedulerDisciplineWrappercan submit the execution of disciplines to a HPC job scheduler. #613MDODisciplinehas now a virtual execution mode; when active,MDODiscipline.executereturns itsMDODiscipline.default_outputs, whatever the inputs. #558Improve the computation of
MDAresiduals with the following new strategies:each sub-residual is scaled by the corresponding initial norm,
each component is scaled by the corresponding initial component,
the Euclidean norm of the component-wise division by initial residual scaled by the problem size.
OTComposedDistributioncan consider any copula offered by OpenTURNS. #655Scenario.xdsmizereturns aXDSM; itsXDSM.visualizemethod displays the XDSM in a web browser; this object has also a HTML view. #564Add a new grammar type based on Pydantic:
PydanticGrammar. This new grammar is still experimental and subject to changes, use with cautions. #436XLSStudyParserhas a new argumenthas_scenariowhose default value isTrue; ifFalse, the sheetScenariois not required.CouplingStudyAnalysisallows to generate an N2 diagram from an XLS file defining the disciplines in terms of input and output names.MDOStudyAnalysisallows to generate an N2 diagram and an XDSM from an XLS file defining an MDO problem in terms of disciplines, formulation, objective, constraint and design variables. #696JSONGrammarcan validatePathLikeobjects. #759Enable sparse matrices in the utils.comparisons module. #779
The method
MDODiscipline._init_jacobiannow supports sparse matrices.
Stopping options
"max_time"and"stop_crit_n_x"can now be used with the global optimizers of SciPy ("DIFFERENTIAL_EVOLUTION","DUAL_ANNEALING"and"SHGO"). #663Add exterior penalty approach to reformulate
OptimizationProblemwith constraints into one without constraints. #581Documentation: the required parameters of optimization, DOE and linear solver algorithms are documented in dedicated sections. #680
The
MDOLinearFunctionexpression can be passed as an argument to the instantiation. This can be useful for large numbers of inputs or outputs to avoid long computation times for the expression string. #697Enable sparse coefficients for
MDOLinearFunction. #756
SobolAnalysisprovides theSobolAnalysis.output_variancesandSobolAnalysis.output_standard_deviations.SobolAnalysis.unscale_indicesallows to unscale the Sobol' indices usingSobolAnalysis.output_variancesorSobolAnalysis.output_standard_deviations.SobolAnalysis.plotnow displays the variance of the output variable in the title of the graph. #671CorrelationAnalysisproposes two new sensitivity methods, namely Kendall rank correlation coefficients (CorrelationAnalysis.kendall) and squared standard regression coefficients (CorrelationAnalysis.ssrc). #654
Factory for algorithms (
BaseAlgoFactory) can cache the algorithm libraries to provide speedup. #522When
keep_opt_history=True, the databases of aMDOScenarioAdaptercan be exported in HDF5 files. #607The argument
use_deep_copyhas been added to the constructor ofMDOParallelChainclass. This controls the use of deepcopy when runningMDOParallelChain. By default this is set toFalse, as a performance improvement has been observed in use cases with a large number of disciplines. The old behaviour of using a deep copy ofMDOParallelChain.local_datacan be enabled by setting this option toTrue. This may be necessary in some rare combination ofMDOParallelChainand other disciplines that directly modify theMDODiscipline.input_data. #527Added a new
RunFolderManagerto generate unique run directory names forDiscFromExe, either as successive integers or as UUID's. #648ScenarioAdapteris aFactoryofMDOScenarioAdapter. #684A new
MDOWarmStartedChainallows users to warm start some inputs of the chain with the output values of the previous run. #665The method
Dataset.to_dict_of_arraysconverts aDatasetinto a dictionary of NumPy arrays indexed by variable names or group names. #793
Fixed#
MinMaxScalerandStandardScalerhandle constant data withoutRuntimeWarning. #719
The different kinds of
OptPostProcessordisplaying iteration numbers start counting at 1. #601The option
fig_sizepassed toOptPostProcessor.executeis now taken into account. #641The subplots of
ConstraintsHistoryuse their own y-limits. #656The visualization
ParallelCoordinatesuses the names of the design variables defined in theDesignSpaceinstead of default ones. #675
MDODiscipline.linearizewithcompute_all_jacobians=False(default value) computes the Jacobians only for the inputs and outputs defined withMDODiscipline.add_differentiated_inputsandMDODiscipline.add_differentiated_outputsif any; otherwise, it returns an empty dictionary; ifcompute_all_jacobians=True, it considers all the inputs and outputs. #644The bug concerning the linearization of a
MDOScenarioAdapterincluding disciplines that depends both only onMDOScenarioAdapterinputs and that are linearized in theMDOScenarioAdapter._runmethod is solved. Tests concerning this behavior where added. #651AutoPyDisciplinecan wrap a Python function with multiline return statements. #661Modify the computation of total derivatives in the presence of state variables to avoid unnecessary calculations. #686
Modify the default linear solver calling sequence to prevent the use of the
splufunction on SciPyLinearOperatorobjects. #691Fix Jacobian of
MDOChainincludingSplitterdisciplines. #764Corrected typing issues that caused an exception to be raised when a custom parser was passed to the
DiscFromExeat instantiation. #767The method
MDODiscipline._init_jacobianwhenfill_missing_key=Truenow creates the missing keys. #782It is now possible to pass a custom
nameto theXLSDisciplineat instantiation. #788get_available_mdasno longer returns the abstract classMDA. #795
OptimizationProblem.to_datasetuses the order of the design variables given by theParameterSpaceto build theDataset. #626Database.get_complete_historyraises aValueErrorwhen asking for a non-existent function. #670The DOE algorithm
OT_FACTORIALhandles correctly the tuple of parameters (levels,centers); this DOE algorithm does not usen_samples. The DOE algorithmOT_FULLFACThandles correctly the use ofn_samplesas well as the use of the parameterslevels; this DOE algorithm can use eithern_samplesorlevels. #676The required properties are now available in the grammars of the DOE algorithms. #680
The stopping criteria for the objective function variation are only activated if the objective value is stored in the database in the last iterations. #692
The
GradientApproximatorand its subclasses no longer include closures preventing serialization. #700A constraint aggregation
MDOFunctionis now capable of dealing with complexndarrayinputs. #716Fix
OptimizationProblem.is_mono_objectivethat returned wrong values when the objective had oneoutvarsbut multidimensional. #734Fix the behavior of
DesignSpace.filter_dimmethod for list of indices containing more than one index. #746
SensitivityAnalysis.to_datasetworks correctly with several methods and the returnedDatasetcan be exported to aDataFrame. #640OTDistributioncan now truncate a probability distribution on both sides. #660
The method
OptProblem.constraint_namesis now built on fly from the constraints. This fixes the issue of the updating of the constraint names when the constraints are modified, as it is the case with the aggregation of constraints. #669Factoryconsiders the base class as an available class when it is not abstract. #685Serialization of paths in disciplines attributes and local_data in multi OS. #711
Changed#
JSONGrammarno longer merge the definition of a property with the dictionary-likeupdatemethods. Now the usual behavior of a dictionary will be used such that the definition of a property is overwritten. The previous behavior can be used by passing the argumentmerge = True. #708CorrelationAnalysisno longer proposes the signed standard regression coefficients (SSRC), as it has been removed fromopenturns. #654Splitter,Concatenater,DensityFilter, andMaterialModelInterpolationdisciplines use sparse Jacobians. #745The minimum value of the seed used by a DOE algorithm is 0. #727
Parametric
gemseo.problems.scalable.parametric.scalable_problem.ScalableProblem:The configuration of the scalable disciplines is done with
ScalableDisciplineSettings.The method
gemseo.problems.scalable.parametric.scalable_problem.ScalableProblem.create_quadratic_programming_problemreturns the corresponding quadratic programming (QP) problem as anOptimizationProblem.The argument
alpha(default: 0.5) defines the share of feasible design space.
API changes#
See Upgrading GEMSEO for more information.
Version 4.3.0 (2023-02-09)#
Added#
Statistics.compute_joint_probabilitycomputes the joint probability of the components of random variables whileStatistics.compute_probabilitycomputes their marginal ones. #542MLErrorMeasurecan split the multi-output measures according to the output names. #544SobolAnalysis.compute_indiceshas a new argument to change the level of the confidence intervals. #599MDOInitializationChaincan compute the input data for a MDA from incomplete default_inputs of the disciplines. #610Add a new execution status for disciplines: "STATUS_LINEARIZE" when the discipline is performing the linearization. #612
ConstraintsHistory:One can add one point per iteration on the blue line (default behavior).
The line style can be changed (dashed line by default).
The types of the constraint are displayed.
The equality constraints are plotted with the
OptPostProcessor.eq_cstr_cmap.
Users can now choose whether the
OptimizationProblem.current_itershould be set to 0 before the execution of anOptimizationProblempassing the algo optionreset_iteration_counters. This is useful to complete the execution of aScenariofrom a backup file without exceeding the requestedmax_iterorn_samples. #636
Fixed#
HDF5Cache.hdf_node_namereturns the name of the node of the HDF file in which the data are cached. #583The histories of the objective and constraints generated by
OptHistoryViewno longer return an extra iteration. #591The histories of the constraints and diagonal of the Hessian matrix generated by
OptHistoryViewuse the scientific notation. #592ObjConstrHistcorrectly manages the objectives to maximize. #594Statistics.n_variablesno longer corresponds to the number of variables in theStatistics.datasetbut to the number of variables considered byStatistics.ParametricStatisticscorrectly handles variables with dimension greater than one.ParametricStatistics.compute_a_valueuses 0.99 as coverage level and 0.95 as confidence level. #597The input data provided to the discipline by a DOE did not match the type defined in the design space. #606
The cache of a self-coupled discipline cannot be exported to a dataset. #608
The
ConstraintsHistorydraws the vertical line at the right position when the constraint is satisfied at the final iteration. #616Fixed remaining time unit inconsistency in progress bar. #617
The attribute
fig_sizeofsave_show_figureimpacts the figure whenshowisTrue. #618Transformerhandles both 1D and 2D arrays. #624SobolAnalysisno longer depends on the order of the variables in theParameterSpace. #626ParametricStatistics.plot_criteriaplots the confidence level on the right subplot when the fitting criterion is a statistical test. #627CorrelationAnalysis.sort_parametersuses the rule "The higher the absolute correlation coefficient the better". #628Fix the parallel execution and the serialization of LinearCombination discipline. #638
Fix the parallel execution and the serialization of ConstraintAggregation discipline. #642
Changed#
Statistics.compute_probabilitycomputes one probability per component of the variables. #542The history of the diagonal of the Hessian matrix generated by
OptHistoryViewdisplays the names of the design variables on the y-axis. #595QuadApproxnow displays the names of the design variables. #596The methods
SensitivityAnalysis.plot_barandSensitivityAnalysis.plot_comparisonofSensitivityAnalysisuses two decimal places by default for a better readability. #603BarPlotuses a grid for a better readability.SobolAnalysis.plotuses a grid for a better readability.MorrisAnalysis.plotuses a grid for a better readability. #604Dataset.export_to_dataframecan either sort the columns by group, name and component, or only by group and component. #622OptimizationProblem.export_to_datasetuses the order of the design variables given by theParameterSpaceto build theDataset. #626
Version 4.2.0 (2022-12-22)#
Added#
Add a new property to
MatlabDisciplinein order to get access to theMatlabEngineinstance attribute. #536Independent
MDAin aMDAChaincan be run in parallel. #587The
MDAChainhas now an option to run the independent branches of the process in parallel.The Ishigami use case to illustrate and benchmark UQ techniques (
IshigamiFunction,IshigamiSpace,IshigamiProblemandIshigamiDiscipline). #517An
MDODisciplinecan now be composed ofMDODiscipline.disciplines. #520SobolAnalysiscan compute theSobolAnalysis.second_order_indices.SobolAnalysisuses asymptotic distributions by default to compute the confidence intervals. #524PCERegressorhas a new attributePCERegressor.second_sobol_indices. #525The
DistributionFactoryhas two new methods:DistributionFactory.create_marginal_distributionandDistributionFactory.create_composed_distribution. #526SobieskiProblemhas a new attributeUSE_ORIGINAL_DESIGN_VARIABLES_ORDERto order the design variables of theSobieskiProblem.design_spaceaccording to their original order ("x_shared","x_1","x_2"and"x_3") rather than the gemseo one ("x_shared","x_1","x_2"and"x_3"), asSobieskiProblemandSobieskiBaseare based on this original order. #550
Fixed#
Fix the XDSM workflow of a sequential sequence within a parallel sequence. #586
Factoryno longer considers abstract classes. #280When the
DOELibrary.executeis called twice with different DOEs, the functions attached to theOptimizationProblemare correctly sampled during the second execution and the results correctly stored in theDatabase. #435A
ParameterSpaceprevents the mixing of probability distributions coming from different libraries. #495MinMaxScalerandStandardScalercan now deal with constant variables. #512The options
use_database,round_intsandnormalized_design_spacepassed toDriverLib.executeare no longer ignored. #537OptimizationProblemcasts the complex numbers to real when exporting itsOptimizationProblem.databaseto aDataset. #546PCERegressorcomputes the Sobol' indices for all the output dimensions. #557Fixed a bug in
HDF5FileSingletonthat caused theHDF5Cacheto crash when writing data that included arrays of string. #559OptProblem.get_violation_criteriais inf for constraints with NaN values. #561Fixed a bug in the iterations progress bar, that displayed inconsistent objective function and duration values. #562
NormFunctionandNormDBFunctionnow use theMDOFunction.special_reprof the originalMDOFunction. #568DOEScenarioandMDOScenariocan be serialized after an execution. Added missing_ATTR_TO_SERIALIZEtoMDOChainandMDOScenarioAdapter. #578
Changed#
Since version 4.1.0, when using a DOE, an integer variable passed to a discipline is casted to a floating point. The previous behavior will be restored in version 4.2.1.
The batches requested by pSeven are evaluated in parallel. #207
The
LagrangeMultipliersof a non-solvedOptimizationProblemcan be approximated. The errors raised byLagrangeMultipliersare now raised byPostOptimalAnalysis. #372The jacobian computation in
MDOChainnow uses the minimal jacobians of the disciplines instead of theforce_alloption of the disciplines linearization. #531The jacobian computation in
MDAnow uses the minimal jacobians of the disciplines instead of all couplings for the disciplines linearization. #483The
Scenario.set_differentiation_methodnow casts automatically all float default inputs of the disciplines in its formulation to complex when usingOptimizationProblem.COMPLEX_STEPand setting the optioncast_default_inputs_to_complextoTrue. TheScenario.set_differentiation_methodnow casts automatically the current value of theDesignSpaceto complex when usingOptimizationProblem.COMPLEX_STEP. TheMDODiscipline.disciplinesis now a property that returns the protected attributeMDODiscipline._disciplines. #520The methods
MDODiscipline.add_differentiated_inputsandMDODiscipline.add_differentiated_outputsnow ignore inputs or outputs that are not numeric. #548MLQualityMeasureusesTrueas the default value forfit_transformers, which means that theTransformerinstances attached to the assessedMLAlgoare re-trained on each training subset of the cross-validation partition.MLQualityMeasure.evaluate_kfoldsusesTrueas default value forrandomize, which means that the learning samples attached to the assessedMLAlgoare shuffled before building the cross-validation partition. #553
Version 4.1.0 (2022-10-25)#
Added#
MakeFunctionhas a new optional argumentnames_to_sizesdefining the sizes of the input variables. #252DesignSpace.initialize_missing_current_valuessets the missing current design values to default ones.OptimizationLibraryinitializes the missing design values to default ones before execution. #299Boxplotis a newDatasetPlotto create boxplots from aDataset. #320Scenariooffers an keyword argumentmaximize_objective, previously passed implicitly with**formulation_options. #350A stopping criterion based on KKT condition residual can now be used for all gradient-based solvers. #372
The static N2 chart represents the self-coupled disciplines with blue diagonal blocks. The dynamic N2 chart represents the self-coupled disciplines with colored diagonal blocks. #396
SimpleCachecan be exported to aDataset. #404A warning message is logged when an attempt is made to add an observable twice to an
OptimizationProblemand the addition is cancelled. #409A
SensitivityAnalysiscan be saved on the disk (useSensitivityAnalysis.saveandSensitivityAnalysis.load). ASensitivityAnalysiscan be loaded from the disk with the functionload_sensitivity_analysis. #417The
PCERegressorhas new properties related to the PCE output, namely itsPCERegressor.mean,PCERegressor.covariance,PCERegressor.varianceandPCERegressor.standard_deviation. #428Timercan be used as a context manager to measure the time spent within awithstatement. #431Computation of KKT criteria is made optional. #440
Bievel processes now store the local optimization history of sub-scenarios in ScenarioAdapters. #441
pretty_strconverts an object into an readable string by usingstr. #442The functions
create_linear_approximationandcreate_quadratic_approximationcomputes the first- and second-order Taylor polynomials of anMDOFunction. #451The KKT norm is added to database when computed. #457
MDAs now output the norm of residuals at the end of its execution. #460
pretty_strandpretty_reprsort the elements of collections by default. #469The module
gemseo.algos.doe.qualityoffers features to assess the quality of a DOE:DOEQualityassesses the quality of a DOE fromDOEMeasures; the qualities can be compared with logical operators.compute_phip_criterioncomputes the\varphi_pspace-filling criterion.compute_mindist_criterioncomputes the minimum-distance space-filling criterion.compute_discrepancycomputes different discrepancy criteria.
Fixed#
NLOPT_COBYLA and NLOPT_BOBYQA algorithms may end prematurely in the simplex construction phase, caused by an non-exposed and too small default value of the
stop_crit_n_xalgorithm option. #307The MDANewton MDA does not have anymore a Jacobi step interleaved in-between each Newton step. #400
The
AnalyticDiscipline.default_inputsdo not share anymore the same Numpy array. #406The Lagrange Multipliers computation is fixed for design points close to local optima. #408
gemseo-template-grammar-editornow works with both pyside6 and pyside2. #410DesignSpace.read_from_txtcan read a CSV file with a current value set atNone. #411The argument
messagepassed toDriverLib.init_iter_observerand defining the iteration prefix of theProgressBarworks again; its default value is"...". #416The signatures of
MorrisAnalysis,CorrelationAnalysisandSobolAnalysisare now consistent withSensitivityAnalysis. #424When using a unique process, the observables can now be evaluated as many times as the number of calls to
DOELibrary.execute. #425The
DOELibrary.seedof theDOELibraryis used by default and increments at each execution; pass the integer optionseedtoDOELibrary.executeto use another one, the time of this execution. #426DesignSpace.get_current_valuecorrectly handles the order of thevariable_namesin the case of NumPy array outputs. #433The
SimpleCacheno longer fails when caching an output that is not a Numpy array. #444The first iteration of a
MDAwas not shown in red withMDA.plot_residual_history`. #455The self-organizing map post-processing (
SOM) has been fixed, caused by a regression. #465The couplings variable order, used in the
MDAclass for the adjoint matrix assembly, was not deterministic. #472A multidisciplinary system with a self-coupled discipline can be represented correctly by a coupling graph. #506
Changed#
The
LoggingContextuses the root logger as default value oflogger. #421The
GradientSensitivitypost-processor now includes an option to compute the gradients at the selected iteration to avoid a crash if they are missing. #434pretty_reprconverts an object into an unambiguous string by usingrepr; usepretty_strfor a readable string. #442A global multi-processing manager is now used, this improves the performance of multiprocessing on Windows platforms. #445
The graphs produced by
OptHistoryViewuse the sameOptHistoryView.xlabel. #449Database.notify_store_listenertakes a design vector as input and when not provided the last iteration design vector is employed. The KKT criterion when kkt tolerances are provided is computed at each new storage. #457
Version 4.0.1 (2022-08-04)#
Added#
Fixed#
The MDANewton MDA does not have anymore a Jacobi step interleaved in-between each Newton step. #400
The
AnalyticDiscipline.default_inputsdo not share anymore the same Numpy array. #406The Lagrange Multipliers computation is fixed for design points close to local optima. #408
gemseo-template-grammar-editornow works with both pyside6 and pyside2. #410
Version 4.0.0 (2022-07-28)#
Added#
Concatenatercan now scale the inputs before concatenating them.LinearCombinationis a new discipline computing the weighted sum of its inputs.Splitteris a new discipline splitting whose outputs are subsets of its unique input. #316The transform module in machine learning now features two power transforms:
BoxCoxandYeoJohnson. #341A
MDODisciplinecan now use a pandas DataFrame via itsMDODiscipline.local_data. #58Grammars can add namespaces to prefix the element names. #70
Disciplines and functions, with tests, for the resolution of 2D Topology Optimization problem by the SIMP approach were added in gemseo.problems.topo_opt. In the documentation, 3 examples covering L-Shape, Short Cantilever and MBB structures are also added. #128
A
TransformerFactory. #154The
gemseo.post.radar_chart.RadarChartpost-processor plots the constraints at optimum by default and provides access to the database elements from either the first or last index. #159OptimizationResultcan store the optimum index. #161An
OptimizationProblemcan be reset either fully or partially (database, current iteration, current design point, number of function calls or functions preprocessing).Database.clearcan reset the iteration counter. #188The
Databaseattached to aScenariocan be cleared before running the driver. #193The variables of a
DesignSpacecan be renamed. #204The optimization history can be exported to a
Datasetfrom aScenario. #209A
DatasetPlotcan associate labels to the handled variables for a more meaningful display. #212The bounds of the parameter length scales of a
GaussianProcessRegressorcan be defined at instantiation. #228Observables included in the exported HDF file. #230
ScatterMatrixcan plot a limited number of variables. #236The Sobieski's SSBJ use case can now be used with physical variable names. #242
The coupled adjoint can now account for disciplines with state residuals. #245
Randomized cross-validation can now use a seed for the sake of reproducibility. #246
The
DriverLibnow checks if the optimization or DOE algorithm handles integer variables. #247An
MDODisciplinecan automatically detect JSON grammar files from a user directory. #253Statisticscan now estimate a margin. #255Observables can now be derived when the driver option
eval_obs_jacisTrue(default:False). #256ZvsXYcan add series of points above the surface. #259The number and positions of levels of a
ZvsXYorSurfacescan be changed. #262ZvsXYorSurfacescan use either isolines or filled surfaces. #263A
MDOFunctioncan now be divided by anotherMDOFunctionor a number. #267An
MLAlgocannot fit the transformers during the learning stage. #273The
KLSVDwrapped from OpenTURNS can now use the stochastic algorithms. #274The lower or upper half of the
ScatterMatrixcan be hidden. #301A
Scenariocan use a standardized objective in logs andOptimizationResult. #306Statisticscan compute the coefficient of variation. #325Linescan use an abscissa variable and markers. #328The user can now define a
OTDiracDistributionwith OpenTURNS. #329It is now possible to select the number of processes on which to run an
IDFformulation using the optionn_processes. #369
Fixed#
Ensure that a nested
MDAChainis not detected as a self-coupled discipline. #138The method
MDOCouplingStructure.plot_n2_chartno longer crashes when the provided disciplines have no couplings. #174The broken link to the GEMSEO logo used in the D3.js-based N2 chart is now repaired. #184
An
XLSDisciplineno longer crashes when called using multi-threading. #186The option
mutationof the"DIFFERENTIAL_EVOLUTION"algorithm now checks the correct expected type. #191SensitivityAnalysiscan plot a field with an output name longer than one character. #194Fixed a typo in the
monitoringsection of the documentation referring to the functioncreate_gantt_chartascreate_gannt. #196DOELibraryuntransforms unit samples properly in the case of random variables. #197The string representations of the functions of an
OptimizationProblemimported from an HDF file do not have bytes problems anymore. #201Fix normalization/unnormalization of functions and disciplines that only contain integer variables. #219
Factory.get_options_grammarprovides the same content in the returned grammar and the dumped one. #220Datasetuses pandas to read CSV files more efficiently. #221Missing function and gradient values are now replaced with
numpy.NaNwhen exporting aDatabaseto aDataset. #223The method
OptimizationProblem.get_data_by_namesno longer crashes when bothas_dictandfilter_feasibleare set to True. #226MorrisAnalysiscan again handle multidimensional outputs. #237The
XLSDisciplinetest run no longer leaves zombie processes in the background after the execution is finished. #238An
MDAJacobiinside aDOEScenariono longer causes a crash when a sample raises aValueError. #239AnalyticDiscipline with absolute value can now be derived. #240
The function
hash_data_dictreturns deterministic hash values, fixing a bug introduced in GEMSEO 3.2.1. #251LagrangeMultipliersare ensured to be non negative. #261A
MLQualityMeasurecan now be applied to aMLAlgobuilt from a subset of the input names. #265The given value in
DesignSpace.add_variableis now cast to the propervar_type. #278The
DisciplineJacApprox.compute_approx_jacmethod now returns the correct Jacobian when filtering by indices. With this fix, theMDODiscipline.check_jacobianmethod no longer crashes when using indices. #308An integer design variable can be added with a lower or upper bound explicitly defined as +/-inf. #311
A
PCERegressorcan now be deepcopied before or after the training stage. #340A
DOEScenariocan now be serialized. #358An
AnalyticDisciplinecan now be serialized. #359N2JSONnow works when a coupling variable has no default value, and displays"n/a"as variable dimension.N2JSONnow works when the default value of a coupling variable is an unsized object, e.g.array(1). #388The observables are now computed in parallel when executing a
DOEScenariousing more than one process. #391
Changed#
Fixed Lagrange Multipliers computation for equality active constraints. #345
The
normalizeargument ofOptimizationProblem.preprocess_functionsis now namedis_function_input_normalized. #22The
gemseo.post.radar_chart.RadarChartpost-processor uses all the constraints by default. #159Updating a dictionary of NumPy arrays from a complex array no longer converts the complex numbers to the original data type except if required. #177
The D3.js-based N2 chart can now display the GEMSEO logo offline. #184
The default number of components used by a
DimensionReductiontransformer is based on data and depends on the related technique. #244Classes deriving from
MDODisciplineinherits the input and output grammar files of their first parent. #258The parameters of a
DatasetPlotare now passed at instantiation. #260An
MLQualityMeasureno longer trains anMLAlgoalready trained. #264Accessing a unique entry of a Dataset no longer returns 2D arrays but 1D arrays. Accessing a unique feature of a Dataset no longer returns a dictionary of arrays but an array. #270
MLQualityMeasureno longer refits the transformers with cross-validation and bootstrap techniques. #273Improved the way
xlwingsobjects are handled when anXLSDisciplineruns in multiprocessing, multithreading, or both. #276A
CustomDOEcan be used without specifyingalgo_namewhose default value is"CustomDOE"now. #282The
XLSDisciplineno longer copies the original Excel file when bothcopy_xls_at_setstateandrecreate_book_at_runare set toTrue. #287The post-processing algorithms plotting the objective function can now use the standardized objective when
OptimizationProblem.use_standardized_objectiveisTrue. When post-processing aScenario, the name of a constraint passed to theOptPostProcessorshould be the value ofconstraint_namepassed toScenario.add_constraintor the vale ofoutput_nameifNone. #302An
MDOFormulationnow shows anINFOlevel message when a variable is removed from the design space because it is not an input for any discipline in the formulation. #304It is now possible to carry out a
SensitivityAnalysiswith multiple disciplines. #310The classes of the regression algorithms are renamed as
{Prefix}Regressor. #322The constructor of
AutoPyDisciplinenow allows the user to select a custom name instead of the name of the Python function. #339It is now possible to serialize an
MDOFunction. #342All
MDAalgos now count their iterations starting from0. TheMDA.residual_historyis now a list of normed residuals. The argumentfigsizeinplot_residual_historywas renamed tofig_sizeto be consistent with otherOptPostProcessoralgos. #343
API Changes#
See Upgrading GEMSEO for more information.
Version 3.2.2 (March 2022)#
Fixed#
Cache may not be used because of the way data was hashed.
Version 3.2.1 (November 2021)#
Fixed#
Missing package dependency declaration.
Version 3.2.0 (November 2021)#
Added#
The matrix linear problem solvers libraries are now handled by a Factory and can then be extended by plugins.
MDA warns if it stops when reaching
max_mda_iterbut before reaching the tolerance criteria.The convergence of an MDA can be logged.
Add max line search steps option in scipy L-BFGS-B
An analytical Jacobian can be checked for subsets of input and output names and components.
An analytical Jacobian can be checked from a reference file.
Scipy global algorithms SHGO and differential evolution now handle non linear constraints.
It is now possible to get the number of constraints not satisfied by a design in an OptimizationProblem.
The names of the scalar constraints in an OptimizationProblem can be retrieved as a list.
The dimensions of the outputs for functions in an OptimizationProblem are now available as a dictionary.
The cross-validation technique can now randomize the samples before dividing them in folds.
The Scatter Plot Matrix post processor now allows the user to filter non-feasible points.
OptPostProcessor can change the size of the figures with the method execute().
SensitivityAnalysis can plot indices with values standardized in [0,1].
MorrisAnalysis provides new indices: minimum, maximum and relative standard deviation.
MorrisAnalysis can compute indices normalized with the empirical output bounds.
A button to change the tagged version of GEMSEO is available on the documentation hosted by Read the Docs.
The documentation now includes a link to the gemseo-scilab plugin.
ParetoFront: an example of a BiLevel scenario to compute the Pareto front has been added the examples.
A Pareto front computation example using a bi-level scenario has been added to the documentation.
The documentation now includes hints on how to use the add_observable method.
It is now possible to execute DOEScenarios in parallel on Windows. This feature does not support the use of MemoryFullCache or HDF5Cache on Windows. The progress bar may show duplicated instances during the initialization of each subprocess, in some cases it may also print the conclusion of an iteration ahead of another one that was concluded first. This is a consequence of the pickling process and does not affect the computations of the scenario.
A ParameterSpace can be casted into a DesignSpace.
Plugins can be discovered via setuptools entry points.
A dumped MDODiscipline can now be loaded with the API function import_discipline().
Database has a name used by OptimizationProblem to name the Dataset; this is the name of the corresponding Scenario if any.
The grammar type can be passed to the sub-processes through the formulations.
Scenario, MDOScenario and DOEScenario now include the argument
grammar_type.A GrammarFactory used by MDODiscipline allows to plug new grammars for data checking.
The coupling structure can be directly passed to an MDA.
Database has a name used by OptimizationProblem to name the Dataset; this is the name of the corresponding Scenario if any.
A dumped MDODiscipline can now be loaded with the API function
import_discipline.The name of an MDOScenarioAdapter can be defined at creation.
The AbstractFullCache built from a Dataset has the same name as the dataset.
The HDF5 file generated by HDF5Cache has now a version number.
Changed#
The IO grammar files of a scenario are located in the same directory as its class.
Distribution, ParameterSpace and OpenTURNS use now the logger mainly at debug level.
The grammar types "JSON" and "Simple" are replaced by the classes names "JSONGrammar" and "SimpleGrammar".
RadarChart uses the scientific notation as default format for the grid levels and allows to change the discretization of the grid.
Fixed#
Make OpenTURNS- and pyDOE-based full factorial DOEs work whatever the dimension and number of samples.
The NLopt library wrapper now handles user functions that return ndarrays properly.
Fix bilevel formulation: the strong couplings were used instead of all the couplings when computing the inputs and outputs of the sub-scenarios adapters. Please note that this bug had an impact on execution performance, but had no adverse effect on the bilevel calculations in previous builds.
Bug with the 'sample_x' parameter of the pSeven wrapper.
An OptimizationProblem can now normalize and unnormalize gradient with uncertain variables.
A SurrogateDiscipline can now be instantiated from an MLAlgo saved without its learning set.
Bug with the 'measure_options' arguments of MLAlgoAssessor and MLAlgoSelection.
The constraints names are now correctly formed with the minus sign and offset value if any.
DesignSpace no longer logs an erroneous warning when unnormalizing an unbounded variable.
Resampling-based MLQualityMeasure no longer re-train the original ML model, but a copy.
The computation of a diagonal DOE out of a design space does not crash anymore.
OptimizationProblem no longer logs a warning when using the finite-difference method on the design boundary.
OpenTURNS options are processed correctly when computing a DOE out of a design space.
The Correlations post-processor now sorts labels properly when two or more functions share the same name followed by an underscore.
The ParetoFront post-processor now shows the correct labels in the plot axis.
The Gantt Chart, Basic History, Constraints History and Scatter Plot Matrix pages in the documentation now render the example plots correctly.
Post-processings based on SymLogNorm (matplotlib) now works with Python 3.6.
OptHistoryView no longer raises an exception when the Hessian diagonal contains NaN and skips the Hessian plot.
Bug with inherited docstrings.
The MDO Scenario example subsections are now correctly named.
The data hashing strategy used by HDF5Cache has been corrected, old cache files shall have to be converted, see the FAQ.
Fix levels option for Full-Factorial doe: now this option is taken into account and enables to build an anisotropic sample.
The constraints names are now correctly formed with the minus sign and offset value if any.
Bug with the MATLAB discipline on Windows.
The SurrogateDiscipline can now be serialized.
The name used to export an OptimizationProblem to a Dataset is no longer mandatory.
Bug in the print_configuration method, the configuration table is now shown properly.
Bug with integer elements casted into
The image comparison tests in post/dataset no longer leave the generated files when completed.
Typo in the function name get_scenario_differenciation.
ImportError (backport.unittest_mock) on Python 2.7.
Backward compatibility with the legacy logger named "GEMSEO".
DOE algorithms now have their own JSON grammar files which corrects the documentation of their options.
DOEScenario no longer passes a default number of samples to a DOELibrary for which it is not an option.
Issues when a python module prefixed with
gemseo_is in the current working directory.DesignSpace can now be iterated correctly.
The Jacobian approximated by the finite-difference method is now correct when computed with respect to uncertain variables.
The standard deviation predicted by GaussianProcessRegression is now correctly shaped.
The input data to stored in a HDF5Cache are now hashed with their inputs names.
The hashing strategy used by HDF5Cache no longer considers only the values of the dictionary but also the keys.
Version 3.1.0 (July 2021)#
Changed#
Faster JSON schema and dependency graph creation.
The Gradient Sensitivity post processor is now able to scale gradients.
MemoryFullCache can now use standard memory as well as shared memory.
Sellar1 and Sellar2 compute y_1 and y_2 respectively, for consistency of naming.
Improve checks of MDA structure.
IDF: add option to start at equilibrium with an MDA.
Improve doc of GEMSEO study.
Unified drivers stop criteria computed by GEMSEO (xtol_rel, xtol_abs, ftol_rel, ftom_abs).
SimpleGrammars supported for all processes (MDOChain, MDAChain etc.).
JSONGrammar can be converted to SimpleGrammar.
DiscFromExe can now run executables without using the shell.
It is now possible to add observable variables to the scenario class.
ParetoFront post-processing improvements: legends have been added, it is now possible to hide the non-feasible points in the plots.
The Gradient Sensitivity, Variable Influence and Correlations post processors now show variables names instead of hard-coded names.
The Correlations post processor now allows the user to select a subset of functions to plot.
The Correlations post processor now allows the user to select the figure size.
Documentation improvements.
Added#
Support for Python 3.9.
Support for fastjsonschema up to 2.15.1.
Support for h5py up to 3.2.1.
Support for numpy up to 1.20.3.
Support for pyxdsm up to 2.2.0.
Support for scipy to 1.6.3.
Support for tqdm up to 4.61.0.
Support for xdsmjs up to 1.0.1.
Support for openturns up to 1.16.
Support for pandas up to 1.2.4.
Support for scikit-learn up to 0.24.2.
Support for openpyxl up to 3.0.7.
Support for nlopt up to 2.7.0.
Constraint aggregation methods (KS, IKS, max, sum).
N2: an interactive web N2 chart allowing to expand or collapse the groups of strongly coupled disciplines.
Uncertainty: user interface for easy access.
Sensitivity analysis: an abstract class with sorting, plotting and comparison methods, with a dedicated factory and new features (correlation coefficients and Morris indices).
Sensitivity analysis: examples.
Concatenater: a new discipline to concatenate inputs variables into a single one.
Gantt chart generation to visualize the disciplines execution time.
An interactive web N2 chart allowing to expand or collapse the groups of strongly coupled disciplines.
Support pSeven algorithms for single-objective optimization.
DOELibrary.compute_doe computes a DOE based on a design space.
Fixed#
The greatest value that OT_LHSC can generate must not be 0.5 but 1.
Internally used HDF5 file left open.
The Scatter Plot Matrix post processor now plots the correct values for a subset of variables or functions.
MDA Jacobian fixes in specific cases (self-coupled, no strong couplings, etc).
Strong coupling definition.
Bi-level formulation implementation, following the modification of the strong coupling definition.
Graphviz package is no longer mandatory.
XDSM pdf generation bug.
DiscFromExe tests do not fail anymore under Windows, when using a network directory for the pytest base temporary directory.
No longer need quotation marks on gemseo-study string option values.
XDSM file generated with the right name given with outfilename.
SellarSystem works now in the Sphinx-Gallery documentation (plot_sellar.py).
Version 3.0.3 (May 2021)#
Changed#
Documentation fixes and improvements.
Version 3.0.2 (April 2021)#
Changed#
First open source release!
Fixed#
Dependency version issue for python 3.8 (pyside2).
Version 3.0.1 (April 2021)#
Fixed#
Permission issue with a test.
Robustness of the excel discipline wrapper.
Version 3.0.0 (January 2021)#
Added#
Licenses materials.
Changed#
Renamed gems package to gemseo.
Removed#
OpenOPT backend which is no longer maintained and has features overlap with other backends.
Fixed#
Better error handling of the study CLI with missing latex tools.
Version 2.0.1 (December 2020)#
Fixed#
Improper configuration of the logger in the MDAChain test leading to GEMS crashes if the user has not write permission on the GEMS installation directory.
Max versions of h5py and Openturns defined in environment and configuration files to prevent incorrect environments due to API incompatibilities.
Max version of numpy defined in order to avoid the occurrence of a fmod/OpenBlas bug with Windows 10 2004 (https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html).
Version 2.0.0 (July 2020)#
Added#
Support for Python3
String encoding: all the strings shall now be encoded in unicode. For Python 2 users, please read carefully the Python2 and Python3 compatibility note to migrate your existing GEMS scripts.
Documentation: gallery of examples and tutorials + cheat sheet
New conda file to automatically create a Python environment for GEMS under Linux, Windows and Mac OS.
~35% improved performance on Python3
pyXDSM to generate latex/PDF XDSM
Display XDSM directly in the browser
Machine learning capabilities based on scikit-learn, OpenTURNS and scipy: clustering, classification, regression, dimension reduction, data scaling, quality measures, algorithm calibration.
Uncertainty package based on OpenTURNS and scipy: distributions, uncertain space, empirical and parametric statistics, Sobol' indices.
AbstractFullCache to cache inputs and outputs in memory
New Dataset class to store data from numpy arrays, file, Database and AbstractFullCache; Unique interface to machine learning and uncertainty algorithms.
Cache post-processing via Dataset
Make a discipline from an executable with a GUI
Excel-based discipline
Prototype a MDO study without writing any code and generating N2 and XDSM diagrams
Automatic finite difference step
Post-optimal analysis to compute the jacobian of MDO scenarios
Pareto front: computation and plot
New scalable problem from Tedford and Martins
New plugin mechanism for extension of features
Changed#
Refactored and much improved documentation
Moved to matplotlib 2.x and 3.x
Support for scipy 1.x
Improved API
Improved linear solvers robustness
Improved surrogate models based on machine learning capabilities and Dataset class.
Improved scalable models
Improved BasicHistory: works for design variables also
Improved XDSM diagrams for MDAChain
Improved BiLevel when no strong coupling is present
Improved overall tests
Fixed#
Bug in GradientSensitivity
Bug in AutoPyDiscipline for multiple returns and non pep8 code
Version 1.3.2 (December 2019)#
Fixed#
Bugfix in Discipline while updating data from the cache
Version 1.3.1 (July 2019)#
Added#
COBYLA handle NaNs values and manages it to backtrack. Requires specific mod of COBYLA by IRT
OptHistoryView and BasicHistory handle NaNs values
BasicHistory works for design variable values
Changed#
Improved error message when missing property in JSONGrammars
Improved imports to handle multiple versions of sklearn, pandas and sympy (thanks Damien Guenot)
Fixed#
Bug in Caching and Discipline for inouts (Thanks Romain Olivanti)
Bug in MDASequential convergence history
Version 1.3.0 (June 2019)#
Added#
Refactored and much improved documentation
All algorithms, MDAs, Surrogates, formulations options are now automatically documented in the HTML doc
Enhanced API: all MDO scenarios can be fully configured and run from the API
AutoPyDiscipline: faster way to wrap a Python function as a discipline
Surrogate models: Polynomial Chaos from OpenTurns
Surrogate model quality metrics:Leave one out, Q2, etc.
MDAs can handle self-coupled disciplines (inputs that are also outputs)
Lagrange Multipliers
Multi-starting point optimization as a bi-level scenario using a DOE
New aerostructure toy MDO problem
Changed#
Bi-Level formulation can now handle black box optimization scenarios, and external MDAs
Improve Multiprocessing and multithreading parallelism handling (avoid deadlocks with caches)
Improve performance of input / output data checks, x13 faster JSONGrammars
Improve performance of disciplines execution: avoid memory copies
Enhanced Scalable discipline, DOE is now based on a driver and inputs are read from a HDF5 cache like surrogate models
More readable N2 graph
Improved logging: fix issue with output files
Improved progress bar and adapt units for runtime prediction
NLOPT Cobyla: add control for init step of the DOE (rho)
Surrogate GPR: add options handling
Version 1.2.1 (August 2018)#
Added#
Handle integer variables in DOEs
Changed#
Improve performance of normalization/unnormalization
Improve x_xstar post processing to display the optimum
Fixed#
Issue to use external optimizers in a MDOScenario
Version 1.2.0 (July 2018)#
Added#
New API to ease the scenario creation and use by external platforms
mix parallelism multithreading / multiprocessing
much improved and unified plugin system with factories for Optimizers, DOE, MDAs, Formulations, Disciplines, Surrogates
Surrogate models interfaces
MDAJacobi is now much faster thanks to a new acceleration set of methods
Changed#
HTML documentation
Small improvements
Fixed#
Many bugs
Version 1.1.0 (April 2018)#
Added#
Mix finite differences in the discipline derivation and analytical jacobians or complex step to compute chain rule or adjoint method when not all disciplines' analytical derivatives are available
Ability to handle design spaces with integer variables
Analytic discipline based on symbolic calculation to easily create disciplines from analytic formulas
A scalable surrogate approximation of a discipline to benchmark MDO formulations
A HDF cache (= recorder) for disciplines to store all executions on the disk
The P-L-BFGS-B algorithm interface, a variant of LBFGSB with preconditioning coded in Python
Parallel (multiprocessing and / or multithreading) execution of disciplines and or call to functions
New constraints plot visualizations (radar chart) and constraints plot with values
Visualization to plot the distance to the best value in log scale ||x-x*||
Possibility to choose to normalize the design space or not for each variable
IDF improved for weakly coupled problems
On the fly backup of the optimization history (HDF5), in "append" mode
We can now monitor the convergence on the fly by creating optimization history plots at each iteration
Famous N2 plot in the CouplingStructure
Sphinx generated documentation in HTML (open doc/index.html), with:
GEMS in a nutshell tutorial
Discipline integration tutorial
Post processing description
GEMS architecture description
MDO formulations description
MDAs
Changed#
Improved automatically finding the best point in an optimization history
Improved callback functions during optimization / DOE
Improved stop criteria for optimization
Improved progress bar
Improved LGMRES solver for MDAs when using multiple RHS (recycle Krylov subspaces to accelerate convergence)
Fixed#
Many bugs
Version 1.0.0 (December 2016)#
Added#
Design of Experiment (DOE) capabilities from pyDOE, OpenTURNS or a custom samples set
Full differentiation of the process is available:
analytical gradient based optimization
analytical Newton type coupling solver for MDA (Multi Disciplinary Analyses)
analytical derivation of the chains of disciplines (MDOChain) via the chain rule
Post processing of optimization history: many plots to view the constraints, objective, design variables
More than 10 MDA (coupled problems) solver available, some gradient based (quasi newton) and hybrid multi-step methods (SequentialMDA) !
OptimizationProblem and its solution can be written to disk and post processed afterwards
Handling of DOE and optimization algorithm options via JSON schemas
Introduced an OptimizationProblem class that is created by the MDOFormulation and passed to an algorithm for resolution
Serialization mechanism for MDODiscipline and subclasses (write objects to disk)
Intensive testing: 500 tests and 98 % line coverage (excluding third party source)
Improved code coverage by tests from 95% to 98% and all modules have a coverage of at least 95%
Reduced pylint warnings from 800 to 40 !
Changed#
Code architecture refactoring for below items
Modularized post processing
Refactored algorithms part with factories
Removed dependency to json_schema_generator library, switched to GENSON (embedded with MIT licence)
Moved from JsonSchema Draft 3 to Draft 4 standard
Refactored the connection between the functions and the optimizers
Refactored MDOScenario
Refactored IDF formulation
Refactored Bilevel formulation
Refactored MDAs and introduced the CouplingStructure class
Refactored the DataProcessor for data interface with workflow engines
Refactored Sobieski use case to improve code quality
Included AGI remarks corrections on code style and best practices
Version 0.1.0 (April 2016)#
Added#
Basic MDO formulations: MDF, IDF, Bilevel formulations
Some optimization history views for convergence monitoring of the algorithm
Optimization algorithms: Scipy, OpenOPT, NLOPT
Possible export of the optimization history to the disk
Complex step and finite differences optimization
Benchmark cases:
Sobieski's Supersonic Business Jet MDO case
Sellar
Propane