Upgrading GEMSEO¶
This page contains the history of the breaking changes in GEMSEO. The codes using those shall be updated according to the target GEMSEO version.
5.0.0¶
End user API¶
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.
Surrogate models¶
The high-level functions defined in
gemseo.mlearning.apihave been moved togemseo.mlearning.stieltjesandstrategyare no longer arguments ofPCERegressor.Rename
MLAlgo.savetoMLAlgo.to_pickle.The name of the method to evaluate the quality measure is passed to
MLAlgoAssessorwith the argumentmeasure_evaluation_method; any of ``[“LEARN”, “TEST”, “LOO”, “KFOLDS”, “BOOTSTRAP”].The name of the method to evaluate the quality measure is passed to
MLAlgoSelectionwith the argumentmeasure_evaluation_method; any of ``[“LEARN”, “TEST”, “LOO”, “KFOLDS”, “BOOTSTRAP”].The name of the method to evaluate the quality measure is passed to
MLAlgoCalibrationwith the argumentmeasure_evaluation_method; any of ``[“LEARN”, “TEST”, “LOO”, “KFOLDS”, “BOOTSTRAP”].The names of the methods to evaluate a quality measure can be accessed with
MLAlgoQualityMeasure.EvaluationMethod. #464Rename
gemseo.mlearning.qual_measuretogemseo.mlearning.quality_measures.Rename
gemseo.mlearning.qual_measure.silhouettetogemseo.mlearning.quality_measures.silhouette_measure.Rename
gemseo.mlearning.clustertogemseo.mlearning.clustering.Rename
gemseo.mlearning.cluster.clustertogemseo.mlearning.clustering.clustering.Rename
gemseo.mlearning.transformtogemseo.mlearning.transformers. #701The enumeration
RBFRegressor.Functionreplaced the constants:RBFRegressor.MULTIQUADRICRBFRegressor.INVERSE_MULTIQUADRICRBFRegressor.GAUSSIANRBFRegressor.LINEARRBFRegressor.CUBICRBFRegressor.QUINTICRBFRegressor.THIN_PLATERBFRegressor.AVAILABLE_FUNCTIONS
Post processing¶
The visualization
Linesuses a specific tuple (color, style, marker, name) per line by default. #677YvsXno longer has the argumentsx_compandy_comp; the components have to be passed asx=("variable_name", variable_component).Scatterno longer has the argumentsx_compandy_comp; the components have to be passed asx=("variable_name", variable_component).ZvsXYno longer has the argumentsx_comp,y_compandz_comp; the components have to be passed asx=("variable_name", variable_component). #722RobustnessQuantifier.compute_approximationusesNoneas default value forat_most_niter.HessianApproximation.get_x_grad_historyusesNoneas default value forlast_iterandat_most_niter.HessianApproximation.build_approximationusesNoneas default value forat_most_niter.HessianApproximation.build_inverse_approximationusesNoneas default value forat_most_niter.LSTSQApprox.build_approximationusesNoneas default value forat_most_niter. #750PostFactory.createusesclass_name, thenopt_problemand**optionsas arguments. #752Dataset.plotno longer refers to specific dataset plots, as ScatterMatrix, lines, curves…Dataset.plotnow refers to the standard pandas plot method. To retrieve ready-to-use plots, please check ingemseo.post.dataset. #257
MDO processes¶
Renamed
InvalidDataExceptiontoInvalidDataError. #23Moved the
MatlabDisciplineto the plugin gemseo-matlab.Rename
MakeFunctiontoMDODisciplineAdapter.In
MDODisciplineAdapter, replace the argumentmdo_functionof typeMDODisciplineAdapterGeneratorby the argumentdisciplineof typeMDODiscipline.Rename
MDOFunctionGeneratortoMDODisciplineAdapterGenerator. #412Rename
AbstractCache.export_to_datasettoAbstractCache.to_dataset.Rename
AbstractCache.export_to_ggobitoAbstractCache.to_ggobi.Rename
Scenario.export_to_datasettoScenario.to_dataset.Rename
MDODiscipline._default_inputstoMDODiscipline.default_inputs.Rename
MDODiscipline.serializetoMDODiscipline.to_pickle.Rename
MDODiscipline.deserializetoMDODiscipline.from_picklewhich is a static method.Rename
ScalabilityResult.savetoScalabilityResult.to_pickle.Rename
BaseGrammar.convert_to_simple_grammartoBaseGrammar.to_simple_grammar.Removed the method
_update_grammar_inputfromScenario,Scenario._update_input_grammarshall be used instead. #558Scenario.xdsmizeRename
latex_outputtosave_pdf.Rename
html_outputtosave_html.Rename
json_outputtosave_json.Rename
open_browsertoshow_html.Rename
outfilenametofile_nameand do not use suffix.Rename
outdirtodirectory_path.
XDSMizerRename
latex_outputtosave_pdf.Rename
open_browsertoshow_html.Rename
output_dirtodirectory_path.Rename
XDSMizer.outdirtoXDSMizer.directory_path.Rename
XDSMizer.outfilenametoXDSMizer.json_file_name.Rename
XDSMizer.latex_outputtoXDSMizer.save_pdf.
XDSMizer.monitorRename
latex_outputtosave_pdf.Rename
outfilenametofile_nameand do not use suffix.Rename
outdirtodirectory_path.
XDSMizer.runRename
latex_outputtosave_pdf.Rename
html_outputtosave_html.Rename
json_outputtosave_json.Rename
open_browsertoshow_html.Rename
outfilenametofile_nameand do not use suffix.Rename
outdirtodirectory_pathand use"."as default value.
StudyAnalysis.generate_xdsmRename
latex_outputtosave_pdf.Rename
open_browsertoshow_html.Rename
output_dirtodirectory_path.
MDOCouplingStructure.plot_n2_chart: renameopen_browsertoshow_html.N2HTML: renameopen_browsertoshow_html.generate_n2_plotrenameopen_browsertoshow_html.Scenario.xdsmize: renameprint_statusestolog_workflow_status.XDSMizer.monitor: renameprint_statusestolog_workflow_status.Rename
XDSMizer.print_statusestoXDSMizer.log_workflow_status.The CLI of the
StudyAnalysisuses the shortcut-pfor the option--save_pdf. #564Replace the argument
force_no_execbyexecuteinMDODiscipline.linearizeandJacobianAssembly.total_derivatives.Rename the argument
force_alltocompute_all_jacobiansinMDODiscipline.linearize. #644The names of the algorithms proposed by
CorrelationAnalysismust be written in capital letters; seeCorrelationAnalysis.Method. #654 #464DOEScenariono longer has aseedattribute. #621Remove
AutoPyDiscipline.get_return_spec_fromstr. #661Remove
Scenario.get_optimum; useScenario.optimization_resultinstead. #770Rename
AutoPyDiscipline.in_namestoAutoPyDiscipline.input_names.Rename
AutoPyDiscipline.out_namestoAutoPyDiscipline.output_names. #661Replaced the module
parallel_execution.pyby the packageparallel_execution.Renamed the class
ParallelExecutiontoCallableParallelExecution.Renamed the function
workertoexecute_workers.Renamed the argument
input_valuestoinputs.Removed the
ParallelExecutionmethods:_update_local_objects_run_task_is_worker_filter_ordered_outputs_run_task_by_index
ParallelExecutionand its derive classes always take a collection of workers and no longer a single worker. #668Removed the property
penultimate_entryfromSimpleCache. #480Rename
GSNewtonMDAtoMDAGSNewton. #703The enumeration
MDODiscipline.ExecutionStatusreplaced the constants:MDODiscipline.STATUS_VIRTUALMDODiscipline.STATUS_PENDINGMDODiscipline.STATUS_DONEMDODiscipline.STATUS_RUNNINGMDODiscipline.STATUS_FAILEDMDODiscipline.STATUS_LINEARIZEMDODiscipline.AVAILABLE_STATUSES
The enumeration
MDODiscipline.GrammarTypereplaced the constants:MDODiscipline.JSON_GRAMMAR_TYPEMDODiscipline.SIMPLE_GRAMMAR_TYPE
The enumeration
MDODiscipline.CacheTypereplaced the constants:MDODiscipline.SIMPLE_CACHEMDODiscipline.HDF5_CACHEMDODiscipline.MEMORY_FULL_CACHEThe value
Noneindicating no cache is replaced byMDODiscipline.CacheType.NONE
The enumeration
MDODiscipline.ReExecutionPolicyreplaced the constants:MDODiscipline.RE_EXECUTE_DONE_POLICYMDODiscipline.RE_EXECUTE_NEVER_POLICY
The enumeration
derivation_modes.ApproximationModereplaced the constants:derivation_modes.FINITE_DIFFERENCESderivation_modes.COMPLEX_STEPderivation_modes.AVAILABLE_APPROX_MODES
The enumeration
derivation_modes.DerivationModereplaced the constants:derivation_modes.DIRECT_MODEderivation_modes.REVERSE_MODEderivation_modes.ADJOINT_MODEderivation_modes.AUTO_MODEderivation_modes.AVAILABLE_MODES
The enumeration
JacobianAssembly.DerivationModereplaced the constants:JacobianAssembly.DIRECT_MODEJacobianAssembly.REVERSE_MODEJacobianAssembly.ADJOINT_MODEJacobianAssembly.AUTO_MODEJacobianAssembly.AVAILABLE_MODES
The enumeration
MDODiscipline.ApproximationModereplaced the constants:MDODiscipline.FINITE_DIFFERENCESMDODiscipline.COMPLEX_STEPMDODiscipline.APPROX_MODES
The enumeration
MDODiscipline.LinearizationModereplaced the constants:MDODiscipline.FINITE_DIFFERENCEMDODiscipline.COMPLEX_STEPMDODiscipline.AVAILABLE_APPROX_MODES
The high-level functions defined in
gemseo.problems.scalable.data_driven.apihave been moved togemseo.problems.scalable.data_driven. #707Removed
StudyAnalysis.AVAILABLE_DISTRIBUTED_FORMULATIONS.The enumeration
DiscFromExe.Parserreplaced the constants:DiscFromExe.ParsersDiscFromExe.Parsers.KEY_VALUE_PARSERDiscFromExe.Parsers.TEMPLATE_PARSER
The enumeration
MatlabEngine.ParallelTypereplaced:matlab_engine.ParallelType
MDOFunciton.check_gradargumentmethodwas renamed toapproximation_modeand now expects to be passed anApproximationMode.For
GradientApproximatorand its derived classes:Renamed the class attribute
ALIASto_APPROXIMATION_MODE,Renamed the instance attribute
_par_argsto_parallel_args,Renamed
GradientApproximationFactorytoGradientApproximatorFactoryand moved it to the modulegradient_approximator_factory.py,Moved the duplicated functions to
error_estimators.py:finite_differences.comp_best_stepfinite_differences.compute_truncature_errorfinite_differences.compute_cancellation_errorfinite_differences.approx_hessderivatives_approx.comp_best_stepderivatives_approx.compute_truncature_errorderivatives_approx.compute_cancellation_errorderivatives_approx.approx_hesscomp_best_stepwas renamed tocompute_best_stepapprox_hesswas renamed tocompute_hessian_approximation
To update a grammar from data names that shall be validated against Numpy arrays, the
updatemethod is now replaced by the methodupdate_from_names.To update a
JSONGrammarfrom a JSON schema, theupdatemethod is now replaced by the methodupdate_from_schema.Renamed
JSONGrammar.writetoJSONGrammar.to_file.Renamed the argument
schema_pathtofile_pathfor theJSONGrammarconstructor.To update a
SimpleGrammaror aJSONGrammarfrom a names and types, theupdatemethod is now replaced by the methodupdate_from_types. #741Renamed
HDF5Cache.hdf_node_nametoHDF5Cache.hdf_node_path.toleranceandnameare the first instantiation arguments ofHDF5Cache, for consistency with other caches.Added the arguments
newton_linear_solverandnewton_linear_solver_optionsto the constructor ofMDANewtonRaphson. These arguments are passed to the linear solver of the Newton solver used to solve the MDA coupling. #715MDA: Remove the method
set_residuals_scaling_options. #780MDA: Remove the attributes_scale_residuals_with_coupling_sizeand_scale_residuals_with_first_normand add thescalingand_scaling_dataattributes.The module
gemseo.problems.scalable.parametric.studyhas been removed. #717
Optimisation & DOE¶
Moved the library of optimization algorithms
PSevenOptto the plugin gemseo-pseven.Moved the
PDFOwrapper to the plugin gemseo-pdfo.Removed the useless exception
NloptRoundOffException.Rename
MDOFunction.serializetoMDOFunction.to_pickle.Rename
MDOFunction.deserializetoMDOFunction.from_picklewhich is a static method.DesignSpacehas a class methodDesignSpace.from_fileand an instance methodDesignSpace.to_file.read_design_spacecan read an HDF file.Rename
DesignSpace.export_hdftoDesignSpace.to_hdf.Rename
DesignSpace.import_hdftoDesignSpace.from_hdfwhich is a class method.Rename
DesignSpace.export_to_txttoDesignSpace.to_csv.Rename
DesignSpace.read_from_txttoDesignSpace.from_csvwhich is a class method.Rename
Database.export_hdftoDatabase.to_hdf.Replace
Database.import_hdfby the class methodDatabase.from_hdfand the instance methodDatabase.update_from_hdf.Rename
Database.export_to_ggobitoDatabase.to_ggobi.Rename
Database.import_from_opendacetoDatabase.update_from_opendace.Databaseno longer has the argumentinput_hdf_file; usedatabase = Database.from_hdf(file_path)instead.Rename
OptimizationProblem.export_hdftoOptimizationProblem.to_hdf.Rename
OptimizationProblem.import_hdftoOptimizationProblem.from_hdfwhich is a class method.Rename
OptimizationProblem.export_to_datasettoOptimizationProblem.to_dataset.The argument
export_hdfofwrite_design_spacehas been removed.Rename
export_design_spacetowrite_design_space.DesignSpaceno longer hasfile_pathas argument; usedesign_space = DesignSpace.from_file(file_path)instead. #450Rename
iks_aggtocompute_iks_aggRename
iks_agg_jac_vtocompute_total_iks_agg_jacRename
ks_aggtocompute_ks_aggRename
ks_agg_jac_vtocompute_total_ks_agg_jacRename
max_aggtocompute_max_aggRename
max_agg_jac_vtocompute_max_agg_jacRename
sum_square_aggtocompute_sum_square_aggRename
sum_square_agg_jac_vtocompute_total_sum_square_agg_jacRename the first positional argument
constr_data_namesofConstraintAggregationtoconstraint_names.Rename the second positional argument
method_nameofConstraintAggregationtoaggregation_function.Rename the first position argument
constr_idofOptimizationProblem.aggregate_constrainttoconstraint_index.Rename the aggregation methods
"pos_sum","sum"and"max"to"POS_SUM","SUM"and"MAX".Rename
gemseo.algos.driver_libtogemseo.algos.driver_library.Rename
DriverLibtoDriverLibrary.Rename
gemseo.algos.algo_libtogemseo.algos.algorithm_library.Rename
AlgoLibtoAlgorithmLibrary.Rename
gemseo.algos.doe.doe_libtogemseo.algos.doe.doe_library.Rename
gemseo.algos.linear_solvers.linear_solver_libtogemseo.algos.linear_solvers.linear_solver_library.Rename
LinearSolverLibtoLinearSolverLibrary.Rename
gemseo.algos.opt.opt_libtogemseo.algos.opt.optimization_library. #702The enumeration
DriverLib.DifferentiationMethodreplaced the constants:DriverLib.USER_DEFINED_GRADIENTDriverLib.DIFFERENTIATION_METHODS
The enumeration
DriverLib.ApproximationModereplaced the constants:DriverLib.COMPLEX_STEP_METHODDriverLib.FINITE_DIFF_METHOD
The enumeration
OptProblem.ApproximationModereplaced the constants:OptProblem.USER_DEFINED_GRADIENTOptProblem.DIFFERENTIATION_METHODSOptProblem.NO_DERIVATIVESOptProblem.COMPLEX_STEP_METHODOptProblem.FINITE_DIFF_METHOD
The method
Scenario.set_differentiation_methodno longer acceptsNonefor the argumentmethod.The enumeration
OptProblem.ProblemTypereplaced the constants:OptProblem.LINEAR_PBOptProblem.NON_LINEAR_PBOptProblem.AVAILABLE_PB_TYPES
The enumeration
DesignSpace.DesignVariableTypereplaced the constants:DesignSpace.FLOATDesignSpace.INTEGERDesignSpace.AVAILABLE_TYPES
The namedtuple
DesignSpace.DesignVariablereplaced:design_space.DesignVariable
The enumeration
MDOFunction.ConstraintTypereplaced the constants:MDOFunction.TYPE_EQMDOFunction.TYPE_INEQ
The enumeration
MDOFunction.FunctionTypereplaced the constants:MDOFunction.TYPE_EQMDOFunction.TYPE_INEQMDOFunction.TYPE_OBJMDOFunction.TYPE_OBSThe value
""indicating no function type is replaced byMDOFunction.FunctionType.NONE
The enumeration
LinearSolver.Solverreplaced the constants:LinearSolver.LGMRESLinearSolver.AVAILABLE_SOLVERS
The enumeration
ConstrAggregationDisc.EvaluationFunctionreplaced:constraint_aggregation.EvaluationFunction
Use
Trueas default value ofeval_observablesinOptimizationProblem.evaluate_functions.Rename
outvarstooutput_namesandargstoinput_namesinMDOFunctionand its subclasses (names of arguments, attributes and methods).MDOFunction.has_jacis a property.Remove
MDOFunction.has_dim.Remove
MDOFunction.has_outvars.Remove
MDOFunction.has_expr.Remove
MDOFunction.has_args.Remove
MDOFunction.has_f_type.Rename
DriverLib.is_algo_requires_gradtoDriverLibrary.requires_gradient.Rename
ConstrAggegationDisctoConstraintAggregation. #713Remove
Database.KEYSSEPARATOR.Remove
Database._format_design_variable_names.Remove
Database.get_value; useoutput_value = database[x_vect]instead ofoutput_value = database.get_value(x_vect).Remove
Database.contains_x; usex_vect in databaseinstead ofdatabase.contains_x(x_vect).Remove
Database.contains_dataname; useoutput_name in database.output_namesinstead ofdatabase.contains_dataname(output_name).Remove
Database.set_dv_names; usedatabase.input_namesto access the input names.Remove
Database.is_func_grad_history_empty; usedatabase.check_output_history_is_emptyinstead with any output name.Rename
Database.get_hashed_keytoDatabase.get_hashable_ndarray.Rename
Database.get_all_data_namestoDatabase.get_function_names.Rename
Database.missing_value_tagtoDatabase.MISSING_VALUE_TAG.Rename
Database.get_x_by_itertoDatabase.get_x_vect.Rename
Database.clean_from_iteratetoDatabase.clear_from_iteration.Rename
Database.get_max_iterationtoDatabase.n_iterations.Rename
Database.notify_newiter_listenerstoDatabase.notify_new_iter_listeners.Rename
Database.get_func_historytoDatabase.get_function_history.Rename
Database.get_func_grad_historytoDatabase.get_gradient_history.Rename
Database.get_x_historytoDatabase.get_x_vect_history.Rename
Database.get_last_n_xtoDatabase.get_last_n_x_vect.Rename
Database.get_x_at_iterationtoDatabase.get_x_vect.Rename
Database.get_index_oftoDatabase.get_iteration.Rename
Database.get_f_of_xtoDatabase.get_function_value.Rename the argument
all_function_namestofunction_namesinDatabase.to_ggobi.Rename the argument
design_variable_namestoinput_namesinDatabase.to_ggobi.Rename the argument
add_dvtowith_x_vectinDatabase.get_history_array.Rename the argument
values_dicttooutput_valueinDatabase.store.Rename the argument
x_vecttoinput_value.Rename the argument
listener_functofunction.Rename the arguments
funcname,fnameanddata_nametofunction_name.Rename the arguments
functionsandnamestofunction_names.Rename the argument
namestooutput_namesinDatabase.filter.Rename the argument
x_histtoadd_x_vect_historyinDatabase.get_function_historyandDatabase.get_gradient_history.Database.get_x_vectstarts counting the iterations at 1.Database.clear_from_iterationstarts counting the iterations at 1.RadarChart,TopologyViewandGradientSensitivitystarts counting the iterations at 1.The input history returned by
Database.get_gradient_historyandDatabase.get_function_historyis now a 2D NumPy array.Remove
Database.n_new_iteration.Remove
Database.reset_n_new_iteration.Remove the argument
reset_iteration_counterinDatabase.clear.The
Databaseno longer uses the tag"Iter".The
Databaseno longer uses the notion ofstacked_data. #753Remove
MDOFunction.concatenate; please useConcatenate.Remove
MDOFunction.convex_linear_approx; please useConvexLinearApprox.Remove
MDOFunction.linear_approximation; please usecompute_linear_approximation.Remove
MDOFunction.quadratic_approx; please usecompute_quadratic_approximation.Remove
MDOFunction.restrict; please useFunctionRestriction.Remove
DOELibrary.compute_phip_criteria; please usecompute_phip_criterion.
UQ¶
The high-level functions defined in
gemseo.uncertainty.apihave been moved togemseo.uncertainty.Rename
SensitivityAnalysis.export_to_datasettoSensitivityAnalysis.to_dataset.Rename
SensitivityAnalysis.savetoSensitivityAnalysis.to_pickle.Rename
SensitivityAnalysis.loadtoSensitivityAnalysis.from_picklewhich is a class method.ComposedDistributionusesNoneas value for independent copula.ParameterSpaceno longer uses acopulapassed at instantiation but toParameterSpace.build_composed_distribution.SPComposedDistributionraises an error when set up with a copula different fromNone. #655The enumeration
RobustnessQuantifier.Approximationreplaced the constant:RobustnessQuantifier.AVAILABLE_APPROXIMATIONS
The enumeration
OTDistributionFitter.DistributionNamereplaced the constants:OTDistributionFitter.AVAILABLE_DISTRIBUTIONSOTDistributionFitter._AVAILABLE_DISTRIBUTIONS
The enumeration
OTDistributionFitter.FittingCriterionreplaced the constants:OTDistributionFitter.AVAILABLE_FITTING_TESTSOTDistributionFitter._AVAILABLE_FITTING_TESTS
The enumeration
OTDistributionFitter.SignificanceTestreplaced the constant:OTDistributionFitter.SIGNIFICANCE_TESTS
The enumeration
ParametricStatistics.DistributionNamereplaced the constant:ParametricStatistics.AVAILABLE_DISTRIBUTIONS
The enumeration
ParametricStatistics.FittingCriterionreplaced the constant:ParametricStatistics.AVAILABLE_FITTING_TESTS
The enumeration
ParametricStatistics.SignificanceTestreplaced the constant:ParametricStatistics.SIGNIFICANCE_TESTS
The enumeration
SobolAnalysis.Algorithmreplaced the constant:SobolAnalysis.Algorithm.SaltellibySobolAnalysis.Algorithm.SALTELLISobolAnalysis.Algorithm.JansenbySobolAnalysis.Algorithm.JANSENSobolAnalysis.Algorithm.MauntzKucherenkobySobolAnalysis.Algorithm.MAUNTZ_KUCHERENKOSobolAnalysis.Algorithm.MartinezbySobolAnalysis.Algorithm.MARTINEZ
The enumeration
SobolAnalysis.Methodreplaced the constant:SobolAnalysis.Method.firstbySobolAnalysis.Method.FIRSTSobolAnalysis.Method.totalbySobolAnalysis.Method.TOTAL
The enumeration
ToleranceInterval.ToleranceIntervalSidereplaced:distribution.ToleranceIntervalSide
The namedtuple
ToleranceInterval.Boundsreplaced:distribution.Bounds
Remove
n_legend_colsinParametricStatistics.plot_criteria.Rename
variables_names,variables_sizesandvariables_typestovariable_names,variable_sizesandvariable_types.Rename
inputs_namesandoutputs_namestoinput_namesandoutput_names.Rename
constraints_namestoconstraint_names.Rename
functions_namestofunction_names.Rename
inputs_sizesandoutputs_sizestoinput_sizesandoutput_sizes.Rename
disciplines_namestodiscipline_names.Rename
jacobians_namestojacobian_names.Rename
observables_namestoobservable_names.Rename
columns_namestocolumn_names.Rename
distributions_namestodistribution_names.Rename
options_valuestooption_values.Rename
constraints_valuestoconstraint_values.Rename
jacobians_valuestojacobian_values.SobolAnalysis.AVAILABLE_ALGOSno longer exists; use theenumSobolAnalysis.Algorithminstead.MLQualityMeasure.evaluateno longer exists; please use eitherMLQualityMeasure.evaluate_learn,MLQualityMeasure.evaluate_test,MLQualityMeasure.evaluate_kfolds,MLQualityMeasure.evaluate_looandMLQualityMeasure.evaluate_bootstrap.Remove
OTComposedDistribution.AVAILABLE_COPULA_MODELS; please useOTComposedDistribution.CopulaModel.Remove
ComposedDistribution.AVAILABLE_COPULA_MODELS; please useComposedDistribution.CopulaModel.Remove
SPComposedDistribution.AVAILABLE_COPULA_MODELS; please useSPComposedDistribution.CopulaModel.Remove
ComposedDistribution.INDEPENDENT_COPULA; please useComposedDistribution.INDEPENDENT_COPULA.Remove
SobolAnalysis.AVAILABLE_ALGOS; please useSobolAnalysis.Algorithm.
Technical improvements¶
Moved
gemseo.utils.testing.compare_dict_of_arraystogemseo.utils.comparisons.compare_dict_of_arrays.Moved
gemseo.utils.testing.image_comparisontogemseo.utils.testing.helpers.image_comparison.Moved
gemseo.utils.pytest_conftesttogemseo.utils.testing.pytest_conftest.Moved
gemseo.utils.testing.pytest_conftest.concretize_classestogemseo.utils.testing.helpers.concretize_classes. #173Datasetinherits fromDataFrameand uses multi-indexing columns. Some methods have been added to improve the use of multi-index;Dataset.transform_variablehas been renamed toDataset.transform_data. Two derived classes (IODatasetandOptimizationDataset) can be considered for specific usages.Datasetcan be imported fromgemseo.datasets.dataset.The default group of
Datasetisparameters.Datasetno longer has theget_data_by_group,get_all_dataandget_data_by_namesmethods. UseDataset.get_view`instead. It returns a slicedDataset, to focus on some parts. Different formats can be used to extract data using pandas default methods. For instance,get_data_by_namescan be replaced byget_view(variable_names=var_name).to_numpy().In a
Dataset, a variable is identified by a tuple(group_name, variable_name). This tuple called variable identifier is unique, contrary to a variable name as it can be used in several groups. The size of a variable corresponds to its number of components. dataset.variable_names_to_n_components[variable_name]`` returns the size of all the variables namedvariable_namewhilelen(dataset.get_variable_components(group_name, variable_name))returns the size of the variable namedvariable_nameand belonging togroup_name.The methods
to_datasetno longer have an argumentby_groupas theDatasetno longer stores the data by group (the previousDatasetstored the data in a dictionary indexed by either variable names or group names).Datasetno longer has theexport_to_dataframemethod, since it is aDataFrameitself.Datasetno longer has thelength; uselen(dataset)instead.Datasetno longer has theis_emptymethod. Use pandas attributeemptyinstead.Datasetno longer has theexport_to_cachemethod.Datasetno longer has therow_namesattribute. Useindexinstead.Dataset.add_variableno longer has thegroupargument. Usegroup_nameinstead.Dataset.add_variableno longer has thenameargument. Usevariable_nameinstead.Dataset.add_variableno longer has thecache_as_inputargument.Dataset.add_groupno longer has thegroupargument. Usegroup_nameinstead.Dataset.add_groupno longer has thevariablesargument. Usevariable_namesinstead.Dataset.add_groupno longer has thesizesargument. Usevariable_names_to_n_componentsinstead.Dataset.add_groupno longer has thecache_as_inputandpatternarguments.Renamed
Dataset.set_from_arraytoDataset.from_array.Renamed
Dataset.get_namestoDataset.get_variable_names.Renamed
Dataset.set_metadatatoDataset.misc.Removed
Dataset.n_samplesin favor oflen().gemseo.load_datasetis renamed:gemseo.create_benchmark_dataset. Can be used to create a Burgers, Iris or Rosenbrock dataset.BurgerDatasetno longer exists. Create a Burger dataset withcreate_burgers_dataset.IrisDatasetno longer exists. Create an Iris dataset withcreate_iris_dataset.RosenbrockDatasetno longer exists. Create a Rosenbrock dataset withcreate_rosenbrock_dataset.problems.dataset.factoryno longer exists.Scenario.to_datasetno longer has theby_groupargument.AbstractCache.to_datasetno longer has theby_groupandnamearguments. #257Rename
MDOObjScenarioAdaptertoMDOObjectiveScenarioAdapter.The scenario adapters
MDOScenarioAdapterandMDOObjectiveScenarioAdapterare now located in the packagegemseo.disciplines.scenario_adapters. #407Moved
gemseo.core.factory.Factorytogemseo.core.base_factory.BaseFactoryRemoved the attribute
factoryof the factories.Removed
Factory._GEMS_PATH.Moved
singleton._Multitontofactory._FactoryMultitonMetaRenamed
Factory.cache_cleartoFactory.clear_cache.Renamed
Factory.classestoFactory.class_names.Renamed
FactorytoBaseFactory.Renamed
DriverFactorytoBaseAlgoFactory. #522The way non-serializable attributes of an
MDODisciplineare treated has changed. From now on, instead of defining the attributes to serialize with the class variable_ATTR_TO_SERIALIZE,MDODisciplineand its child classes shall define the attributes not to serialize with the class variable_ATTR_NOT_TO_SERIALIZE. When a new attribute that is not serializable is added to the list, the methods__setstate__and__getstate__shall be modified to handle its creation properly. #699utils.python_compatibilitywas moved and renamed toutils.compatibility.python. #689The enumeration
FilePathManager.FileTypereplaced the constant:file_type_manager.FileType
Rename
Factory.classestoFactory.class_names.Move
ProgressBarandTqdmToLoggertogemseo.algos.progress_bar.Move
HashableNdarraytogemseo.algos.hashable_ndarray.Move the HDF methods of
DatabasetoHDFDatabase.Remove
BaseEnum.get_member_from_name; please useBaseEnum.__getitem__.StudyAnalysis.disciplines_descrhas been removed; useMDOStudyAnalysis.study.disciplinesinstead.StudyAnalysis.scenarios_descrhas been removed; useMDOStudyAnalysis.study.scenariosinstead.StudyAnalysis.xls_study_pathhas been removed; useCouplingStudyAnalysis.study.xls_study_pathinstead.gemseo.utils.study_analysis.StudyAnalysishas been moved togemseo.utils.study_analyses.mdo_study_analysisand renamed toMDOStudyAnalysis.gemseo.utils.study_analysis.XLSStudyParserhas been moved togemseo.utils.study_analyses.xls_study_parser.gemseo.utils.study_analysis_clihas been moved togemseo.utils.study_analyses.MDOStudyAnalysis.generate_xdsmno longer returns aMDOScenariobut anXDSM.The option
fig_sizeof thegemseo-studyhas been replaced by the optionsheightandwidth.The CLI
gemseo-studycan be used for MDO studies withgemseo-study xls_file_pathand coupling studies withgemseo-study xls_file_path -t coupling.
Removed¶
Removed the
gemseo.core.jacobian_assemblymodule that is now ingemseo.core.derivatives.jacobian_assembly.Removed the obsolete
snoptwrapper.Removed Python 3.7 support.
4.0.0¶
API changes that impact user scripts code¶
In post-processing,
fig_sizeis the unique name to identify the size of a figure and the occurrences offigsize,figsize_xandfigsize_yhave been replaced byfig_size,fig_size_xandfig_size_y.The argument
parallel_execinIDF.__init__()has been renamed ton_processes.The argument
quantileofVariableInfluencehas been renamed tolevel.BasicHistory:data_listhas been renamed tovariable_names.MDAChain.sub_mda_listhas been renamed toMDAChain.inner_mdas.RadarChart:constraints_listhas been renamed toconstraint_names.ScatterPlotMatrix:variables_listhas been renamed tovariable_names.All
MDAalgos now count their iterations starting from0.The
MDA.residual_historyis now a list of normed residuals.The argument
figsizeinMDA.plot_residual_history()was renamed tofig_sizeto be consistent withOptPostProcessoralgos.ConstraintsHistory:constraints_listhas been renamed toconstraint_names.The
MDAChainnow takesinner_mda_nameas argument instead ofsub_mda_class.The
MDFformulation now takesmain_mda_nameas argument instead ofmain_mda_classandinner_mda_nameinstead of -sub_mda_class.The
BiLevelformulation now takesmain_mda_nameas argument instead ofmda_name. It is now possible to explicitly define aninner_mda_nameas well.In
DesignSpace:get_current_xhas been renamed toget_current_value().has_current_xhas been renamed tohas_current_value().set_current_xhas been renamed toset_current_value().Remove
get_current_x_normalizedandget_current_x_dict.
The short names of some machine learning algorithms have been replaced by conventional acronyms.
MatlabDiscipline.__init__():input_data_listandoutput_data_listhas been renamed toinput_namesandoutput_names.save_matlab_file():dict_to_savehas been renamed todata.The classes of the regression algorithms are renamed as
{Prefix}Regressor.The class
ConcatenationDisciplinehas been renamed toConcatenater.In Caches:
input_nameshas been renamed toinput_names.get_all_data()has been replaced by[cache_entry for cache_entry in cache].get_datahas been removed.get_length()has been replaced bylen(cache).get_outputs(input_data)has been replaced bycache[input_data].outputs.{INPUTS,JACOBIAN,OUTPUTS,SAMPLE}_GROUPhave been removed.get_last_cached_inputs()has been replaced bycache.last_entry.inputs.get_last_cached_outputs()has been replaced bycache.last_entry.outputs.max_lengthhas been removed.mergehas been renamed toupdate().output_nameshas been renamed tooutput_names.varsizeshas been renamed tonames_to_sizes.samples_indiceshas been removed.
API changes that impact discipline wrappers¶
In Grammar:
update_fromhas been renamed toupdate().remove_item(name)has been replaced bydel grammar[name].get_data_nameshas been renamed tokeys().initialize_from_data_nameshas been renamed toupdate().initialize_from_base_dicthas been renamed toupdate_from_data().update_from_if_not_inhas been renamed to now useupdate()withexclude_names.set_item_valuehas been removed.remove_required(name)has been replaced byrequired_names.remove(name).data_nameshas been renamed tokeys().data_typeshas been renamed tovalues().update_elementshas been renamed toupdate().update_required_elementshas been removed.init_from_schema_filehas been renamed toupdate_from_file().
API changes that affect plugin or features developers¶
AlgoLib.lib_dicthas been renamed toAlgoLib.descriptions.gemseo.utils.data_conversion.FLAT_JAC_SEPhas been renamed toSTRING_SEPARATOR.In
gemseo.utils.data_conversion:DataConversion.dict_to_arrayhas been renamed toconcatenate_dict_of_arrays_to_array().DataConversion.list_of_dict_to_arrayremoved.DataConversion.array_to_dicthas been renamed tosplit_array_to_dict_of_arrays().DataConversion.jac_2dmat_to_dicthas been renamed tosplit_array_to_dict_of_arrays().DataConversion.jac_3dmat_to_dicthas been renamed tosplit_array_to_dict_of_arrays().DataConversion.dict_jac_to_2dmatremoved.DataConversion.dict_jac_to_dicthas been renamed toflatten_nested_dict().DataConversion.flat_jac_nameremoved.DataConversion.dict_to_jac_dicthas been renamed tonest_flat_bilevel_dict().DataConversion.update_dict_from_arrayhas been renamed toupdate_dict_of_arrays_from_array().DataConversion.deepcopy_datadicthas been renamed todeepcopy_dict_of_arrays().DataConversion.get_all_inputshas been renamed toget_all_inputs().DataConversion.get_all_outputshas been renamed toget_all_outputs().
DesignSpace.get_current_valuecan now return a dictionary of NumPy arrays or normalized design values.The method
MDOFormulation.check_disciplineshas been removed.The class variable
MLAlgo.ABBRhas been renamed toMLAlgo.SHORT_ALGO_NAME.For
OptResultandMDOFunction:get_data_dict_reprhas been renamed toto_dict.Remove plugin detection for packages with
gemseo_prefix.MDODisciplineAdapterGenerator.get_function:input_names_listandoutput_names_listhas been renamed tooutput_namesandoutput_names.MDOScenarioAdapter.__init__:inputs_listandoutputs_listhas been renamed toinput_namesandoutput_names.OptPostProcessor.out_data_dicthas been renamed toOptPostProcessor.materials_for_plotting.In
ParallelExecution:input_data_listhas been renamed toinput_values.worker_listhas been renamed toworkers.
In Grammar,
is_type_arrayhas been renamed tois_array().
Internal changes that rarely or not affect users¶
In Grammar:
load_datahas been renamed tovalidate().is_data_name_existing(name)has been renamed toname in grammar.is_all_data_names_existing(names)has been replaced byset(names) <= set(keys()).to_simple_grammarhas been renamed toconvert_to_simple_grammar().is_required(name)has been renamed toname in required_names.write_schemahas been renamed towrite().schema_dicthas been renamed toschema.JSONGrammarclass attributes removed has been renamed toPROPERTIES_FIELD,REQUIRED_FIELD,TYPE_FIELD,OBJECT_FIELD,TYPES_MAP.AbstractGrammarhas been renamed toBaseGrammar.
AnalyticDiscipline.expr_symbols_dicthas been renamed toAnalyticDiscipline.output_names_to_symbols.AtomicExecSequence.get_state_dicthas been renamed toAtomicExecSequence.get_statuses().-
CompositeExecSequence.get_state_dicthas been renamed toCompositeExecSequence.get_statuses().CompositeExecSequence.sequence_listhas been renamed toCompositeExecSequence.sequences.
Remove
gemseo.utils.multi_processing.
3.0.0¶
As GEMS has been renamed to GEMSEO, upgrading from version 2 to version 3 requires to change all the import statements of your code from
import gems
from gems.x.y import z
to
import gemseo
from gemseo.x.y import z
2.0.0¶
The API of GEMS 2 has been slightly modified with respect to GEMS 1. In particular, for all the supported Python versions, the strings shall to be encoded in unicode while they were previously encoded in ASCII.
That kind of error:
ERROR - 17:11:09 : Invalid data in : MDOScenario_input
', error : data.algo must be string
Traceback (most recent call last):
File "plot_mdo_scenario.py", line 85, in <module>
scenario.execute({"algo": "L-BFGS-B", "max_iter": 100})
File "/home/distracted_user/workspace/gemseo/src/gemseo/core/discipline.py", line 586, in execute
self.check_input_data(input_data)
File "/home/distracted_user/workspace/gemseo/src/gemseo/core/discipline.py", line 1243, in check_input_data
raise InvalidDataException("Invalid input data for: " + self.name)
gemseo.core.grammar.InvalidDataException: Invalid input data for: MDOScenario
is most likely due to the fact that you have not migrated your code to be compliant with GEMSEO 2. To migrate your code, add the following import at the beginning of all your modules defining literal strings:
from __future__ import unicode_literals