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.
6.0.0#
The tool bump-gemseo can be used to help converting your code to GEMSEO 6.
MDODiscipline#
The class
MDODisciplinehas been renamed toDiscipline, some of its many attributes and methods have been gathered in sub objects via the attributes.io,.execution_statistics,.execution_statusand the methodget_process_flow.The signature of the method
__init__has the following changes:The argument
auto_detect_grammar_filesis removed, now use the class attributeauto_detect_grammar_files.The arguments
input_grammar_fileandoutput_grammar_fileare removed, useauto_detect_grammar_files.The argument
grammar_typeis removed, now use the class attributedefault_grammar_type.The argument
cache_typeis removed, now use the class attributedefault_cache_type.The argument
cache_file_pathis removed, now use the methodset_cache.
The method
_runnow takesinput_dataas argument and may return the output data, this allow a more natural and clearer implementation of the main business logic of a discipline. These input and output data are dictionaries of the form{variable_name_without_namespace: variable_value, ...}.Using the provided
input_dataand also returning the output data will ensure that the discipline can be used with namespaces andNameMappingdata processors. This approach is preferable.You can also avoid using
input_dataand return output data as in the versions prior to 6 and thus leave the body of_rununchanged, with typical lines likeinput_data = self.get_input_data(with_namespace=False),x_value, y_value = self.get_inputs_by_name(["x", "y"])andself.store_local_data(output_name=output_value)(please note that the methodsget_input_data,get_inputs_by_nameandstore_local_datahave also been modified; see below). But in that case, the discipline may not support the use of namespaces andNameMappingdata processors. For this reason, it is preferable to modify_runaccording to the first approach.
The signature of
_compute_jacobianis now_compute_jacobian(self, input_names=(), output_names=()).The attributes have the following changes:
.residual_variables: now use.state_equations_are_solved.run_solves_residuals: now use.state_equations_are_solved.exec_for_lin: is removed.activate_counters: now use.is_enabled.activate_input_data_check: now use.validate_input_data.activate_output_data_check: now use.validate_output_data.activate_cache: is removed, now call.set_cache.re_exec_policy: is removed.N_CPUS: now usegemseo.constants.N_CPUS.linear_relationships: is removed, call.io.have_linear_relationships.disciplines: is removed and only available for classes that derive fromProcessDiscipline.time_stamps: now use.time_stamps.n_calls: now use.n_executions.exec_time: now use.duration.n_calls_linearize: now use.n_linearizations.grammar_type: now use.grammar_type.auto_get_grammar_file: now use the class attribute.auto_detect_grammar_files.status: now use.value.cache_tol: now use.tolerance.default_inputs: now use.default_input_data.default_outputs: now use.default_output_data.is_scenario: is removed.data_processor: now use.data_processor.ReExecutionPolicy: is removed.ExecutionStatus: now use.execution_status.Status.ExecutionStatus.PENDING: is removed
The methods have the following changes:
.activate_time_stamps: now use.is_time_stamps_enabled.deactivate_time_stamps: now use.is_time_stamps_enabled.set_linear_relationships: now use.io.set_linear_relationships.set_disciplines_statuses: was removed.is_output_existing: now use.names.is_all_outputs_existing: now use.names.is_all_inputs_existing: now use.names.is_input_existing: now use.names.reset_statuses_for_run: is removed.add_status_observer: now use.add_observer.remove_status_observer: now use.remove_observer.notify_status_observers: is removed.store_local_data: now use.update_output_data.check_input_data: now use.validate.check_output_data: now use.validate.get_outputs_asarray: is removed.get_inputs_asarray: is removed.get_inputs_by_name: now use.get_input_data.get_outputs_by_name: now use.get_output_data.get_input_data_names(): now use ``.input_grammar.namesand cast it intolist.get_input_data_names(True): now use.input_grammar.namesand cast it intolist.get_input_data_names(False): now use.input_grammar.names_without_namespaceand cast it intolist.get_output_data_names(): now use ``.output_grammar.namesand cast it intolist.get_output_data_names(True): now use.output_grammar.namesand cast it intolist.get_output_data_names(False): now use.output_grammar.names_without_namespaceand cast it intolist.get_all_inputs: now use.get_input_data.get_all_outputs: now use.get_output_data.to_pickle: now usegemseo.to_pickle.from_pickle: now usegemseo.from_pickle.get_local_data_by_name: now use.local_data.get_data_list_from_dict: is removed
DesignSpace#
DesignSpaceandParameterSpaceno longer provide a dictionary-like interface to manipulate its items with square brackets[].The
DesignSpace.add_variables_frommethod can be used to add variables from existing variable spaces.The class
DesignSpace.DesignVariableno longer exists.A variable of a
DesignSpacecan no longer have one type (float or integer) per component, but rather a single type, shared by all its components.DesignSpace.add_variableno longer accepts a sequence of variable types for itsvar_typeargument.The values of dictionary
DesignSpace.variable_typesare no longer NumPy arrays of strings, but simple strings.The components of a (lower or upper) bound of a
DesignSpacevariable can no longer beNone. Unboundedness shall be encoded with-numpy.inffor lower bounds, andnumpy.inffor upper bounds.DesignSpace.add_variableno longer acceptsNonefor its argumentsl_bandu_b. These two arguments now default to-numpy.infandnumpy.infrespectively.DesignSpace.set_lower_boundandDesignSpace.set_upper_boundno longer acceptNonearguments, but rather infinities.The return values of
DesignSpace.get_lower_boundandDesignSpace.get_upper_boundcan no longer beNone, but rather NumPy arrays of infinite values.Arguments
var_type,l_bandu_bare respectively renamedtype_,lower_boundandupper_bound.The method
array_to_dictis renamedconvert_array_to_dict.The method
dict_to_arrayis renamedconvert_dict_to_array.The method
has_current_valueis now a property.The method
has_integer_variablesis now a property. #709DesignSpace.filter_dimrenamed toDesignSpace.filter_dimensions, its first argumentvariablerenamed toname, and its second argumentkeep_dimensionstodimensions. #1218DesignSpace.get_indexed_var_nameis removed. UseDesignSpace.get_indexed_variable_namesinstead.DesignSpace.SEPis removed.The
DesignSpace.get_indexed_variable_namesmethod is now based on the functiongemseo.utils.string_tools.repr_variable. It is now consistent with other Gemseo methods, by naming a variable "x[i]" instead of "x!i". #1336
OptimizationProblem#
OptimizationProblem'scallback_funcargument renamed tocallback.OptimizationProblem.change_objective_sign: removed; useOptimizationProblem.minimize_objectiveinstead.cstr_typeinOptimizationProblem.add_constraint:constraint_typecstr_typeinOptimizationProblem.repr_constraint:constraint_typecstr_funcinOptimizationProblem.add_constraint:functioncstr_funcinOptimizationProblem.add_eq_constraint:functioncstr_funcinOptimizationProblem.add_ineq_constraint:functionobs_funcinOptimizationProblem.add_observable:observablefuncinOptimizationProblem.repr_constraint:functioncallback_funcinOptimizationProblem.add_callback:callbackThe default value of the
valueargument of theadd_constraintmethods is0instead ofNone; this does not change the behavior asNonewas replaced by0. #728OptimizationProblem.get_scalar_constraint_names(method):OptimizationProblem.scalar_constraint_names(property).OptimizationProblem.is_max_iter_reached(method):OptimizationProblem.is_max_iter_reached(property).OptimizationProblem.get_eq_constraints:OptimizationProblem.constraints.get_equality_constraints().OptimizationProblem.get_ineq_constraints:OptimizationProblem.constraints.get_inequality_constraints().OptimizationProblem.get_ineq_constraints_number: removed; uselen(optimization_problem.constraints.get_inequality_constraints())instead.OptimizationProblem.get_eq_constraints_number: removed; uselen(optimization_problem.constraints.get_equality_constraints())instead.OptimizationProblem.get_constraints_number: removed; uselen(optimization_problem.constraints)instead.OptimizationProblem.get_design_variable_names(method):OptimizationProblem.design_variable_names(property).OptimizationProblem.get_all_function_name(method):OptimizationProblem.function_names(property).OptimizationProblem.has_eq_constraints: removed; usebool(optimization_problem.constraints.get_equality_constraints())instead, e.g.if optimization_problem.constraints.get_equality_constraints().OptimizationProblem.has_ineq_constraints: removed; usebool(optimization_problem.constraints.get_inequality_constraints())instead, e.g.if optimization_problem.constraints.get_inequality_constraints().OptimizationProblem.has_constraints: removed; usebool(optimization_problem.constraints)instead, e.g.if optimization_problem.constraints.OptimizationProblem.has_nonlinear_constraints: removed as it did not check whether the problem had non-linear constraints but constraints.OptimizationProblem.get_dimension: removed; useOptimizationProblem.dimensioninstead.OptimizationProblem.check_format: removed as it was only used internally.OptimizationProblem.get_eq_cstr_total_dim: removed; useOptimizationProblem.constraints.get_equality_constraints().dimensioninstead.OptimizationProblem.get_ineq_cstr_total_dim: removed; useOptimizationProblem.constraints.get_inequality_constraints().dimensioninstead.OptimizationProblem.get_optimum(method):OptimizationProblem.optimum(property).OptimizationProblem.current_names:OptimizationProblem.original_to_current_names.OptimizationProblem.get_constraint_names: removed; useOptimizationProblem.constraints.get_namesinstead.OptimizationProblem.get_objective_name(method):OptimizationProblem.objective_name(property) andOptimizationProblem.standardized_objective_name(property)OptimizationProblem.nonproc_objective:OptimizationProblem.objective.original.OptimizationProblem.nonproc_constraints(property):OptimizationProblem.constraints.get_originals(method).OptimizationProblem.nonproc_observables(property):OptimizationProblem.observables.get_originals(method).OptimizationProblem.nonproc_new_iter_observables` (property): ``OptimizationProblem.new_iter_observables.get_originals(method).OptimizationProblem.get_nonproc_objective: removed; useOptimizationProblem.objective.originalinstead.OptimizationProblem.get_nonproc_constraints: removed; useOptimizationProblem.constraints.get_originalsinstead.OptimizationProblem.get_all_functions: removed; useOptimizationProblem.original_functionsandOptimizationProblem.functionsinstead.OptimizationProblem.DESIGN_VAR_NAMES: removed as it was no longer used.OptimizationProblem.DESIGN_VAR_SIZE: removed as it was no longer used.OptimizationProblem.DESIGN_SPACE_ATTRS: removed as it was no longer used.OptimizationProblem.FUNCTIONS_ATTRS: removed as it was no longer used.OptimizationProblem.DESIGN_SPACE_GROUP: removed as it was no longer used.OptimizationProblem.HDF_NODE_PATH: removed as it was no longer used.OptimizationProblem.OPT_DESCR_GROUP: removed as it was only used internally.OptimizationProblem.OBJECTIVE_GROUP: removed as it was only used internally.OptimizationProblem.SOLUTION_GROUP: removed as it was only used internally.OptimizationProblem.CONSTRAINTS_GROUP: removed as it was only used internally.OptimizationProblem.OBSERVABLES_GROUP: removed as it was only used internally.OptimizationProblem._OPTIM_DESCRIPTION: removed as it was only used internally.OptimizationProblem.KKT_RESIDUAL_NORM: removed as it was only used internally.OptimizationProblem.HDF5_FORMAT: removed; useOptimizationProblem.HistoryFileFormat.HDF5instead.OptimizationProblem.GGOBI_FORMAT: removed; useOptimizationProblem.HistoryFileFormat.GGOBIinstead.OptimizationProblem.add_eq_constraint: removed; useOptimizationProblem.add_constraintwithconstraint_type="eq"instead.OptimizationProblem.add_ineq_constraint: removed; useOptimizationProblem.add_constraintwithconstraint_type="ineq"instead.OptimizationProblem.OptimumType: removed; use the namedtupleOptimizationProblem.Solutioninstead.OptimizationProblem.ineq_tolerance: removed; useOptimization.tolerances.inequalityinstead.OptimizationProblem.eq_tolerance: removed; useOptimization.tolerances.equalityinstead.OptimizationProblem.preprocess_options: removed as this dictionary was only used asoptimization_problem.preprocess_options.get("is_function_input_normalized", False); useoptimization_problem.objective.expects_normalized_inputsinstead.OptimizationProblem.get_active_ineq_constraints: removed; useOptimizationProblem.constraints.get_activeinstead.OptimizationProblem.execute_observables_callback: removed; useOptimizationProblem.new_iter_observables.evaluateinstead.OptimizationProblem.aggregate_constraint: removed; useOptimizationProblem.constraints.aggregateinstead.OptimizationProblem.original_to_current_names: removed; useOptimizationProblem.constraints.original_to_current_namesinstead.OptimizationProblem.get_observable: removed; useOptimizationProblem.observables.get_from_nameinstead.OptimizationProblem.is_point_feasible: removed; useOptimizationProblem.constraints.is_point_feasibleinstead.OptimizationProblem.get_feasible_points: removed; useOptimizationProblem.history.feasible_pointsinstead.OptimizationProblem.check_design_point_is_feasible: removed; useOptimizationProblem.history.check_design_point_is_feasibleinstead.OptimizationProblem.get_number_of_unsatisfied_constraints: removed; useOptimizationProblem.constraints.get_number_of_unsatisfied_constraintsinstead.OptimizationProblem.get_data_by_names: removed; useOptimizationProblem.history.get_data_by_namesinstead.OptimizationProblem.get_last_point: removed; useOptimizationProblem.history.last_pointinstead.OptimizationProblem.activate_bound_checkrenamed toOptimizationProblem.check_bounds.OptimizationProblem'sinput_databaseargument renamed todatabase.OptimizationProblem.variable_namesremoved; useOptimizationProblem.design_space.variable_namesinstead.OptimizationProblem.dimensionremoved; useOptimizationProblem.design_space.dimensioninstead.OptimizationProblem.add_callbackrenamed toOptimizationProblem.add_listener, itseach_new_iterargument toat_each_iterationand itseach_storeargument toat_each_function_call.OptimizationProblem.evaluate_functions'seval_jacargument renamed tocompute_jacobians.OptimizationProblem.evaluate_functions'seval_observablesargument renamed toevaluate_observables.OptimizationProblem.evaluate_functions'seval_objargument renamed toevaluate_objective.OptimizationProblem.evaluate_functions'sx_vectargument renamed todesign_vector.OptimizationProblem.evaluate_functions'snormalizeargument renamed todesign_vector_is_normalized.OptimizationProblem.ProblemType: removed; use a boolean mechanism instead to check if the the problem is linear.OptimizationProblem.pb_type: removed; use the boolean propertyis_linearinstead.OptimizationProblem'spb_type: removed; use the boolean argumentis_linearinstead.OptimizationProblem.clear_listeners: removed as it was no longer used; useEvaluationProblem.database.clear_listenersinstead.OptimizationProblem'sfd_stepattribute and argument renamed todifferentiation_step.OptimizationProblem'sdatabaseargument can no longer be a file path and thehdf_node_pathargument has been removed; useDatabase.from_hdf(file_path, hdf_node_path=hdf_node_path)to pass aDatabaserelying on a HDF5 file.OptimizationProblem'sget_x0_normalizedremoved; useOptimizationProblem.design_space.get_current_valueinstead. #1104OptimizationProblem.get_violation_criteriarenamed toOptimizationProblem.check_design_point_is_feasible.
Distributions#
ComposedDistribution:JointDistributionOTComposedDistribution:OTJointDistributionSPComposedDistribution:SPJointDistributionParameterSpace.build_composed_distribution:ParameterSpace.build_joint_distributionDistribution.COMPOSED_DISTRIBUTION_CLASS:Distribution.JOINT_DISTRIBUTION_CLASSDistributionFactory.create_composed_distribution:DistributionFactory.create_joint_distributiongemseo.uncertainty.distributions.composed:gemseo.uncertainty.distributions.jointgemseo.uncertainty.distributions.scipy.composed:gemseo.uncertainty.distributions.scipy.jointgemseo.uncertainty.distributions.openturns.composed:gemseo.uncertainty.distributions.openturns.jointgemseo.algos.parameter_space.build_composed_distribution:gemseo.algos.parameter_space.build_joint_distribution#989The
dimensionargument ofBaseDistributionhas been removed as it no longer makes sense for distributions modelling scalar random variables.Any class deriving from
BaseDistributionandScalarDistributionMixinmodels a scalar random variable, e.g.OTDistributionandSPDistribution, while theBaseJointDistributionmodels a random vector.BaseJointDistribution.plothas been removed; useBaseJointDistribution.marginals[i].plotinstead.BaseDistribution.plot_all: removed; usedScalarDistributionMixin.plotinstead.BaseDistribution.marginals: removed; onlyBaseJointDistributionhas this attribute. #1183The
variableargument ofBaseDistributionhas been removed as a probability distribution is not defined from a variable name.The
variable_nameattribute ofBaseDistributionhas been removed in connection with the removal of thevariableargument. #1184BaseDistribution.distribution_namehas been removed as it was no longer used.BaseDistribution.parametershas been removed as it was no longer used.BaseDistribution.standard_parametershas been removed as it was no longer used. #1186The argument
use_asymptotic_distributionsis no longer an instantiation argument but an argument ofSobolAnalysis.compute_indices. #1189
DOE#
DOELibrary.DIMENSION: removed as it was no longer used.DOELibrary.LEVEL_KEYWORD: removed as it was no longer used.DOELibrary.PHIP_CRITERIA: removed as it was no longer used.DOELibrary.SAMPLES_TAG: removed as it was no longer used.DOELibrary.DESIGN_ALGO_NAME: removed as it was no longer used.DOELibraryOutputType: removed; useEvaluationTypeinstead.DOELibraryOptionType: removed; useDriverLibraryOptionTypeinstead.DOELibrary.__call__: removed; useBaseDOELibrary.compute_doeinstead.DOELibrary.evaluate_samples: removed; useBaseDOELibrary.executeinstead.DOELibrary.eval_jac: removed as it was no longer used; note, however, that the DOE algorithm optioneval_jacis still available.DOELibrary.export_samples: removed because it simply saved the NumPy arrayBaseDOELibrary.unit_samplesto a text file; usenumpy.savetxt(file_path, doe_library.unit_samples, delimiter=",")to obtain the same result.
Disciplines#
AutoPyDiscipline.input_names: removed; useDisciplineAPI instead.AutoPyDiscipline.output_names: removed; useDisciplineAPI instead.AutoPyDiscipline.use_arrays: removed as it was no longer used.gemseo.disciplines.auto_py.to_arrays_dict: removed as it was no longer used.AnalyticDiscipline'sfast_evaluationargument: removed; always use fast evaluation.SobieskiBase.DTYPE_COMPLEX: removed; useSobieskiBase.DataType.COMPLEXinstead.SobieskiBase.DTYPE_DOUBLE: removed; useSobieskiBase.DataType.FLOATinstead.SobieskiBase.DTYPE_DEFAULT: removed as it was no longer used.SobieskiDiscipline.DTYPE_COMPLEX: removed; useSobieskiBase.DataType.COMPLEXinstead.SobieskiDiscipline.DTYPE_DOUBLE: removed; useSobieskiBase.DataType.FLOATinstead.Boxplot.opacity_level: removed; use theopacity_leveloption ofBoxplotinstead.DiscFromExe'suse_shellargument: removed as it was no longer used.DiscFromExe'sexecutable_commandargument renamed tocommand_line.DiscFromExe.executable_commandrenamed toDiscFromExe.command_line.DiscFromExe'sfolders_iterargument renamed todirectory_naming_method.DiscFromExe'soutput_folder_basepathargument renamed toroot_directory.RemappingDisciplinemaps the differentiated data names of the underlying discipline and use the same linearization mode. #1197gemseo.wrappersrenamed togemseo.disciplines.wrappers. #1193The module
scheduler_wrapped_disc.pywas renamed todiscipline_wrapper.py. #1191
Machine learning#
All functions and
MLAlgo's attributes and methods to save and load instances of machine learning algorithms models (namelyMLAlgo.FILENAME,MLAlgo.to_pickle,MLAlgo.load_algo,import_mlearning_model,import_regression_model,import_classification_modelandimport_clustering_model); use the functionsto_pickleandfrom_pickleinstead. #540MLQualityMeasure.evaluate_bootstrap: removed; useBaseMLAlgoQuality.compute_bootstrap_measureinstead.MLQualityMeasure.evaluate_kfolds: removed; useBaseMLAlgoQuality.compute_cross_validation_measureinstead.MLQualityMeasure.evaluate_learn: removed; useBaseMLAlgoQuality.compute_learning_measureinstead.MLQualityMeasure.evaluate_loo: removed; useBaseMLAlgoQuality.compute_leave_one_out_measureinstead.MLQualityMeasure.evaluate_test: removed; useBaseMLAlgoQuality.compute_test_measureinstead.SensitivityAnalysis:BaseSensitivityAnalysisToleranceInterval:BaseToleranceIntervaldistribution.ToleranceIntervalFactory:factory.ToleranceIntervalFactorydistribution:base_distributionDistribution:BaseDistributionMLClassificationAlgo:BaseClassifierMLClusteringAlgo:BaseClustererMLClassificationAlgo:BaseClassifierMLAlgo:BaseMLAlgoMLQualityMeasure:BaseMLAlgoQualityMLErrorMeasure:BaseRegressorQualityMLClusteringMeasure:BaseClustererQualityMLPredictiveClusteringMeasure:BasePredictiveClustererQualityMLRegressionAlgo:BaseRegressorresampler:base_resamplerResampler:BaseResamplertransformer:base_transformerTransformer:BaseTransformerdimension_reduction:base_dimension_reductionDimensionReduction:BaseDimensionReductiongemseo.mlearning.classification:the classification algorithms are in
gemseo.mlearning.classification.algosthe quality measures are in
gemseo.mlearning.classification.qualitygemseo.mlearning.classification.classification.MLClassificationAlgo: renamed toBaseClassifierClassificationModelFactory: renamed toClassifierFactory
gemseo.mlearning.clustering:the clustering algorithms are in
gemseo.mlearning.clustering.algosthe quality measures are in
gemseo.mlearning.clustering.qualitygemseo.mlearning.clustering.clustering.MLClusteringAlgo: renamed toBaseClustererClusteringModelFactory: renamed toClustererFactoryMLClusteringMeasure: renamed toBaseClustererQuality
gemseo.mlearning.regression:the regression algorithms are in
gemseo.mlearning.regression.algosthe quality measures are in
gemseo.mlearning.regression.qualitygemseo.mlearning.regression.regression.MLRegressionAlgo: renamed toBaseRegressorRegressionModelFactory: renamed toRegressorFactoryMLErrorMeasure: renamed toBaseRegressorQualityMLErrorMeasureFactory: renamed toRegressorQualityFactory
gemseo.mlearning.quality_measures: removed; use instead:gemseo.mlearning.core.quality.factory.MLAlgoQualityFactorygemseo.mlearning.core.quality.quality_measure.BaseMLAlgoQualitygemseo.mlearning.classification.qualityfor quality measures related to classifiersgemseo.mlearning.clustering.qualityfor quality measures related to clusterersgemseo.mlearning.regression.qualityfor quality measures related to regressors
Algorithms#
DriverLibrary.get_x0_and_bounds_vectsrenamed toBaseDriverLibrary.get_x0_and_bounds.DriverLibOptionTyperenamed toDriverLibraryOptionType.CustomDOE.read_file'sdimensionargument: removed as it was unused.OptimizationLibrary.algorithm_handles_eqcstrrenamed toBaseOptimizationLibrary.check_equality_constraint_support.OptimizationLibrary.algorithm_handles_ineqcstrrenamed toBaseOptimizationLibrary.check_inequality_constraint_support.OptimizationLibrary.is_algo_requires_positive_cstrrenamed toBaseOptimizationLibrary.check_positivity_constraint_requirement.The attribute
BaseDriverLibrary.MAX_DS_SIZE_PRINTno longer exists; it is replaced by the argumentmax_design_space_dimension_to_logofBaseDriverLibrary.execute. #1163gemseo.algos.algorithm_library.AlgorithmLibrary:gemseo.algos.base_algorithm_library.BaseAlgorithmLibrary.gemseo.algos.driver_library.DriverLibrary:gemseo.algos.base_driver_library.BaseDriverLibrary.gemseo.algos.ode.driver_library.DriverLibrary:gemseo.algos.base_driver_library.BaseDriverLibrary.gemseo.algos.ode_solver_lib.ODESolverLibrary:gemseo.algos.ode.base_ode_solver_library.BaseODESolverLibrary.gemseo.algos.doe.doe_library.DOELibrary:gemseo.algos.doe.base_doe_library.BaseDOELibrary.gemseo.algos.opt.optimization_library.BaseDOELibrary:gemseo.algos.opt.base_optimization_library.BaseOptimizationLibrary.BaseAlgorithmLibrary.driver_has_option: removed; usename in BaseAlgorithmLibrary._option_grammarinstead.AlgorithmLibrary.init_options_grammar: removed; useBaseAlgorithmLibrary._init_options_grammarinstead, which will disappear in the next version.AlgorithmLibrary.opt_grammar: removed; useBaseAlgorithmLibrary._option_grammarinstead, which will disappear in the next version.AlgorithmLibrary.OPTIONS_DIR: removed; useBaseAlgorithmLibrary._OPTIONS_DIRinstead, which will disappear in the next version.AlgorithmLibrary.OPTIONS_MAP: removed; useBaseAlgorithmLibrary._OPTIONS_MAPinstead, which will disappear in the next version.AlgorithmLibrary.internal_algo_name: removed; useBaseAlgorithmLibrary.description[algo_name].internal_algo_nameinstead.AlgorithmLibrary.algorithms: removed; uselist(BaseAlgorithmLibrary.descriptions)instead.AlgorithmLibrary.LIBRARY_NAME: removed as it was no longer used (note that this information is already included in the class names and in the docstrings).LinearSolverLibrary.solve: removed; useBaseLinearSolverLibrary.executeinstead.LinearSolverLibrary.solution: removed; useproblem.solutioninstead, whereproblemis theLinearProblempassed to the methodBaseLinearSolverLibrary.execute.LinearSolverLibrary.save_fpath (str | None):BaseLinearSolverLibrary.file_path (Path).DriverLibrary.get_optimum_from_database: removed; useOptimizationResult.from_optimization_probleminstead.DriverLibrary.ensure_bounds: removed as it was no longer used.DriverLibrary.requires_gradient: removed; useBaseDriverLibrary.description[algo_name].require_gradientinstead.DriverLibrary.finalize_iter_observer: removed as it was only used once internally, byDriverLibrary.execute.DriverLibrary.new_iteration_callback: protected because it is not an end-user feature.DriverLibrary.deactivate_progress_bar: protected because it is not an end-user feature.DriverLibrary.init_iter_observer: protected because it is not an end-user feature.DriverLibrary.clear_listeners: protected because it is not an end-user feature.DriverLibrary.get_x0_and_bounds: removed; useget_value_and_boundsinstead.OptimizationLibrary.check_inequality_constraint_support: removed; useBaseOptimizationLibrary.descriptions[algo_name].handle_inequality_constraintsinstead.OptimizationLibrary.check_equality_constraint_support: removed; useBaseOptimizationLibrary.descriptions[algo_name].handle_equality_constraintsinstead.OptimizationLibrary.check_positivity_constraint_requirement: removed; useBaseOptimizationLibrary.descriptions[algo_name].positive_constraintsinstead.OptimizationLibrary.get_right_sign_constraints: protected because it is not an end-user feature.ScipyLinalgAlgos.BASE_INFO_MSG: removed as it was used only internally.ScipyOpt.LIB_COMPUTE_GRAD: removed as it was no longer used.ScipyMILP.LIB_COMPUTE_GRAD: removed as it was no longer used.ScipyGlobalOpt.LIB_COMPUTE_GRAD: removed as it was no longer used.NLopt.LIB_COMPUTE_GRAD: removed as it was no longer used.ScipyLinprog.LIB_COMPUTE_GRAD: removed as it was no longer used.ScipyLinalgAlgos.get_default_properties: removed; useScipyLinalgAlgos.descriptions[algo_name]instead.NLopt's class attributes defining error messages: removed as it was used only internally.ScipyGlobalOpt.iter_callback: protected because it is not an end-user feature.ScipyGlobalOpt.max_func_calls: protected because it is not an end-user feature.ScipyGlobalOpt.normalize_ds: protected because it is not an end-user feature.ScipyLinalgAlgos.LGMRES_SPEC_OPTS: protected because it is not an end-user feature.DriverLibrary.EQ_TOLERANCE: removed as it was used only internally.DriverLibrary.EVAL_OBS_JAC_OPTION: removed as it was used only internally.DriverLibrary.INEQ_TOLERANCE: removed as it was used only internally.DriverLibrary.MAX_TIME: removed as it was used only internally.DriverLibrary.NORMALIZE_DESIGN_SPACE_OPTION: removed as it was used only internally.DriverLibrary.ROUND_INTS_OPTION: removed as it was used only internally.DriverLibrary.USE_DATABASE_OPTION: removed as it was used only internally.DriverLibrary.USE_ONE_LINE_PROGRESS_BAR: removed as it was used only internally.DOELibrary.EVAL_JAC: removed as it was used only internally.DOELibrary.N_PROCESSES: removed as it was used only internally.DOELibrary.N_SAMPLES: removed as it was used only internally.DOELibrary.SEED: removed as it was used only internally.DOELibrary.WAIT_TIME_BETWEEN_SAMPLES: removed as it was used only internally.OptimizationLibrary.MAX_ITER: removed as it was used only internally.OptimizationLibrary.F_TOL_REL: removed as it was used only internally.OptimizationLibrary.F_TOL_ABS: removed as it was used only internally.OptimizationLibrary.X_TOL_REL: removed as it was used only internally.OptimizationLibrary.X_TOL_ABS: removed as it was used only internally.OptimizationLibrary.STOP_CRIT_NX: removed as it was used only internally.OptimizationLibrary.LS_STEP_SIZE_MAX: removed as it was used only internally.OptimizationLibrary.LS_STEP_NB_MAX: removed as it was used only internally.OptimizationLibrary.MAX_FUN_EVAL: removed as it was used only internally.OptimizationLibrary.PG_TOL: removed as it was used only internally.OptimizationLibrary.SCALING_THRESHOLD: removed as it was used only internally.OptimizationLibrary.VERBOSE: removed as it was used only internally.OptimizationLibrary.descriptions(instance attribute): renamed toOptimizationLibrary.ALGORITHM_INFOS(class attribute).OptimizationLibrary.algo_nameis now a read-only attribute; set the algorithm name at instantiation instead.OptimizationLibrary.execute'salgo_nameattribute: removed; set the algorithm name at instantiation instead.BaseLinearSolverLibrary.SAVE_WHEN_FAIL: removed as it was used only internally.Nlopt.INNER_MAXEVAL: removed as it was used only internally.Nlopt.STOPVAL: removed as it was used only internally.Nlopt.CTOL_ABS: removed as it was used only internally.Nlopt.INIT_STEP: removed as it was used only internally.ScipyLinprog.REDUNDANCY_REMOVAL: removed as it was used only internally.ScipyLinprog.REVISED_SIMPLEX: removed as it was used only internally.CustomDOE.COMMENTS_KEYWORD: removed as it was used only internally.CustomDOE.DELIMITER_KEYWORD: removed as it was used only internally.CustomDOE.DOE_FILE: removed as it was used only internally.CustomDOE.SAMPLES: removed as it was used only internally.CustomDOE.SKIPROWS_KEYWORD: removed as it was used only internally.OpenTURNS.OT_SOBOL: removed as it was used only internally.OpenTURNS.OT_RANDOM: removed as it was used only internally.OpenTURNS.OT_HASEL: removed as it was used only internally.OpenTURNS.OT_REVERSE_HALTON: removed as it was used only internally.OpenTURNS.OT_HALTON: removed as it was used only internally.OpenTURNS.OT_FAURE: removed as it was used only internally.OpenTURNS.OT_MC: removed as it was used only internally.OpenTURNS.OT_FACTORIAL: removed as it was used only internally.OpenTURNS.OT_COMPOSITE: removed as it was used only internally.OpenTURNS.OT_AXIAL: removed as it was used only internally.OpenTURNS.OT_LHSO: removed as it was used only internally.OpenTURNS.OT_LHS: removed as it was used only internally.OpenTURNS.OT_FULLFACT: removed as it was used only internally.OpenTURNS.OT_SOBOL_INDICES: removed as it was used only internally.PyDOE's class attributes: removed as it was used only internally.AlgorithmLibrary.problem: removed as it was used only internally.is_kkt_residual_norm_reached: moved togemseo.algos.stop_criteria.kkt_residual_computation: moved togemseo.algos.stop_criteria. #1224BaseAlgorithmLibraryand its derived classes now validate their settings (referred to as options in previous versions of GEMSEO) using a Pydantic model. The Pydantic models replace theJSONGrammarvalidation used in previous versions of GEMSEO. The aforementioned models have a hierarchical structure, for instance, theBaseDriverSettingsshall inherit fromBaseAlgorithmSettingsin the same way asBaseDriverLibraryinherits fromBaseAlgorithmLibrary. Instead of passing the settings one by one, a Pydantic model can be passed using the special argument"settings_model".The
CustomDOEmodule has been renamed fromlib_custom_doe.pytocustom_doe.py.The
OpenTURNSmodule has been renamed fromlib_openturns.pytoopenturns.py.The
PyDOEmodule has been renamed fromlib_pydoe.pytopydoe.py.The
DiagonalDOEmodule has ben renamed fromlib_scalable.pytoscalable.py.The
SciPyDOEmodule has been renamed fromlib_scipy.pytoscipy_doe.py.The
delimitersetting of theCustomDOEno longer acceptsNoneas a value.The
ScipyODEAlgosmodule has been renamed fromlib_scipy_ode.pytoscipy_ode.py.The
ScipyGlobalOptmodule has been renamed fromlib_scipy_global.pytoscipy_global.py.The
ScipyLinprogmodule has been renamed fromlib_scipy_linprog.pytoscipy_linprog.py.The following setting names for
ScipyLinproghave been modified:max_iteris nowmaxiter,verboseis nowdisp,redundancy removalis nowrr,The
ScipyOptmodule has been renamed fromlib_scipy.pytoscipy_local.py.The following setting names for
ScipyOpthave been modified:
max_ls_step_sizeis nowmaxls,
max_ls_step_nbis nowstepmx,
max_fun_evalis nowmaxfun,
pg_tolis nowgtol,
The
ScipyMILPmodule has been renamed fromlib_scipy_milp.pytoscipy_local_milp.py.The following setting names for
ScipyMILPhas been modified:
max_iteris nownode_limit.The SciPy linear algebra library module has been renamed from
lib_scipy_linalg.pytoscipy_linalg.py.The
DEFAULTlinear solver fromScipyLinalgAlgoshas been modified. Now it simply runs the LGMRES algorithm. Before it first attempted to solve using GMRES, the LGMRES in case of failure, then using direct method in case of failure.
The following setting names have been modified:
max_iteris nowmaxiter(for all the scipy.linalg algorithms)store_outer_avis nowstore_outer_Av(LGMRES)
The following setting names for
MNBIhave been modified:doe_algo_optionsis nowdoe_algo_settings,sub_optim_algo_optionsis nowsub_optim_algo_settings.
sub_solver_algorithminBaseAugmentedLagragian:sub_algorithm_name.sub_problem_optionsinBaseAugmentedLagragian:sub_algorithm_settings. #1318The following legacy algorithms from the SciPy linear programming library are no longer interfaced:
Linear interior point method
Simplex
Revised Simplex
One should now use the HiGHS algorithms:
INTERIOR_POINTorDUAL_SIMPLEX. #1317A
BaseMLAlgois instantiated from aDatasetand either aBaseMLAlgoSettingsinstance defining all settings or a few settings; the signature isself, data: Dataset, settings_model: BaseMLAlgoSettings, **settings: Any).The dictionary
BaseMLAlgo.parametershas been replaced by the read-only Pydantic modelBaseMLAlgo.settings.BaseMLAlgo.IDENTITYhas been removed; usegemseo.utils.constants.READ_ONLY_EMPTY_DICTinstead.A
BaseFormulationis instantiated from a set of disciplines, objective name(s), aDesignSpaceand either aBaseFormulationinstance defining all settings or a few settings; the signature isself, disciplines: Iterable[Discipline], objective_name: str | Sequence[str], design_space: DesignSpace data: Dataset, settings_model: BaseFormulationSettings, **settings: Any).maximize_objectiveis no longer an argument or an option ofBaseFormulation; useBaseFormulation.optimization_problem.minimize_objectiveto minimize or maximize the objective (default: minimize). #1314The settings of any machine learning algorithm are validated using a Pydantic model, whose class is
BaseMLAlgo.Settingsand instance isBaseMLAlgo.settings.
MDA#
The method
_runis renamed to_execute.The following properties of
BaseMDAhas been removed:acceleration_method,over_relaxation_factor,max_mda_iter,log_convergence,tolerance.
The following properties of
MDAChainhas been removed:max_mda_iter,log_convergence,
The following property of
MDASequentialhas been removed:log_convergence,
The
inner_mda_nameargument ofMDFandBiLevelformulations has been removed. When relevant, this argument must now be passed viamain_mda_settings={"inner_mda_name": "foo"}. #1322MDA.RESIDUALS_NORMis nowMDA.NORMALIZED_RESIDUAL_NORM.MDAQuasiNewton: the quasi-Newton method names are no longer attributes but names of the enumerationMDAQuasiNewton.QuasiNewtonMethod.MDANewtonRaphson'srelax_factorargument and attributes removed; useover_relaxation_factorinstead.MDAJacobi'sSECANT_ACCELERATIONandM2D_ACCELERATIONattributes removed; useAccelerationMethodinstead.MDAJacobi'saccelerationargument and attribute removed; useacceleration_methodinstead.MDAJacobi'sover_relax_factorargument and attribute removed; useover_relaxation_factorinstead.mda:base_mdaMDA:BaseMDAgemseo.mda.newton: removed; instead:import
MDANewtonRaphsonfromgemseo.mda.newton_raphsonimport
MDAQuasiNewtonfromgemseo.mda.quasi_newtonimport
MDARootfromgemseo.mda.root
MDANewtonRaphsonno longer has aparallelargument; set then_processesargument to1for serial computation (default: parallel computation using all the CPUs in the system).MDA classes no longer have
execute_all_disciplinesandlinearize_all_disciplinesmethods.MDAJacobi.n_processes: removed.BaseMDARoot.use_threading: removed.BaseMDARoot.n_processes: removed.BaseMDARoot.parallel: removed. #1278BaseMDA:linear_solver_optionsis nowlinear_solver_settings,MDANewtonRaphson:newton_linear_solver_optionsis nownewton_linear_solver_settings,MDAChain:inner_mda_optionsis nowinner_mda_settings,mdachain_parallel_optionsis nowmdachain_parallel_settings.The following
BaseMDAattributes names have been modified:BaseMDA.linear_solveris now accessed viaBaseMDA.settings.linear_solver,BaseMDA.linear_solver_optionsis now accessed viaBaseMDA.settings.linear_solver_settings,BaseMDA.linear_solver_toleranceis now accessed viaBaseMDA.settings.linear_solver_tolerance,BaseMDA.max_mda_iteris now accessed viaBaseMDA.settings.max_mda_iter,BaseMDA.toleranceis now accessed viaBaseMDA.settings.tolerance,BaseMDA.use_lu_factis now accessed viaBaseMDA.settings.use_lu_fact,BaseMDA.warm_startis now accessed viaBaseMDA.settings.warm_start.
The inner MDA settings of
MDAChaincan no longer be passed using**inner_mda_options, and must now be passed either as dictionnary or an instance ofMDAChain_Settings.The signature of
MDAGSNewtonhas been modified. Settings for theMDAGaussSeideland theMDANewtonRaphsonare now respectively passed via thegauss_seidel_settingsand thenewton_settingsarguments, which can be either key/value pairs or the appropriate Pydantic settings model.The MDA settings for the
IDFformulation are now passed via themda_chain_settings_for_start_at_equilibriumargument which can be either key/value pairs or anMDAChain_Settingsinstance.
- The MDA settings for the
MDFandBiLevelformulations are now passed via themain_mda_settingsargument which can be either key/value pairs or an appropriate Pydantic settings model.
MDOFunction#
NormFunction: removed as it was only used internally byOptimizationProblem.preprocess_functions; replaced byProblemFunction.NormDBFunction: removed as it was only used internally byOptimizationProblem.preprocess_functions; replaced byProblemFunction.MDOFunction.n_calls: removed; onlyProblemFunctionhas this mechanism.gemseo.core.mdofunctions.func_operations.LinearCompositionrenamed togemseo.core.mdofunctions.linear_composite_function.LinearCompositeFunction.gemseo.core.mdofunctions.func_operations.RestrictedFunctionrenamed togemseo.core.mdofunctions.restricted_function.RestrictedFunction.LinearCompositeFunction.nameis"[f o A]"where"f"is the name of the original function.The
MDOFunctionsubclasses wrappingMDOFunctionobjects use thefuncmethods of these objects instead ofevaluatefor the sake of efficiency. #1220MDOFunction.__call__: removed; useMDOFunction.evaluateinstead.MDOFunction.funcis now an alias of the wrapped functionMDOFunction._func; useMDOFunction.evaluateto both evaluate_funcand increment the number of calls whenMDOFunction.activate_countersisTrue.MDOFunction'sexpects_normalized_inputsargument renamed towith_normalized_inputs. #1221
Post processing#
Post-processing classes use
Pydanticmodels instead ofJSONGrammar, the models are available via the class attributeSettings.Renamed the class
OptPostProcessortoBasePost.Removed the method
OptPostProcessor.check_options.Renamed the attribute
OptPostProcessor.output_filestoBasePost.output_file_paths.Removed the attribute
OptPostProcessor.opt_grammar.Removed the attribute
DEFAULT_FIG_SIZEfor all post processing classes, use thefig_sizefield of thePydanticmodel instead.The arguments of the method
OptPostProcessor.executeare all keyword arguments.The argument
opt_problemof the methodOptPostProcessor.executecan no longer be astr.The arguments of the method
PostFactory.executeare keyword arguments in addition to the argumentsopt_problem,post_name.Renamed the module
scatter_mat.pytoscatter_plot_matrix.py.Renamed the module
para_coord.pytoparallel_coordinates.py.Removed the attribute
Animation.DEFAULT_OPT_POST_PROCESSOR.Removed the attributes
ConstraintsHistory.cmap,ConstraintsHistory.ineq_cstr_cmap,ConstraintsHistory.eq_cstr_cmap.Removed the attributes
OptHistoryView.cmap,OptHistoryView.ineq_cstr_cmap,OptHistoryView.eq_cstr_cmap.Removed the attribute
QuadApprox.grad_opt.Removed the attributes
SOM.cmap,SOM.som.Removed the method
OptPostProcessor.list_generated_plots. #1091Following the recommendation of matplotlib, the names
axand pluralizedaxshave been preferred overaxesbecause for the latter it's not clear if it refers to a singleAxesinstance or a collection of these. #1306
Uncertainty#
gemseo.uncertainty.use_cases:gemseo.problems.uncertainty#1147All the arguments of
Resamplerhave default values exceptmodel; the argumentspredictandoutput_data_shapehave been removed. #1156gemseo.uncertainty.sensitivity.analysis:gemseo.uncertainty.sensitivity.base_sensitivity_analysisgemseo.uncertainty.sensitivity.correlation.analysis:gemseo.uncertainty.sensitivity.correlation_analysisgemseo.uncertainty.sensitivity.hsic.analysis:gemseo.uncertainty.sensitivity.hsic_analysisgemseo.uncertainty.sensitivity.morris.analysis:gemseo.uncertainty.sensitivity.morris_analysisgemseo.uncertainty.sensitivity.sobol.analysis:gemseo.uncertainty.sensitivity.sobol_analysis#1205gemseo.uncertainty.statistics.parametricrenamed togemseo.uncertainty.statistics.parametric_statistics.gemseo.uncertainty.statistics.empiricalrenamed togemseo.uncertainty.statistics.empirical_statistics. #1206
Factories#
gemseo.algos.doe.doe_factory:gemseo.algos.doe.factorygemseo.linear_solvers.linear_solvers_factory:gemseo.algos.linear_solvers.factorygemseo.algos.ode.ode_solvers_factory:gemseo.algos.ode.factorygemseo.algos.opt.opt_factory:gemseo.algos.opt.factorygemseo.algos.opt.opt_factory:gemseo.algos.opt.factorygemseo.algos.sequence_transformer.sequence_transformer_factory:gemseo.algos.sequence_transformer.factorygemseo.caches.cache_factory:gemseo.caches.factorygemseo.caches.cache_factory:gemseo.caches.factorygemseo.datasets.dataset_factory:gemseo.datasets.factorygemseo.formulations.dataset_factory:gemseo.formulations.factorygemseo.mda.mda_factory:gemseo.mda.factorygemseo.post.post_factory:gemseo.post.factorygemseo.post.post_factory:gemseo.post.factorygemseo.post.dataset.base_plot:gemseo.post.dataset.plots.base_plotgemseo.post.dataset.plot_factory:gemseo.post.dataset.plots.factorygemseo.post.dataset.plot_factory_factory:gemseo.post.dataset.plots.factory_factorygemseo.problems.disciplines_factory:gemseo.problems.factorygemseo.scenarios.scenario_results.scenario_result_factory:gemseo.scenarios.scenario_results.factorygemseo.utils.derivatives.gradient_approximator_factory:gemseo.utils.derivatives.factorygemseo.wrappers.job_schedulers.schedulers_factory:gemseo.wrappers.job_schedulers.factoryBaseFormulationsFactory:FormulationFactoryDisciplinesFactory:MDODisciplineFactoryDOEFactory:DOELibraryFactoryLinearSolversFactory:LinearSolverLibraryFactoryODESolversFactory:ODESolverLibraryFactoryODESolverLib:BaseODESolverLibraryOptimizersFactory:OptimizationLibraryFactorySchedulersFactory:JobSchedulerDisciplineWrapperFactory#1161DistributionFactory.available_distributions: removed; useDistributionFactory.class_namesinstead.GrammarFactory.grammars: removed; useGrammarFactory.class_namesinstead.DatasetPlotFactory.plots: removed; useDatasetPlotFactory.class_namesinstead.SensitivityAnalysisFactory.available_sensitivity_analyses: removed; useSensitivityAnalysisFactory.class_namesinstead.CacheFactory.caches: removed; useCacheFactory.class_namesinstead.MDODisciplineFactory.disciplines: removed; useMDODisciplineFactory.class_namesinstead.BaseFormulationFactory.formulations: removed; useBaseFormulationFactory.class_namesinstead.MDAFactory.mdas: removed; useMDAFactory.class_namesinstead.MLAlgoFactory.models: removed; useMLAlgoFactory.class_namesinstead.PostFactoryrenamed toOptPostProcessorFactory.OptPostProcessorFactory.posts: removed; useOptPostProcessorFactory.class_namesinstead.ScalableModelFactory.scalable_models: removed; useScalableModelFactory.class_namesinstead.GradientApproximatorFactory.gradient_approximators: removed; useGradientApproximatorFactory.class_namesinstead.JobSchedulerDisciplineWrapperFactory.scheduler_names: removed; useJobSchedulerDisciplineWrapperFactory.class_namesinstead. #1240
Problems#
gemseo.problems.analytical:gemseo.problems.optimizationgemseo.problems.aerostructure:gemseo.problems.mdo.aerostructuregemseo.problems.propane:gemseo.problems.mdo.propanegemseo.problems.scalable:gemseo.problems.mdo.scalablegemseo.problems.sellar:gemseo.problems.mdo.sellargemseo.problems.sobieski:gemseo.problems.mdo.sobieskigemseo.problems.analytical.rosenbrock.RosenMF:gemseo.problems.optimization.rosen_mf.RosenMFgemseo.problems.disciplines_factory:gemseo.disciplines.disciplines_factorygemseo.problems.topo_opt:gemseo.problems.topology_optimizationgemseo.problems.binh_korn:gemseo.problems.multiobjective_optimization.binh_korngemseo.problems.fonseca_fleming:gemseo.problems.multiobjective_optimization.fonseca_fleminggemseo.problems.poloni:gemseo.problems.multiobjective_optimization.polonigemseo.problems.viennet:gemseo.problems.multiobjective_optimization.viennet#1162The module
sellarhas been removed fromgemseo.problems.sellar; instead of this module, use the modulessellar_1forSellar1,sellar_2forSellar2,sellar_systemforSellarSystem,variablesfor the variable names andutilsforget_inputs(renamed toget_initial_data) andget_y_opt. #1164
Sensitivity Analysis#
BaseSensitivityAnalysisand its subclasses (MorrisAnalysis,SobolAnalysis,CorrelationAnalysisandHSICAnalysis) no longer compute samples at instantiation but with a specific method, namelycompute_samples, whose signature matches that of the previous constructor and which returns samples as anIODataset. One can also instantiate these classes from existing samples and then directly use the methodcompute_indices.create_sensitivity_analysiscreates aBaseSensitivityAnalysisfrom samples; if missing, use the methodcompute_samplesof theBaseSensitivityAnalysis.BaseSensitivityAnalysis.to_pickleandBaseSensitivityAnalysis.from_pickle: removed; instantiateBaseSensitivityAnalysisfrom anIODatasetinstead, which could typically be generated byBaseSensitivityAnalysis.compute_samples. #1203BaseSensitivityAnalysis.indicesis now a dataclass to be used asanalysis.indices.index_name[output_name][output_component][input_name].CorrelationAnalysis.kendall: removed; useCorrelationAnalysis.indices.kendallinstead.CorrelationAnalysis.pcc: removed; useCorrelationAnalysis.indices.pccinstead.CorrelationAnalysis.pearson: removed; useCorrelationAnalysis.indices.pearsoninstead.CorrelationAnalysis.prcc: removed; useCorrelationAnalysis.indices.prccinstead.CorrelationAnalysis.spearman: removed; useCorrelationAnalysis.indices.spearmaninstead.CorrelationAnalysis.src: removed; useCorrelationAnalysis.indices.srcinstead.CorrelationAnalysis.srrc: removed; useCorrelationAnalysis.indices.srrcinstead.CorrelationAnalysis.ssrc: removed; useCorrelationAnalysis.indices.ssrcinstead.SobolAnalysis.first_order_indices: removed; useSobolAnalysis.indices.firstinstead.SobolAnalysis.second_order_indices: removed; useSobolAnalysis.indices.secondinstead.SobolAnalysis.total_order_indices: removed; useSobolAnalysis.indices.totalinstead.SobolAnalysis.total_order_indices: removed; useSobolAnalysis.indices.totalinstead.HSICAnalysis.hsic: removed; useHSICAnalysis.indices.hsicinstead.HSICAnalysis.r2_hsic: removed; useHSICAnalysis.indices.r2_hsicinstead.HSICAnalysis.p_value_permutation: removed; useHSICAnalysis.indices.p_value_permutationinstead.HSICAnalysis.p_value_asymptotic: removed; useHSICAnalysis.indices.p_value_asymptoticinstead.MorrisAnalysis.mu: removed; useMorrisAnalysis.indices.muinstead.MorrisAnalysis.mu_star: removed; useMorrisAnalysis.indices.mu_starinstead.MorrisAnalysis.sigma: removed; useMorrisAnalysis.indices.sigmainstead.MorrisAnalysis.relative_sigma: removed; useMorrisAnalysis.indices.relative_sigmainstead.MorrisAnalysis.min: removed; useMorrisAnalysis.indices.mininstead.MorrisAnalysis.max: removed; useMorrisAnalysis.indices.maxinstead. #1211MorrisAnalysiscan now be used with outputs of size greater than 1. #1212BaseSensitivityAnalysis: the argumentsinputshave been renamed toinput_names.BaseSensitivityAnalysis.compute_indices'soutputsargument has been renamed tooutput_names.BaseSensitivityAnalysis's.sort_parametersmethod renamed tosort_input_variables. #1242The
SobolAnalysis.output_variancesare estimated using twice as many samples, i.e. bothAandBbatches of the pick-freeze technique instead ofAonly. #1185SensitivityAnalysis.outputsrenamed toSensitivityAnalysis.output_names.
Miscellaneous#
The
MDODisciplineAdapter'slinear_candidateargument; this is now deduced at instantiation. #1207KMeansderived fromOptPostProcessor; useKMeansderived fromBaseMLAlgoinstead, based on aDatasetgenerated from anOptimizationProblemor aBaseScenario. #1248API change:
gemseo.utils.linear_solver.LinearSolverhas been removed; usegemseo.algos.linear_solversinstead. #1260Removed the
n_processesattribute and argument ofMDAChain. When the inner MDA class has this argument, it can be set through the**inner_mda_optionsoptions of theMDAChain#1295The public method
real_part_obj_funfromScipyGlobalOpthas been removed.The
ctolsetting forNlopthas been removed. Instead, use the (already existing) settingseq_toleranceandineq_tolerance.The
solver_optionsattribute ofLinearProblemhas been removed.The
methods_mapclass variable ofScipyLinalgAlgoshas been removed. It is replaced by the private class variable__NAMES_TO_FUNCTIONS.MDOFunction.to_pickle: removed; use theto_picklefunction instead.MDOFunction.from_pickle: removed; use thefrom_picklefunction instead.BaseSensitivityAnalysis.to_pickle: removed; use theto_picklefunction instead.BaseSensitivityAnalysis.from_pickle: removed; use thefrom_picklefunction instead.load_sensitivity_analysis: removed; use thefrom_picklefunction instead.The arguments
each_new_iter,each_store,pre_loadandgenerate_opt_plotofBaseScenario.set_optimization_history_backupare renamed toat_each_iteration,at_each_function_call,loadandplotrespectively. #1187gemseo.core.base_formulation:gemseo.formulations.base_formulationgemseo.core.formulation:gemseo.formulations.mdo_formulationgemseo.formulations.formulations_factory:gemseo.formulations.factorygemseo.core.base_formulation.BaseFormulationsFactory:gemseo.formulations.base_factory.BaseFormulationFactoryMDOFormulationsFactory:MDOFormulationFactorygemseo.core.cache:gemseo.caches.base_cachegemseo.core.cache.AbstractFullCache:gemseo.caches.base_full_cache.BaseFullCacheAbstractCache:BaseCacheAbstractFullCache:BaseFullCachegemseo.core.cache.CacheEntry:gemseo.caches.cache_entry.CacheEntrygemseo.core.cache.hash_data_dict:gemseo.caches.utils.hash_datagemseo.core.cache.to_real:gemseo.caches.utils.to_realgemseo.caches.hdf5_file_singleton: removed (the namesake class is available in a protected module)gemseo.core.scenario.Scenario:gemseo.scenarios.base_scenario.BaseScenariogemseo.core.doe_scenario:gemseo.scenarios.doe_scenariogemseo.core.mdo_scenario:gemseo.scenarios.mdo_scenariogemseo.algos.opt_problemrenamed togemseo.algos.optimization_problem.gemseo.algos.opt_resultrenamed togemseo.algos.optimization_result.gemseo.algos.opt_resultrenamed togemseo.algos.multiobjective_optimization_result.gemseo.algos.paretorenamed togemseo.algos.pareto.pareto_front.gemseo.algos.pareto_frontsplit intogemseo.algos.pareto.utils(includingcompute_pareto_optimal_pointsandgenerate_pareto_plots) andgemseo.algos.pareto.pareto_plot_biobjective(includingParetoPlotBiObjective).OptPostProcessor'sopt_grammarargument renamed tooption_grammar.FininiteElementAnalysisrenamed toFiniteElementAnalysis.gemseo.SEED: removed; usegemseo.utils.seeder.SEEDinstead.gemseo.algos.progress_bar: removed; replace by the protected packagegemseo.algos._progress_bars.The
N_CPUSconstants have been replaced by a unique one ingemseo.utils.constants. #928renamed the argument
sizeofcompute_doeton_samples.renamed the argument
sizeofBaseDOELibrary.compute_doeton_samples. #979gemseo.utils.multiprocessing.get_multi_processing_managermoved togemseo.utils.multiprocessing.manager.gemseo.utils.data_conversion.dict_to_array: removed; use `` gemseo.utils.data_conversion .concatenate_dict_of_arrays_to_array`` instead.gemseo.utils.data_conversion.array_to_dict: removed; use `` gemseo.utils.data_conversion.split_array_to_dict_of_arrays`` instead.gemseo.utils.data_conversion.update_dict_of_arrays_from_array: removed since it was not used.Argument
observationsof methodsplot_residuals_vs_observations,plot_residuals_vs_inputsandplot_predictions_vs_observationsof classMLRegressorQualityVieweris either aMLRegressorQualityViewer.ReferenceDatasetor aDataset. #1122gradient_approximator:base_gradient_approximatorGradientApproximator:BaseGradientApproximator#1129DependencyGraph.write_condensed_graph:DependencyGraph.render_condensed_graphDependencyGraph.write_full_graph:DependencyGraph.render_full_graph#1341GaussianMixture'sn_componentsargument renamed ton_clusters; anyBaseClustererhas this argument. #1235The executable
deserialize-and-runno longer takes the working directory as its first argument. The working directory, if needed, shall be set before calling it. #1238MDOCouplingStructurerenamed toCouplingStructure. #1267MDODisciplineAdapter.linear_candidate:MDODisciplineAdapter.is_linear.ConsistencyCstr:ConsistencyConstraint.ConsistencyCstr.linear_candidateremoved; useConsistencyConstraint.coupling_function.discipline_adapter.is_linearinstead.ConsistencyCstr.input_dimensionremoved; useConsistencyConstraint.coupling_function.discipline_adapter.input_dimensioninstead.FunctionFromDiscipline.linear_candidateremoved; useFunctionFromDiscipline.discipline_adapter.is_linearinstead.FunctionFromDiscipline.input_dimensionremoved; useFunctionFromDiscipline.discipline_adapter.input_dimensioninstead.LinearCandidateFunction: removed.FunctionFromDiscipline'sdifferentiableargument:is_differentiable.MDODisciplineAdapterGenerator.get_function'sdifferentiableargument:is_differentiable. #1223gemseo.caches._hdf5_file_singletonincludingHDF5FileSingletonis now a protected module.BaseMDOFormulation'sNAMEattribute: removed as it was not longer used.gemseo.formulations.mdo_formulation.MDOFormulationrenamed togemseo.formulations.base_mdo_formulation.BaseMDOFormulation#1084BaseGrammmar.update'sexclude_namesargument renamed toexcluded_names.DirectoryCreator.get_unique_run_folder_pathremoved; useDirectoryCreator.createinstead.RestrictedFunction'sorig_functionargument renamed tofunction.LinearCompositeFunction'sorig_functionargument renamed tofunction.LinearCompositeFunction'sinterp_operatorargument renamed tomatrix.ScalableDiagonalApproximation'sseedargument: removed since it was not used. #1052
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.
CouplingStructure.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.mdo.scalable.data_driven.apihave been moved togemseo.problems.mdo.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.mdo.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
BaseSensitivityAnalysis.export_to_datasettoBaseSensitivityAnalysis.to_dataset.Rename
BaseSensitivityAnalysis.savetoBaseSensitivityAnalysis.to_pickle.Rename
BaseSensitivityAnalysis.loadtoBaseSensitivityAnalysis.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().In
CompositeExecSequence: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_name="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