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
MDODiscipline
has been renamed toDiscipline
, some of its many attributes and methods have been gathered in sub objects via the attributes .io, .execution_statistics, .execution_status and the method get_process_flow.The signature of the method
__init__
has the following changes:The arguments use auto_detect_grammar_files is removed, now use the class attribute auto_detect_grammar_files.
The arguments input_grammar_file, output_grammar_file are removed, use auto_detect_grammar_files.
The argument grammar_type is removed, now use the class attribute default_grammar_type.
The argument cache_type is removed, now use the class attribute default_cache_type.
The argument cache_file_path is removed, now use the method set_cache.
The method
_run
now takesinput_data
as argument and may return the output data, this allow a more natural and clearer implementation of the main business logic of a discipline. Moreover, using the providedinput_data
and also returning the output data will ensure that a discipline can be used with namespaces. Besides the addition of this new method argument in the signature, the usage ofinput_data
is optional, as well as returning the output data: i.e. the body of_run
could be left unchanged. But in that case it is not guaranteed to support the use of namespaces.The signature of
_compute_jacobian
is now_compute_jacobian(self, input_names=(), output_names=())
.The attributes have the following changes:
.residual_variables: now use .io.state_equations_are_solved
.run_solves_residuals: now use .io.state_equations_are_solved
.exec_for_lin: is removed
.activate_counters: now use .execution_statistics.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 use gemseo.utils.constants.N_CPUS
.linear_relationships: is removed, call io.have_linear_relationships
.disciplines: is removed and only available for classes that derive from ProcessDiscipline
.time_stamps: now use .execution_statistics.time_stamps
.n_calls: now use .execution_statistics.n_calls
.exec_time: now use .execution_statistics.duration
.n_calls_linearize: now use .execution_statistics.n_calls_linearize
.grammar_type: now use .io.grammar_type
.auto_get_grammar_file: now is a class attribute
.status: now use .execution_status.value
.cache_tol: now use .cache.tolerance
.default_inputs: now use .default_input_data
.default_outputs: now use .default_output_data
.is_scenario: is removed
.data_processor: now use .io.data_processor
.ReExecutionPolicy: is removed
.ExecutionStatus: now use .io.execution_status.Status
.ExecutionStatus.PENDING: is removed
The methods have the following changes:
.activate_time_stamps: now use .execution_statistics.is_time_stamps_enabled
.deactivate_time_stamps: now use .execution_statistics.is_time_stamps_enabled
.set_linear_relationships: now use io.set_linear_relationships
.set_disciplines_statuses: was removed
.is_output_existing: now use .output_grammar.names
.is_all_outputs_existing: now use .output_grammar.names
.is_all_inputs_existing: now use .input_grammar.names
.is_input_existing: now use .input_grammar.names
.reset_statuses_for_run: is removed
.add_status_observer: now use .execution_status.add_observer
.remove_status_observer: now use .execution_status.remove_observer
.notify_status_observers: is removed
.store_local_data: now use .io.update_output_data
.check_input_data: now use .input_grammar.validate
.check_output_data: now use .output_grammar.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 .get_input_data
.get_output_data_names: now use .get_output_data
.get_input_output_data_names: now use .local_data
.get_all_inputs: now use .get_input_data
.get_all_outputs: now use .get_output_data
.to_pickle: now use gemseo.to_pickle
.from_pickle: now use gemseo.from_pickle
.get_local_data_by_name: nw use .local_data
.get_data_list_from_dict: is removed
DesignSpace#
DesignSpace
andParameterSpace
no longer provide a dictionary-like interface to manipulate its items with square brackets[]
.The
DesignSpace.add_variables_from
method can be used to add variables from existing variable spaces.The class
DesignSpace.DesignVariable
no longer exists.A variable of a
DesignSpace
can no longer have one type (float or integer) per component, but rather a single type, shared by all its components.DesignSpace.add_variable
no longer accepts a sequence of variable types for itsvar_type
argument.The values of dictionary
DesignSpace.variable_types
are no longer NumPy arrays of strings, but simple strings.The components of a (lower or upper) bound of a
DesignSpace
variable can no longer beNone
. Unboundedness shall be encoded with-numpy.inf
for lower bounds, andnumpy.inf
for upper bounds.DesignSpace.add_variable
no longer acceptsNone
for its argumentsl_b
andu_b
. These two arguments now default to-numpy.inf
andnumpy.inf
respectively.DesignSpace.set_lower_bound
andDesignSpace.set_upper_bound
no longer acceptNone
arguments, but rather infinities.The return values of
DesignSpace.get_lower_bound
andDesignSpace.get_upper_bound
can no longer beNone
, but rather NumPy arrays of infinite values.Arguments
var_type
,l_b
andu_b
are respectively renamedtype_
,lower_bound
andupper_bound
.The method
array_to_dict
is renamedconvert_array_to_dict
.The method
dict_to_array
is renamedconvert_dict_to_array
.The method
has_current_value
is now a property.The method
has_integer_variables
is now a property. #709DesignSpace.filter_dim
renamed toDesignSpace.filter_dimensions
, its first argumentvariable
renamed toname
, and its second argumentkeep_dimensions
todimensions
. #1218DesignSpace.get_indexed_var_name
is removed. UseDesignSpace.get_indexed_variable_names
instead.DesignSpace.SEP
is removed.The
DesignSpace.get_indexed_variable_names
method 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_func
argument renamed tocallback
.OptimizationProblem.change_objective_sign
: removed; useOptimizationProblem.minimize_objective
instead.cstr_type
inOptimizationProblem.add_constraint
:constraint_type
cstr_type
inOptimizationProblem.repr_constraint
:constraint_type
cstr_func
inOptimizationProblem.add_constraint
:function
cstr_func
inOptimizationProblem.add_eq_constraint
:function
cstr_func
inOptimizationProblem.add_ineq_constraint
:function
obs_func
inOptimizationProblem.add_observable
:observable
func
inOptimizationProblem.repr_constraint
:function
callback_func
inOptimizationProblem.add_callback
:callback
The default value of the
value
argument of theadd_constraint
methods is0
instead ofNone
; this does not change the behavior asNone
was 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.dimension
instead.OptimizationProblem.check_format
: removed as it was only used internally.OptimizationProblem.get_eq_cstr_total_dim
: removed; useOptimizationProblem.constraints.get_equality_constraints().dimension
instead.OptimizationProblem.get_ineq_cstr_total_dim
: removed; useOptimizationProblem.constraints.get_inequality_constraints().dimension
instead.OptimizationProblem.get_optimum
(method):OptimizationProblem.optimum
(property).OptimizationProblem.current_names
:OptimizationProblem.original_to_current_names
.OptimizationProblem.get_constraint_names
: removed; useOptimizationProblem.constraints.get_names
instead.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.original
instead.OptimizationProblem.get_nonproc_constraints
: removed; useOptimizationProblem.constraints.get_originals
instead.OptimizationProblem.get_all_functions
: removed; useOptimizationProblem.original_functions
andOptimizationProblem.functions
instead.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.HDF5
instead.OptimizationProblem.GGOBI_FORMAT
: removed; useOptimizationProblem.HistoryFileFormat.GGOBI
instead.OptimizationProblem.add_eq_constraint
: removed; useOptimizationProblem.add_constraint
withconstraint_type="eq"
instead.OptimizationProblem.add_ineq_constraint
: removed; useOptimizationProblem.add_constraint
withconstraint_type="ineq"
instead.OptimizationProblem.OptimumType
: removed; use the namedtupleOptimizationProblem.Solution
instead.OptimizationProblem.ineq_tolerance
: removed; useOptimization.tolerances.inequality
instead.OptimizationProblem.eq_tolerance
: removed; useOptimization.tolerances.equality
instead.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_inputs
instead.OptimizationProblem.get_active_ineq_constraints
: removed; useOptimizationProblem.constraints.get_active
instead.OptimizationProblem.execute_observables_callback
: removed; useOptimizationProblem.new_iter_observables.evaluate
instead.OptimizationProblem.aggregate_constraint
: removed; useOptimizationProblem.constraints.aggregate
instead.OptimizationProblem.original_to_current_names
: removed; useOptimizationProblem.constraints.original_to_current_names
instead.OptimizationProblem.get_observable
: removed; useOptimizationProblem.observables.get_from_name
instead.OptimizationProblem.is_point_feasible
: removed; useOptimizationProblem.constraints.is_point_feasible
instead.OptimizationProblem.get_feasible_points
: removed; useOptimizationProblem.history.feasible_points
instead.OptimizationProblem.check_design_point_is_feasible
: removed; useOptimizationProblem.history.check_design_point_is_feasible
instead.OptimizationProblem.get_number_of_unsatisfied_constraints
: removed; useOptimizationProblem.constraints.get_number_of_unsatisfied_constraints
instead.OptimizationProblem.get_data_by_names
: removed; useOptimizationProblem.history.get_data_by_names
instead.OptimizationProblem.get_last_point
: removed; useOptimizationProblem.history.last_point
instead.OptimizationProblem.activate_bound_check
renamed toOptimizationProblem.check_bounds
.OptimizationProblem
'sinput_database
argument renamed todatabase
.OptimizationProblem.variable_names
removed; useOptimizationProblem.design_space.variable_names
instead.OptimizationProblem.dimension
removed; useOptimizationProblem.design_space.dimension
instead.OptimizationProblem.add_callback
renamed toOptimizationProblem.add_listener
, itseach_new_iter
argument toat_each_iteration
and itseach_store
argument toat_each_function_call
.OptimizationProblem.evaluate_functions
'seval_jac
argument renamed tocompute_jacobians
.OptimizationProblem.evaluate_functions
'seval_observables
argument renamed toevaluate_observables
.OptimizationProblem.evaluate_functions
'seval_obj
argument renamed toevaluate_objective
.OptimizationProblem.evaluate_functions
'sx_vect
argument renamed todesign_vector
.OptimizationProblem.evaluate_functions
'snormalize
argument 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_linear
instead.OptimizationProblem
'spb_type
: removed; use the boolean argumentis_linear
instead.OptimizationProblem.clear_listeners
: removed as it was no longer used; useEvaluationProblem.database.clear_listeners
instead.OptimizationProblem
'sfd_step
attribute and argument renamed todifferentiation_step
.OptimizationProblem
'sdatabase
argument can no longer be a file path and thehdf_node_path
argument has been removed; useDatabase.from_hdf(file_path, hdf_node_path=hdf_node_path)
to pass aDatabase
relying on a HDF5 file.OptimizationProblem
'sget_x0_normalized
removed; useOptimizationProblem.design_space.get_current_value
instead. #1104OptimizationProblem.get_violation_criteria
renamed toOptimizationProblem.check_design_point_is_feasible
.
Distributions#
ComposedDistribution
:JointDistribution
OTComposedDistribution
:OTJointDistribution
SPComposedDistribution
:SPJointDistribution
ParameterSpace.build_composed_distribution
:ParameterSpace.build_joint_distribution
Distribution.COMPOSED_DISTRIBUTION_CLASS
:Distribution.JOINT_DISTRIBUTION_CLASS
DistributionFactory.create_composed_distribution
:DistributionFactory.create_joint_distribution
gemseo.uncertainty.distributions.composed
:gemseo.uncertainty.distributions.joint
gemseo.uncertainty.distributions.scipy.composed
:gemseo.uncertainty.distributions.scipy.joint
gemseo.uncertainty.distributions.openturns.composed
:gemseo.uncertainty.distributions.openturns.joint
gemseo.algos.parameter_space.build_composed_distribution
:gemseo.algos.parameter_space.build_joint_distribution
#989The
dimension
argument ofBaseDistribution
has been removed as it no longer makes sense for distributions modelling scalar random variables.Any class deriving from
BaseDistribution
andScalarDistributionMixin
models a scalar random variable, e.g.OTDistribution
andSPDistribution
, while theBaseJointDistribution
models a random vector.BaseJointDistribution.plot
has been removed; useBaseJointDistribution.marginals[i].plot
instead.BaseDistribution.plot_all
: removed; usedScalarDistributionMixin.plot
instead.BaseDistribution.marginals
: removed; onlyBaseJointDistribution
has this attribute. #1183The
variable
argument ofBaseDistribution
has been removed as a probability distribution is not defined from a variable name.The
variable_name
attribute ofBaseDistribution
has been removed in connection with the removal of thevariable
argument. #1184BaseDistribution.distribution_name
has been removed as it was no longer used.BaseDistribution.parameters
has been removed as it was no longer used.BaseDistribution.standard_parameters
has been removed as it was no longer used. #1186The argument
use_asymptotic_distributions
is 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; useEvaluationType
instead.DOELibraryOptionType
: removed; useDriverLibraryOptionType
instead.DOELibrary.__call__
: removed; useBaseDOELibrary.compute_doe
instead.DOELibrary.evaluate_samples
: removed; useBaseDOELibrary.execute
instead.DOELibrary.eval_jac
: removed as it was no longer used; note, however, that the DOE algorithm optioneval_jac
is still available.DOELibrary.export_samples
: removed because it simply saved the NumPy arrayBaseDOELibrary.unit_samples
to a text file; usenumpy.savetxt(file_path, doe_library.unit_samples, delimiter=",")
to obtain the same result.
Disciplines#
AutoPyDiscipline.input_names
: removed; useDiscipline
API instead.AutoPyDiscipline.output_names
: removed; useDiscipline
API 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_evaluation
argument: removed; always use fast evaluation.SobieskiBase.DTYPE_COMPLEX
: removed; useSobieskiBase.DataType.COMPLEX
instead.SobieskiBase.DTYPE_DOUBLE
: removed; useSobieskiBase.DataType.FLOAT
instead.SobieskiBase.DTYPE_DEFAULT
: removed as it was no longer used.SobieskiDiscipline.DTYPE_COMPLEX
: removed; useSobieskiBase.DataType.COMPLEX
instead.SobieskiDiscipline.DTYPE_DOUBLE
: removed; useSobieskiBase.DataType.FLOAT
instead.Boxplot.opacity_level
: removed; use theopacity_level
option ofBoxplot
instead.DiscFromExe
'suse_shell
argument: removed as it was no longer used.DiscFromExe
'sexecutable_command
argument renamed tocommand_line
.DiscFromExe.executable_command
renamed toDiscFromExe.command_line
.DiscFromExe
'sfolders_iter
argument renamed todirectory_naming_method
.DiscFromExe
'soutput_folder_basepath
argument renamed toroot_directory
.RemappingDiscipline
maps the differentiated data names of the underlying discipline and use the same linearization mode. #1197gemseo.wrappers
renamed togemseo.disciplines.wrappers
. #1193The module
scheduler_wrapped_disc.py
was 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_model
andimport_clustering_model
); use the functionsto_pickle
andfrom_pickle
instead. #540MLQualityMeasure.evaluate_bootstrap
: removed; useBaseMLAlgoQuality.compute_bootstrap_measure
instead.MLQualityMeasure.evaluate_kfolds
: removed; useBaseMLAlgoQuality.compute_cross_validation_measure
instead.MLQualityMeasure.evaluate_learn
: removed; useBaseMLAlgoQuality.compute_learning_measure
instead.MLQualityMeasure.evaluate_loo
: removed; useBaseMLAlgoQuality.compute_leave_one_out_measure
instead.MLQualityMeasure.evaluate_test
: removed; useBaseMLAlgoQuality.compute_test_measure
instead.SensitivityAnalysis
:BaseSensitivityAnalysis
ToleranceInterval
:BaseToleranceInterval
distribution.ToleranceIntervalFactory
:factory.ToleranceIntervalFactory
distribution
:base_distribution
Distribution
:BaseDistribution
MLClassificationAlgo
:BaseClassifier
MLClusteringAlgo
:BaseClusterer
MLClassificationAlgo
:BaseClassifier
MLAlgo
:BaseMLAlgo
MLQualityMeasure
:BaseMLAlgoQuality
MLErrorMeasure
:BaseRegressorQuality
MLClusteringMeasure
:BaseClustererQuality
MLPredictiveClusteringMeasure
:BasePredictiveClustererQuality
MLRegressionAlgo
:BaseRegressor
resampler
:base_resampler
Resampler
:BaseResampler
transformer
:base_transformer
Transformer
:BaseTransformer
dimension_reduction
:base_dimension_reduction
DimensionReduction
:BaseDimensionReduction
gemseo.mlearning.classification
:the classification algorithms are in
gemseo.mlearning.classification.algos
the quality measures are in
gemseo.mlearning.classification.quality
gemseo.mlearning.classification.classification.MLClassificationAlgo
: renamed toBaseClassifier
ClassificationModelFactory
: renamed toClassifierFactory
gemseo.mlearning.clustering
:the clustering algorithms are in
gemseo.mlearning.clustering.algos
the quality measures are in
gemseo.mlearning.clustering.quality
gemseo.mlearning.clustering.clustering.MLClusteringAlgo
: renamed toBaseClusterer
ClusteringModelFactory
: renamed toClustererFactory
MLClusteringMeasure
: renamed toBaseClustererQuality
gemseo.mlearning.regression
:the regression algorithms are in
gemseo.mlearning.regression.algos
the quality measures are in
gemseo.mlearning.regression.quality
gemseo.mlearning.regression.regression.MLRegressionAlgo
: renamed toBaseRegressor
RegressionModelFactory
: renamed toRegressorFactory
MLErrorMeasure
: renamed toBaseRegressorQuality
MLErrorMeasureFactory
: renamed toRegressorQualityFactory
gemseo.mlearning.quality_measures
: removed; use instead:gemseo.mlearning.core.quality.factory.MLAlgoQualityFactory
gemseo.mlearning.core.quality.quality_measure.BaseMLAlgoQuality
gemseo.mlearning.classification.quality
for quality measures related to classifiersgemseo.mlearning.clustering.quality
for quality measures related to clusterersgemseo.mlearning.regression.quality
for quality measures related to regressors
Algorithms#
DriverLibrary.get_x0_and_bounds_vects
renamed toBaseDriverLibrary.get_x0_and_bounds
.DriverLibOptionType
renamed toDriverLibraryOptionType
.CustomDOE.read_file
'sdimension
argument: removed as it was unused.OptimizationLibrary.algorithm_handles_eqcstr
renamed toBaseOptimizationLibrary.check_equality_constraint_support
.OptimizationLibrary.algorithm_handles_ineqcstr
renamed toBaseOptimizationLibrary.check_inequality_constraint_support
.OptimizationLibrary.is_algo_requires_positive_cstr
renamed toBaseOptimizationLibrary.check_positivity_constraint_requirement
.The attribute
BaseDriverLibrary.MAX_DS_SIZE_PRINT
no longer exists; it is replaced by the argumentmax_design_space_dimension_to_log
ofBaseDriverLibrary.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_grammar
instead.AlgorithmLibrary.init_options_grammar
: removed; useBaseAlgorithmLibrary._init_options_grammar
instead, which will disappear in the next version.AlgorithmLibrary.opt_grammar
: removed; useBaseAlgorithmLibrary._option_grammar
instead, which will disappear in the next version.AlgorithmLibrary.OPTIONS_DIR
: removed; useBaseAlgorithmLibrary._OPTIONS_DIR
instead, which will disappear in the next version.AlgorithmLibrary.OPTIONS_MAP
: removed; useBaseAlgorithmLibrary._OPTIONS_MAP
instead, which will disappear in the next version.AlgorithmLibrary.internal_algo_name
: removed; useBaseAlgorithmLibrary.description[algo_name].internal_algo_name
instead.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.execute
instead.LinearSolverLibrary.solution
: removed; useproblem.solution
instead, whereproblem
is theLinearProblem
passed to the methodBaseLinearSolverLibrary.execute
.LinearSolverLibrary.save_fpath (str | None)
:BaseLinearSolverLibrary.file_path (Path)
.DriverLibrary.get_optimum_from_database
: removed; useOptimizationResult.from_optimization_problem
instead.DriverLibrary.ensure_bounds
: removed as it was no longer used.DriverLibrary.requires_gradient
: removed; useBaseDriverLibrary.description[algo_name].require_gradient
instead.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_bounds
instead.OptimizationLibrary.check_inequality_constraint_support
: removed; useBaseOptimizationLibrary.descriptions[algo_name].handle_inequality_constraints
instead.OptimizationLibrary.check_equality_constraint_support
: removed; useBaseOptimizationLibrary.descriptions[algo_name].handle_equality_constraints
instead.OptimizationLibrary.check_positivity_constraint_requirement
: removed; useBaseOptimizationLibrary.descriptions[algo_name].positive_constraints
instead.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_name
is now a read-only attribute; set the algorithm name at instantiation instead.OptimizationLibrary.execute
'salgo_name
attribute: 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
. #1224BaseAlgorithmLibrary
and its derived classes now validate their settings (referred to as options in previous versions of GEMSEO) using a Pydantic model. The Pydantic models replace theJSONGrammar
validation used in previous versions of GEMSEO. The aforementioned models have a hierarchical structure, for instance, theBaseDriverSettings
shall inherit fromBaseAlgorithmSettings
in the same way asBaseDriverLibrary
inherits fromBaseAlgorithmLibrary
. Instead of passing the settings one by one, a Pydantic model can be passed using the special argument"settings_model"
.The
CustomDOE
module has been renamed fromlib_custom_doe.py
tocustom_doe.py
.The
OpenTURNS
module has been renamed fromlib_openturns.py
toopenturns.py
.The
PyDOE
module has been renamed fromlib_pydoe.py
topydoe.py
.The
DiagonalDOE
module has ben renamed fromlib_scalable.py
toscalable.py
.The
SciPyDOE
module has been renamed fromlib_scipy.py
toscipy_doe.py
.The
delimiter
setting of theCustomDOE
no longer acceptsNone
as a value.The
ScipyODEAlgos
module has been renamed fromlib_scipy_ode.py
toscipy_ode.py
.The
ScipyGlobalOpt
module has been renamed fromlib_scipy_global.py
toscipy_global.py
.The
ScipyLinprog
module has been renamed fromlib_scipy_linprog.py
toscipy_linprog.py
.The following setting names for
ScipyLinprog
have been modified:max_iter
is nowmaxiter
,verbose
is nowdisp
,redundancy removal
is nowrr
,The
ScipyOpt
module has been renamed fromlib_scipy.py
toscipy_local.py
.The following setting names for
ScipyOpt
have been modified:
max_ls_step_size
is nowmaxls
,
max_ls_step_nb
is nowstepmx
,
max_fun_eval
is nowmaxfun
,
pg_tol
is nowgtol
,
The
ScipyMILP
module has been renamed fromlib_scipy_milp.py
toscipy_local_milp.py
.The following setting names for
ScipyMILP
has been modified:
max_iter
is nownode_limit
.The SciPy linear algebra library module has been renamed from
lib_scipy_linalg.py
toscipy_linalg.py
.The
DEFAULT
linear solver fromScipyLinalgAlgos
has 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_iter
is nowmaxiter
(for all the scipy.linalg algorithms)store_outer_av
is nowstore_outer_Av
(LGMRES)
The following setting names for
MNBI
have been modified:doe_algo_options
is nowdoe_algo_settings
,sub_optim_algo_options
is nowsub_optim_algo_settings
.
sub_solver_algorithm
inBaseAugmentedLagragian
:sub_algorithm_name
.sub_problem_options
inBaseAugmentedLagragian
: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_POINT
orDUAL_SIMPLEX
. #1317A
BaseMLAlgo
is instantiated from aDataset
and either aBaseMLAlgoSettings
instance defining all settings or a few settings; the signature isself, data: Dataset, settings_model: BaseMLAlgoSettings, **settings: Any)
.The dictionary
BaseMLAlgo.parameters
has been replaced by the read-only Pydantic modelBaseMLAlgo.settings
.BaseMLAlgo.IDENTITY
has been removed; usegemseo.utils.constants.READ_ONLY_EMPTY_DICT
instead.A
BaseFormulation
is instantiated from a set of disciplines, objective name(s), aDesignSpace
and either aBaseFormulation
instance 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_objective
is no longer an argument or an option ofBaseFormulation
; useBaseFormulation.optimization_problem.minimize_objective
to minimize or maximize the objective (default: minimize). #1314The settings of any machine learning algorithm are validated using a Pydantic model, whose class is
BaseMLAlgo.Settings
and instance isBaseMLAlgo.settings
.
MDA#
The method
_run
is renamed to_execute
.The following properties of
BaseMDA
has been removed:acceleration_method
,over_relaxation_factor
,max_mda_iter
,log_convergence
,tolerance
.
The following properties of
MDAChain
has been removed:max_mda_iter
,log_convergence
,
The following property of
MDASequential
has been removed:log_convergence
,
The
inner_mda_name
argument ofMDF
andBiLevel
formulations has been removed. When relevant, this argument must now be passed viamain_mda_settings={"inner_mda_name": "foo"}
. #1322MDA.RESIDUALS_NORM
is nowMDA.NORMALIZED_RESIDUAL_NORM
.MDAQuasiNewton
: the quasi-Newton method names are no longer attributes but names of the enumerationMDAQuasiNewton.QuasiNewtonMethod
.MDANewtonRaphson
'srelax_factor
argument and attributes removed; useover_relaxation_factor
instead.MDAJacobi
'sSECANT_ACCELERATION
andM2D_ACCELERATION
attributes removed; useAccelerationMethod
instead.MDAJacobi
'sacceleration
argument and attribute removed; useacceleration_method
instead.MDAJacobi
'sover_relax_factor
argument and attribute removed; useover_relaxation_factor
instead.mda
:base_mda
MDA
:BaseMDA
gemseo.mda.newton
: removed; instead:import
MDANewtonRaphson
fromgemseo.mda.newton_raphson
import
MDAQuasiNewton
fromgemseo.mda.quasi_newton
import
MDARoot
fromgemseo.mda.root
MDANewtonRaphson
no longer has aparallel
argument; set then_processes
argument to1
for serial computation (default: parallel computation using all the CPUs in the system).MDA classes no longer have
execute_all_disciplines
andlinearize_all_disciplines
methods.MDAJacobi.n_processes
: removed.BaseMDARoot.use_threading
: removed.BaseMDARoot.n_processes
: removed.BaseMDARoot.parallel
: removed. #1278BaseMDA
:linear_solver_options
is nowlinear_solver_settings
,MDANewtonRaphson
:newton_linear_solver_options
is nownewton_linear_solver_settings
,MDAChain
:inner_mda_options
is nowinner_mda_settings
,mdachain_parallel_options
is nowmdachain_parallel_settings
.The following
BaseMDA
attributes names have been modified:BaseMDA.linear_solver
is now accessed viaBaseMDA.settings.linear_solver
,BaseMDA.linear_solver_options
is now accessed viaBaseMDA.settings.linear_solver_settings
,BaseMDA.linear_solver_tolerance
is now accessed viaBaseMDA.settings.linear_solver_tolerance
,BaseMDA.max_mda_iter
is now accessed viaBaseMDA.settings.max_mda_iter
,BaseMDA.tolerance
is now accessed viaBaseMDA.settings.tolerance
,BaseMDA.use_lu_fact
is now accessed viaBaseMDA.settings.use_lu_fact
,BaseMDA.warm_start
is now accessed viaBaseMDA.settings.warm_start
.
The inner MDA settings of
MDAChain
can no longer be passed using**inner_mda_options
, and must now be passed either as dictionnary or an instance ofMDAChain_Settings
.The signature of
MDAGSNewton
has been modified. Settings for theMDAGaussSeidel
and theMDANewtonRaphson
are now respectively passed via thegauss_seidel_settings
and thenewton_settings
arguments, which can be either key/value pairs or the appropriate Pydantic settings model.The MDA settings for the
IDF
formulation are now passed via themda_chain_settings_for_start_at_equilibrium
argument which can be either key/value pairs or anMDAChain_Settings
instance.
- The MDA settings for the
MDF
andBiLevel
formulations are now passed via themain_mda_settings
argument 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; onlyProblemFunction
has this mechanism.gemseo.core.mdofunctions.func_operations.LinearComposition
renamed togemseo.core.mdofunctions.linear_composite_function.LinearCompositeFunction
.gemseo.core.mdofunctions.func_operations.RestrictedFunction
renamed togemseo.core.mdofunctions.restricted_function.RestrictedFunction
.LinearCompositeFunction.name
is"[f o A]"
where"f"
is the name of the original function.The
MDOFunction
subclasses wrappingMDOFunction
objects use thefunc
methods of these objects instead ofevaluate
for the sake of efficiency. #1220MDOFunction.__call__
: removed; useMDOFunction.evaluate
instead.MDOFunction.func
is now an alias of the wrapped functionMDOFunction._func
; useMDOFunction.evaluate
to both evaluate_func
and increment the number of calls whenMDOFunction.activate_counters
isTrue
.MDOFunction
'sexpects_normalized_inputs
argument renamed towith_normalized_inputs
. #1221
Post processing#
Post-processing classes use
Pydantic
models instead ofJSONGrammar
, the models are available via the class attributeSettings
.Renamed the class
OptPostProcessor
toBasePost
.Removed the method
OptPostProcessor.check_options
.Renamed the attribute
OptPostProcessor.output_files
toBasePost.output_file_paths
.Removed the attribute
OptPostProcessor.opt_grammar
.Removed the attribute
DEFAULT_FIG_SIZE
for all post processing classes, use thefig_size
field of thePydantic
model instead.The arguments of the method
OptPostProcessor.execute
are all keyword arguments.The argument
opt_problem
of the methodOptPostProcessor.execute
can no longer be astr
.The arguments of the method
PostFactory.execute
are keyword arguments in addition to the argumentsopt_problem
,post_name
.Renamed the module
scatter_mat.py
toscatter_plot_matrix.py
.Renamed the module
para_coord.py
toparallel_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
ax
and pluralizedaxs
have been preferred overaxes
because for the latter it's not clear if it refers to a singleAxes
instance or a collection of these. #1306
Uncertainty#
gemseo.uncertainty.use_cases
:gemseo.problems.uncertainty
#1147All the arguments of
Resampler
have default values exceptmodel
; the argumentspredict
andoutput_data_shape
have been removed. #1156gemseo.uncertainty.sensitivity.analysis
:gemseo.uncertainty.sensitivity.base_sensitivity_analysis
gemseo.uncertainty.sensitivity.correlation.analysis
:gemseo.uncertainty.sensitivity.correlation_analysis
gemseo.uncertainty.sensitivity.hsic.analysis
:gemseo.uncertainty.sensitivity.hsic_analysis
gemseo.uncertainty.sensitivity.morris.analysis
:gemseo.uncertainty.sensitivity.morris_analysis
gemseo.uncertainty.sensitivity.sobol.analysis
:gemseo.uncertainty.sensitivity.sobol_analysis
#1205gemseo.uncertainty.statistics.parametric
renamed togemseo.uncertainty.statistics.parametric_statistics
.gemseo.uncertainty.statistics.empirical
renamed togemseo.uncertainty.statistics.empirical_statistics
. #1206
Factories#
gemseo.algos.doe.doe_factory
:gemseo.algos.doe.factory
gemseo.linear_solvers.linear_solvers_factory
:gemseo.algos.linear_solvers.factory
gemseo.algos.ode.ode_solvers_factory
:gemseo.algos.ode.factory
gemseo.algos.opt.opt_factory
:gemseo.algos.opt.factory
gemseo.algos.opt.opt_factory
:gemseo.algos.opt.factory
gemseo.algos.sequence_transformer.sequence_transformer_factory
:gemseo.algos.sequence_transformer.factory
gemseo.caches.cache_factory
:gemseo.caches.factory
gemseo.caches.cache_factory
:gemseo.caches.factory
gemseo.datasets.dataset_factory
:gemseo.datasets.factory
gemseo.formulations.dataset_factory
:gemseo.formulations.factory
gemseo.mda.mda_factory
:gemseo.mda.factory
gemseo.post.post_factory
:gemseo.post.factory
gemseo.post.post_factory
:gemseo.post.factory
gemseo.post.dataset.base_plot
:gemseo.post.dataset.plots.base_plot
gemseo.post.dataset.plot_factory
:gemseo.post.dataset.plots.factory
gemseo.post.dataset.plot_factory_factory
:gemseo.post.dataset.plots.factory_factory
gemseo.problems.disciplines_factory
:gemseo.problems.factory
gemseo.scenarios.scenario_results.scenario_result_factory
:gemseo.scenarios.scenario_results.factory
gemseo.utils.derivatives.gradient_approximator_factory
:gemseo.utils.derivatives.factory
gemseo.wrappers.job_schedulers.schedulers_factory
:gemseo.wrappers.job_schedulers.factory
BaseFormulationsFactory
:FormulationFactory
DisciplinesFactory
:MDODisciplineFactory
DOEFactory
:DOELibraryFactory
LinearSolversFactory
:LinearSolverLibraryFactory
ODESolversFactory
:ODESolverLibraryFactory
ODESolverLib
:BaseODESolverLibrary
OptimizersFactory
:OptimizationLibraryFactory
SchedulersFactory
:JobSchedulerDisciplineWrapperFactory
#1161DistributionFactory.available_distributions
: removed; useDistributionFactory.class_names
instead.GrammarFactory.grammars
: removed; useGrammarFactory.class_names
instead.DatasetPlotFactory.plots
: removed; useDatasetPlotFactory.class_names
instead.SensitivityAnalysisFactory.available_sensitivity_analyses
: removed; useSensitivityAnalysisFactory.class_names
instead.CacheFactory.caches
: removed; useCacheFactory.class_names
instead.MDODisciplineFactory.disciplines
: removed; useMDODisciplineFactory.class_names
instead.BaseFormulationFactory.formulations
: removed; useBaseFormulationFactory.class_names
instead.MDAFactory.mdas
: removed; useMDAFactory.class_names
instead.MLAlgoFactory.models
: removed; useMLAlgoFactory.class_names
instead.PostFactory
renamed toOptPostProcessorFactory
.OptPostProcessorFactory.posts
: removed; useOptPostProcessorFactory.class_names
instead.ScalableModelFactory.scalable_models
: removed; useScalableModelFactory.class_names
instead.GradientApproximatorFactory.gradient_approximators
: removed; useGradientApproximatorFactory.class_names
instead.JobSchedulerDisciplineWrapperFactory.scheduler_names
: removed; useJobSchedulerDisciplineWrapperFactory.class_names
instead. #1240
Problems#
gemseo.problems.analytical
:gemseo.problems.optimization
gemseo.problems.aerostructure
:gemseo.problems.mdo.aerostructure
gemseo.problems.propane
:gemseo.problems.mdo.propane
gemseo.problems.scalable
:gemseo.problems.mdo.scalable
gemseo.problems.sellar
:gemseo.problems.mdo.sellar
gemseo.problems.sobieski
:gemseo.problems.mdo.sobieski
gemseo.problems.analytical.rosenbrock.RosenMF
:gemseo.problems.optimization.rosen_mf.RosenMF
gemseo.problems.disciplines_factory
:gemseo.disciplines.disciplines_factory
gemseo.problems.topo_opt
:gemseo.problems.topology_optimization
gemseo.problems.binh_korn
:gemseo.problems.multiobjective_optimization.binh_korn
gemseo.problems.fonseca_fleming
:gemseo.problems.multiobjective_optimization.fonseca_fleming
gemseo.problems.poloni
:gemseo.problems.multiobjective_optimization.poloni
gemseo.problems.viennet
:gemseo.problems.multiobjective_optimization.viennet
#1162The module
sellar
has been removed fromgemseo.problems.sellar
; instead of this module, use the modulessellar_1
forSellar1
,sellar_2
forSellar2
,sellar_system
forSellarSystem
,variables
for the variable names andutils
forget_inputs
(renamed toget_initial_data
) andget_y_opt
. #1164
Sensitivity Analysis#
BaseSensitivityAnalysis
and its subclasses (MorrisAnalysis
,SobolAnalysis
,CorrelationAnalysis
andHSICAnalysis
) 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_analysis
creates aBaseSensitivityAnalysis
from samples; if missing, use the methodcompute_samples
of theBaseSensitivityAnalysis
.BaseSensitivityAnalysis.to_pickle
andBaseSensitivityAnalysis.from_pickle
: removed; instantiateBaseSensitivityAnalysis
from anIODataset
instead, which could typically be generated byBaseSensitivityAnalysis.compute_samples
. #1203BaseSensitivityAnalysis.indices
is now a dataclass to be used asanalysis.indices.index_name[output_name][output_component][input_name]
.CorrelationAnalysis.kendall
: removed; useCorrelationAnalysis.indices.kendall
instead.CorrelationAnalysis.pcc
: removed; useCorrelationAnalysis.indices.pcc
instead.CorrelationAnalysis.pearson
: removed; useCorrelationAnalysis.indices.pearson
instead.CorrelationAnalysis.prcc
: removed; useCorrelationAnalysis.indices.prcc
instead.CorrelationAnalysis.spearman
: removed; useCorrelationAnalysis.indices.spearman
instead.CorrelationAnalysis.src
: removed; useCorrelationAnalysis.indices.src
instead.CorrelationAnalysis.srrc
: removed; useCorrelationAnalysis.indices.srrc
instead.CorrelationAnalysis.ssrc
: removed; useCorrelationAnalysis.indices.ssrc
instead.SobolAnalysis.first_order_indices
: removed; useSobolAnalysis.indices.first
instead.SobolAnalysis.second_order_indices
: removed; useSobolAnalysis.indices.second
instead.SobolAnalysis.total_order_indices
: removed; useSobolAnalysis.indices.total
instead.SobolAnalysis.total_order_indices
: removed; useSobolAnalysis.indices.total
instead.HSICAnalysis.hsic
: removed; useHSICAnalysis.indices.hsic
instead.HSICAnalysis.r2_hsic
: removed; useHSICAnalysis.indices.r2_hsic
instead.HSICAnalysis.p_value_permutation
: removed; useHSICAnalysis.indices.p_value_permutation
instead.HSICAnalysis.p_value_asymptotic
: removed; useHSICAnalysis.indices.p_value_asymptotic
instead.MorrisAnalysis.mu
: removed; useMorrisAnalysis.indices.mu
instead.MorrisAnalysis.mu_star
: removed; useMorrisAnalysis.indices.mu_star
instead.MorrisAnalysis.sigma
: removed; useMorrisAnalysis.indices.sigma
instead.MorrisAnalysis.relative_sigma
: removed; useMorrisAnalysis.indices.relative_sigma
instead.MorrisAnalysis.min
: removed; useMorrisAnalysis.indices.min
instead.MorrisAnalysis.max
: removed; useMorrisAnalysis.indices.max
instead. #1211MorrisAnalysis
can now be used with outputs of size greater than 1. #1212BaseSensitivityAnalysis
: the argumentsinputs
have been renamed toinput_names
.BaseSensitivityAnalysis.compute_indices
'soutputs
argument has been renamed tooutput_names
.BaseSensitivityAnalysis
's.sort_parameters
method renamed tosort_input_variables
. #1242The
SobolAnalysis.output_variances
are estimated using twice as many samples, i.e. bothA
andB
batches of the pick-freeze technique instead ofA
only. #1185SensitivityAnalysis.outputs
renamed toSensitivityAnalysis.output_names
.
Miscellaneous#
The
MDODisciplineAdapter
'slinear_candidate
argument; this is now deduced at instantiation. #1207KMeans
derived fromOptPostProcessor
; useKMeans
derived fromBaseMLAlgo
instead, based on aDataset
generated from anOptimizationProblem
or aBaseScenario
. #1248API change:
gemseo.utils.linear_solver.LinearSolver
has been removed; usegemseo.algos.linear_solvers
instead. #1260Removed the
n_processes
attribute and argument ofMDAChain
. When the inner MDA class has this argument, it can be set through the**inner_mda_options
options of theMDAChain
#1295The public method
real_part_obj_fun
fromScipyGlobalOpt
has been removed.The
ctol
setting forNlopt
has been removed. Instead, use the (already existing) settingseq_tolerance
andineq_tolerance
.The
solver_options
attribute ofLinearProblem
has been removed.The
methods_map
class variable ofScipyLinalgAlgos
has been removed. It is replaced by the private class variable__NAMES_TO_FUNCTIONS
.MDOFunction.to_pickle
: removed; use theto_pickle
function instead.MDOFunction.from_pickle
: removed; use thefrom_pickle
function instead.BaseSensitivityAnalysis.to_pickle
: removed; use theto_pickle
function instead.BaseSensitivityAnalysis.from_pickle
: removed; use thefrom_pickle
function instead.load_sensitivity_analysis
: removed; use thefrom_pickle
function instead.The arguments
each_new_iter
,each_store
,pre_load
andgenerate_opt_plot
ofBaseScenario.set_optimization_history_backup
are renamed toat_each_iteration
,at_each_function_call
,load
andplot
respectively. #1187gemseo.core.base_formulation
:gemseo.formulations.base_formulation
gemseo.core.formulation
:gemseo.formulations.mdo_formulation
gemseo.formulations.formulations_factory
:gemseo.formulations.factory
gemseo.core.base_formulation.BaseFormulationsFactory
:gemseo.formulations.base_factory.BaseFormulationFactory
MDOFormulationsFactory
:MDOFormulationFactory
gemseo.core.cache
:gemseo.caches.base_cache
gemseo.core.cache.AbstractFullCache
:gemseo.caches.base_full_cache.BaseFullCache
AbstractCache
:BaseCache
AbstractFullCache
:BaseFullCache
gemseo.core.cache.CacheEntry
:gemseo.caches.cache_entry.CacheEntry
gemseo.core.cache.hash_data_dict
:gemseo.caches.utils.hash_data
gemseo.core.cache.to_real
:gemseo.caches.utils.to_real
gemseo.caches.hdf5_file_singleton
: removed (the namesake class is available in a protected module)gemseo.core.scenario.Scenario
:gemseo.scenarios.base_scenario.BaseScenario
gemseo.core.doe_scenario
:gemseo.scenarios.doe_scenario
gemseo.core.mdo_scenario
:gemseo.scenarios.mdo_scenario
gemseo.algos.opt_problem
renamed togemseo.algos.optimization_problem
.gemseo.algos.opt_result
renamed togemseo.algos.optimization_result
.gemseo.algos.opt_result
renamed togemseo.algos.multiobjective_optimization_result
.gemseo.algos.pareto
renamed togemseo.algos.pareto.pareto_front
.gemseo.algos.pareto_front
split intogemseo.algos.pareto.utils
(includingcompute_pareto_optimal_points
andgenerate_pareto_plots
) andgemseo.algos.pareto.pareto_plot_biobjective
(includingParetoPlotBiObjective
).OptPostProcessor
'sopt_grammar
argument renamed tooption_grammar
.FininiteElementAnalysis
renamed toFiniteElementAnalysis
.gemseo.SEED
: removed; usegemseo.utils.seeder.SEED
instead.gemseo.algos.progress_bar
: removed; replace by the protected packagegemseo.algos._progress_bars
.The
N_CPUS
constants have been replaced by a unique one ingemseo.utils.constants
. #928renamed the argument
size
ofcompute_doe
ton_samples
.renamed the argument
size
ofBaseDOELibrary.compute_doe
ton_samples
. #979gemseo.utils.multiprocessing.get_multi_processing_manager
moved 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
observations
of methodsplot_residuals_vs_observations
,plot_residuals_vs_inputs
andplot_predictions_vs_observations
of classMLRegressorQualityViewer
is either aMLRegressorQualityViewer.ReferenceDataset
or aDataset
. #1122gradient_approximator
:base_gradient_approximator
GradientApproximator
:BaseGradientApproximator
#1129DependencyGraph.write_condensed_graph
:DependencyGraph.render_condensed_graph
DependencyGraph.write_full_graph
:DependencyGraph.render_full_graph
#1341GaussianMixture
'sn_components
argument renamed ton_clusters
; anyBaseClusterer
has this argument. #1235The executable
deserialize-and-run
no longer takes the working directory as its first argument. The working directory, if needed, shall be set before calling it. #1238MDOCouplingStructure
renamed toCouplingStructure
. #1267MDODisciplineAdapter.linear_candidate
:MDODisciplineAdapter.is_linear
.ConsistencyCstr
:ConsistencyConstraint
.ConsistencyCstr.linear_candidate
removed; useConsistencyConstraint.coupling_function.discipline_adapter.is_linear
instead.ConsistencyCstr.input_dimension
removed; useConsistencyConstraint.coupling_function.discipline_adapter.input_dimension
instead.FunctionFromDiscipline.linear_candidate
removed; useFunctionFromDiscipline.discipline_adapter.is_linear
instead.FunctionFromDiscipline.input_dimension
removed; useFunctionFromDiscipline.discipline_adapter.input_dimension
instead.LinearCandidateFunction
: removed.FunctionFromDiscipline
'sdifferentiable
argument:is_differentiable
.MDODisciplineAdapterGenerator.get_function
'sdifferentiable
argument:is_differentiable
. #1223gemseo.caches._hdf5_file_singleton
includingHDF5FileSingleton
is now a protected module.BaseMDOFormulation
'sNAME
attribute: removed as it was not longer used.gemseo.formulations.mdo_formulation.MDOFormulation
renamed togemseo.formulations.base_mdo_formulation.BaseMDOFormulation
#1084BaseGrammmar.update
'sexclude_names
argument renamed toexcluded_names
.DirectoryCreator.get_unique_run_folder_path
removed; useDirectoryCreator.create
instead.RestrictedFunction
'sorig_function
argument renamed tofunction
.LinearCompositeFunction
'sorig_function
argument renamed tofunction
.LinearCompositeFunction
'sinterp_operator
argument renamed tomatrix
.ScalableDiagonalApproximation
'sseed
argument: removed since it was not used. #1052
5.0.0#
End user API#
The high-level functions defined in
gemseo.api
have been moved togemseo
.Features have been extracted from GEMSEO and are now available in the form of
plugins
:gemseo.algos.opt.lib_pdfo
has been moved to gemseo-pdfo, a GEMSEO plugin for the PDFO library,gemseo.algos.opt.lib_pseven
has been moved to gemseo-pseven, a GEMSEO plugin for the pSeven library,gemseo.wrappers.matlab
has been moved to gemseo-matlab, a GEMSEO plugin for MATLAB,gemseo.wrappers.template_grammar_editor
has 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.api
have been moved togemseo.mlearning
.stieltjes
andstrategy
are no longer arguments ofPCERegressor
.Rename
MLAlgo.save
toMLAlgo.to_pickle
.The name of the method to evaluate the quality measure is passed to
MLAlgoAssessor
with the argumentmeasure_evaluation_method
; any of["LEARN", "TEST", "LOO", "KFOLDS", "BOOTSTRAP"]
.The name of the method to evaluate the quality measure is passed to
MLAlgoSelection
with the argumentmeasure_evaluation_method
; any of["LEARN", "TEST", "LOO", "KFOLDS", "BOOTSTRAP"]
.The name of the method to evaluate the quality measure is passed to
MLAlgoCalibration
with 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_measure
togemseo.mlearning.quality_measures
.Rename
gemseo.mlearning.qual_measure.silhouette
togemseo.mlearning.quality_measures.silhouette_measure
.Rename
gemseo.mlearning.cluster
togemseo.mlearning.clustering
.Rename
gemseo.mlearning.cluster.cluster
togemseo.mlearning.clustering.clustering
.Rename
gemseo.mlearning.transform
togemseo.mlearning.transformers
. #701The enumeration
RBFRegressor.Function
replaced the constants:RBFRegressor.MULTIQUADRIC
RBFRegressor.INVERSE_MULTIQUADRIC
RBFRegressor.GAUSSIAN
RBFRegressor.LINEAR
RBFRegressor.CUBIC
RBFRegressor.QUINTIC
RBFRegressor.THIN_PLATE
RBFRegressor.AVAILABLE_FUNCTIONS
Post processing#
The visualization
Lines
uses a specific tuple (color, style, marker, name) per line by default. #677YvsX
no longer has the argumentsx_comp
andy_comp
; the components have to be passed asx=("variable_name", variable_component)
.Scatter
no longer has the argumentsx_comp
andy_comp
; the components have to be passed asx=("variable_name", variable_component)
.ZvsXY
no longer has the argumentsx_comp
,y_comp
andz_comp
; the components have to be passed asx=("variable_name", variable_component)
. #722RobustnessQuantifier.compute_approximation
usesNone
as default value forat_most_niter
.HessianApproximation.get_x_grad_history
usesNone
as default value forlast_iter
andat_most_niter
.HessianApproximation.build_approximation
usesNone
as default value forat_most_niter
.HessianApproximation.build_inverse_approximation
usesNone
as default value forat_most_niter
.LSTSQApprox.build_approximation
usesNone
as default value forat_most_niter
. #750PostFactory.create
usesclass_name
, thenopt_problem
and**options
as arguments. #752Dataset.plot
no longer refers to specific dataset plots, as ScatterMatrix, lines, curves...Dataset.plot
now refers to the standard pandas plot method. To retrieve ready-to-use plots, please check ingemseo.post.dataset
. #257
MDO processes#
Renamed
InvalidDataException
toInvalidDataError
. #23Moved the
MatlabDiscipline
to the plugin gemseo-matlab.Rename
MakeFunction
toMDODisciplineAdapter
.In
MDODisciplineAdapter
, replace the argumentmdo_function
of typeMDODisciplineAdapterGenerator
by the argumentdiscipline
of typeMDODiscipline
.Rename
MDOFunctionGenerator
toMDODisciplineAdapterGenerator
. #412Rename
AbstractCache.export_to_dataset
toAbstractCache.to_dataset
.Rename
AbstractCache.export_to_ggobi
toAbstractCache.to_ggobi
.Rename
Scenario.export_to_dataset
toScenario.to_dataset
.Rename
MDODiscipline._default_inputs
toMDODiscipline.default_inputs
.Rename
MDODiscipline.serialize
toMDODiscipline.to_pickle
.Rename
MDODiscipline.deserialize
toMDODiscipline.from_pickle
which is a static method.Rename
ScalabilityResult.save
toScalabilityResult.to_pickle
.Rename
BaseGrammar.convert_to_simple_grammar
toBaseGrammar.to_simple_grammar
.Removed the method
_update_grammar_input
fromScenario
,Scenario._update_input_grammar
shall be used instead. #558Scenario.xdsmize
Rename
latex_output
tosave_pdf
.Rename
html_output
tosave_html
.Rename
json_output
tosave_json
.Rename
open_browser
toshow_html
.Rename
outfilename
tofile_name
and do not use suffix.Rename
outdir
todirectory_path
.
XDSMizer
Rename
latex_output
tosave_pdf
.Rename
open_browser
toshow_html
.Rename
output_dir
todirectory_path
.Rename
XDSMizer.outdir
toXDSMizer.directory_path
.Rename
XDSMizer.outfilename
toXDSMizer.json_file_name
.Rename
XDSMizer.latex_output
toXDSMizer.save_pdf
.
XDSMizer.monitor
Rename
latex_output
tosave_pdf
.Rename
outfilename
tofile_name
and do not use suffix.Rename
outdir
todirectory_path
.
XDSMizer.run
Rename
latex_output
tosave_pdf
.Rename
html_output
tosave_html
.Rename
json_output
tosave_json
.Rename
open_browser
toshow_html
.Rename
outfilename
tofile_name
and do not use suffix.Rename
outdir
todirectory_path
and use"."
as default value.
StudyAnalysis.generate_xdsm
Rename
latex_output
tosave_pdf
.Rename
open_browser
toshow_html
.Rename
output_dir
todirectory_path
.
CouplingStructure.plot_n2_chart
: renameopen_browser
toshow_html
.N2HTML
: renameopen_browser
toshow_html
.generate_n2_plot
renameopen_browser
toshow_html
.Scenario.xdsmize
: renameprint_statuses
tolog_workflow_status
.XDSMizer.monitor
: renameprint_statuses
tolog_workflow_status
.Rename
XDSMizer.print_statuses
toXDSMizer.log_workflow_status
.The CLI of the
StudyAnalysis
uses the shortcut-p
for the option--save_pdf
. #564Replace the argument
force_no_exec
byexecute
inMDODiscipline.linearize
andJacobianAssembly.total_derivatives
.Rename the argument
force_all
tocompute_all_jacobians
inMDODiscipline.linearize
. #644The names of the algorithms proposed by
CorrelationAnalysis
must be written in capital letters; seeCorrelationAnalysis.Method
. #654 #464DOEScenario
no longer has aseed
attribute. #621Remove
AutoPyDiscipline.get_return_spec_fromstr
. #661Remove
Scenario.get_optimum
; useScenario.optimization_result
instead. #770Rename
AutoPyDiscipline.in_names
toAutoPyDiscipline.input_names
.Rename
AutoPyDiscipline.out_names
toAutoPyDiscipline.output_names
. #661Replaced the module
parallel_execution.py
by the packageparallel_execution
.Renamed the class
ParallelExecution
toCallableParallelExecution
.Renamed the function
worker
toexecute_workers
.Renamed the argument
input_values
toinputs
.Removed the
ParallelExecution
methods:_update_local_objects
_run_task
_is_worker
_filter_ordered_outputs
_run_task_by_index
ParallelExecution
and its derive classes always take a collection of workers and no longer a single worker. #668Removed the property
penultimate_entry
fromSimpleCache
. #480Rename
GSNewtonMDA
toMDAGSNewton
. #703The enumeration
MDODiscipline.ExecutionStatus
replaced the constants:MDODiscipline.STATUS_VIRTUAL
MDODiscipline.STATUS_PENDING
MDODiscipline.STATUS_DONE
MDODiscipline.STATUS_RUNNING
MDODiscipline.STATUS_FAILED
MDODiscipline.STATUS_LINEARIZE
MDODiscipline.AVAILABLE_STATUSES
The enumeration
MDODiscipline.GrammarType
replaced the constants:MDODiscipline.JSON_GRAMMAR_TYPE
MDODiscipline.SIMPLE_GRAMMAR_TYPE
The enumeration
MDODiscipline.CacheType
replaced the constants:MDODiscipline.SIMPLE_CACHE
MDODiscipline.HDF5_CACHE
MDODiscipline.MEMORY_FULL_CACHE
The value
None
indicating no cache is replaced byMDODiscipline.CacheType.NONE
The enumeration
MDODiscipline.ReExecutionPolicy
replaced the constants:MDODiscipline.RE_EXECUTE_DONE_POLICY
MDODiscipline.RE_EXECUTE_NEVER_POLICY
The enumeration
derivation_modes.ApproximationMode
replaced the constants:derivation_modes.FINITE_DIFFERENCES
derivation_modes.COMPLEX_STEP
derivation_modes.AVAILABLE_APPROX_MODES
The enumeration
derivation_modes.DerivationMode
replaced the constants:derivation_modes.DIRECT_MODE
derivation_modes.REVERSE_MODE
derivation_modes.ADJOINT_MODE
derivation_modes.AUTO_MODE
derivation_modes.AVAILABLE_MODES
The enumeration
JacobianAssembly.DerivationMode
replaced the constants:JacobianAssembly.DIRECT_MODE
JacobianAssembly.REVERSE_MODE
JacobianAssembly.ADJOINT_MODE
JacobianAssembly.AUTO_MODE
JacobianAssembly.AVAILABLE_MODES
The enumeration
MDODiscipline.ApproximationMode
replaced the constants:MDODiscipline.FINITE_DIFFERENCES
MDODiscipline.COMPLEX_STEP
MDODiscipline.APPROX_MODES
The enumeration
MDODiscipline.LinearizationMode
replaced the constants:MDODiscipline.FINITE_DIFFERENCE
MDODiscipline.COMPLEX_STEP
MDODiscipline.AVAILABLE_APPROX_MODES
The high-level functions defined in
gemseo.problems.mdo.scalable.data_driven.api
have been moved togemseo.problems.mdo.scalable.data_driven
. #707Removed
StudyAnalysis.AVAILABLE_DISTRIBUTED_FORMULATIONS
.The enumeration
DiscFromExe.Parser
replaced the constants:DiscFromExe.Parsers
DiscFromExe.Parsers.KEY_VALUE_PARSER
DiscFromExe.Parsers.TEMPLATE_PARSER
The enumeration
MatlabEngine.ParallelType
replaced:matlab_engine.ParallelType
MDOFunciton.check_grad
argumentmethod
was renamed toapproximation_mode
and now expects to be passed anApproximationMode
.For
GradientApproximator
and its derived classes:Renamed the class attribute
ALIAS
to_APPROXIMATION_MODE
,Renamed the instance attribute
_par_args
to_parallel_args
,Renamed
GradientApproximationFactory
toGradientApproximatorFactory
and moved it to the modulegradient_approximator_factory.py
,Moved the duplicated functions to
error_estimators.py
:finite_differences.comp_best_step
finite_differences.compute_truncature_error
finite_differences.compute_cancellation_error
finite_differences.approx_hess
derivatives_approx.comp_best_step
derivatives_approx.compute_truncature_error
derivatives_approx.compute_cancellation_error
derivatives_approx.approx_hess
comp_best_step
was renamed tocompute_best_step
approx_hess
was renamed tocompute_hessian_approximation
To update a grammar from data names that shall be validated against Numpy arrays, the
update
method is now replaced by the methodupdate_from_names
.To update a
JSONGrammar
from a JSON schema, theupdate
method is now replaced by the methodupdate_from_schema
.Renamed
JSONGrammar.write
toJSONGrammar.to_file
.Renamed the argument
schema_path
tofile_path
for theJSONGrammar
constructor.To update a
SimpleGrammar
or aJSONGrammar
from a names and types, theupdate
method is now replaced by the methodupdate_from_types
. #741Renamed
HDF5Cache.hdf_node_name
toHDF5Cache.hdf_node_path
.tolerance
andname
are the first instantiation arguments ofHDF5Cache
, for consistency with other caches.Added the arguments
newton_linear_solver
andnewton_linear_solver_options
to 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_size
and_scale_residuals_with_first_norm
and add thescaling
and_scaling_data
attributes.The module
gemseo.problems.mdo.scalable.parametric.study
has been removed. #717
Optimisation & DOE#
Moved the library of optimization algorithms
PSevenOpt
to the plugin gemseo-pseven.Moved the
PDFO
wrapper to the plugin gemseo-pdfo.Removed the useless exception
NloptRoundOffException
.Rename
MDOFunction.serialize
toMDOFunction.to_pickle
.Rename
MDOFunction.deserialize
toMDOFunction.from_pickle
which is a static method.DesignSpace
has a class methodDesignSpace.from_file
and an instance methodDesignSpace.to_file
.read_design_space
can read an HDF file.Rename
DesignSpace.export_hdf
toDesignSpace.to_hdf
.Rename
DesignSpace.import_hdf
toDesignSpace.from_hdf
which is a class method.Rename
DesignSpace.export_to_txt
toDesignSpace.to_csv
.Rename
DesignSpace.read_from_txt
toDesignSpace.from_csv
which is a class method.Rename
Database.export_hdf
toDatabase.to_hdf
.Replace
Database.import_hdf
by the class methodDatabase.from_hdf
and the instance methodDatabase.update_from_hdf
.Rename
Database.export_to_ggobi
toDatabase.to_ggobi
.Rename
Database.import_from_opendace
toDatabase.update_from_opendace
.Database
no longer has the argumentinput_hdf_file
; usedatabase = Database.from_hdf(file_path)
instead.Rename
OptimizationProblem.export_hdf
toOptimizationProblem.to_hdf
.Rename
OptimizationProblem.import_hdf
toOptimizationProblem.from_hdf
which is a class method.Rename
OptimizationProblem.export_to_dataset
toOptimizationProblem.to_dataset
.The argument
export_hdf
ofwrite_design_space
has been removed.Rename
export_design_space
towrite_design_space
.DesignSpace
no longer hasfile_path
as argument; usedesign_space = DesignSpace.from_file(file_path)
instead. #450Rename
iks_agg
tocompute_iks_agg
Rename
iks_agg_jac_v
tocompute_total_iks_agg_jac
Rename
ks_agg
tocompute_ks_agg
Rename
ks_agg_jac_v
tocompute_total_ks_agg_jac
Rename
max_agg
tocompute_max_agg
Rename
max_agg_jac_v
tocompute_max_agg_jac
Rename
sum_square_agg
tocompute_sum_square_agg
Rename
sum_square_agg_jac_v
tocompute_total_sum_square_agg_jac
Rename the first positional argument
constr_data_names
ofConstraintAggregation
toconstraint_names
.Rename the second positional argument
method_name
ofConstraintAggregation
toaggregation_function
.Rename the first position argument
constr_id
ofOptimizationProblem.aggregate_constraint
toconstraint_index
.Rename the aggregation methods
"pos_sum"
,"sum"
and"max"
to"POS_SUM"
,"SUM"
and"MAX"
.Rename
gemseo.algos.driver_lib
togemseo.algos.driver_library
.Rename
DriverLib
toDriverLibrary
.Rename
gemseo.algos.algo_lib
togemseo.algos.algorithm_library
.Rename
AlgoLib
toAlgorithmLibrary
.Rename
gemseo.algos.doe.doe_lib
togemseo.algos.doe.doe_library
.Rename
gemseo.algos.linear_solvers.linear_solver_lib
togemseo.algos.linear_solvers.linear_solver_library
.Rename
LinearSolverLib
toLinearSolverLibrary
.Rename
gemseo.algos.opt.opt_lib
togemseo.algos.opt.optimization_library
. #702The enumeration
DriverLib.DifferentiationMethod
replaced the constants:DriverLib.USER_DEFINED_GRADIENT
DriverLib.DIFFERENTIATION_METHODS
The enumeration
DriverLib.ApproximationMode
replaced the constants:DriverLib.COMPLEX_STEP_METHOD
DriverLib.FINITE_DIFF_METHOD
The enumeration
OptProblem.ApproximationMode
replaced the constants:OptProblem.USER_DEFINED_GRADIENT
OptProblem.DIFFERENTIATION_METHODS
OptProblem.NO_DERIVATIVES
OptProblem.COMPLEX_STEP_METHOD
OptProblem.FINITE_DIFF_METHOD
The method
Scenario.set_differentiation_method
no longer acceptsNone
for the argumentmethod
.The enumeration
OptProblem.ProblemType
replaced the constants:OptProblem.LINEAR_PB
OptProblem.NON_LINEAR_PB
OptProblem.AVAILABLE_PB_TYPES
The enumeration
DesignSpace.DesignVariableType
replaced the constants:DesignSpace.FLOAT
DesignSpace.INTEGER
DesignSpace.AVAILABLE_TYPES
The namedtuple
DesignSpace.DesignVariable
replaced:design_space.DesignVariable
The enumeration
MDOFunction.ConstraintType
replaced the constants:MDOFunction.TYPE_EQ
MDOFunction.TYPE_INEQ
The enumeration
MDOFunction.FunctionType
replaced the constants:MDOFunction.TYPE_EQ
MDOFunction.TYPE_INEQ
MDOFunction.TYPE_OBJ
MDOFunction.TYPE_OBS
The value
""
indicating no function type is replaced byMDOFunction.FunctionType.NONE
The enumeration
LinearSolver.Solver
replaced the constants:LinearSolver.LGMRES
LinearSolver.AVAILABLE_SOLVERS
The enumeration
ConstrAggregationDisc.EvaluationFunction
replaced:constraint_aggregation.EvaluationFunction
Use
True
as default value ofeval_observables
inOptimizationProblem.evaluate_functions
.Rename
outvars
tooutput_names
andargs
toinput_names
inMDOFunction
and its subclasses (names of arguments, attributes and methods).MDOFunction.has_jac
is 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_grad
toDriverLibrary.requires_gradient
.Rename
ConstrAggegationDisc
toConstraintAggregation
. #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 database
instead ofdatabase.contains_x(x_vect)
.Remove
Database.contains_dataname
; useoutput_name in database.output_names
instead ofdatabase.contains_dataname(output_name)
.Remove
Database.set_dv_names
; usedatabase.input_names
to access the input names.Remove
Database.is_func_grad_history_empty
; usedatabase.check_output_history_is_empty
instead with any output name.Rename
Database.get_hashed_key
toDatabase.get_hashable_ndarray
.Rename
Database.get_all_data_names
toDatabase.get_function_names
.Rename
Database.missing_value_tag
toDatabase.MISSING_VALUE_TAG
.Rename
Database.get_x_by_iter
toDatabase.get_x_vect
.Rename
Database.clean_from_iterate
toDatabase.clear_from_iteration
.Rename
Database.get_max_iteration
toDatabase.n_iterations
.Rename
Database.notify_newiter_listeners
toDatabase.notify_new_iter_listeners
.Rename
Database.get_func_history
toDatabase.get_function_history
.Rename
Database.get_func_grad_history
toDatabase.get_gradient_history
.Rename
Database.get_x_history
toDatabase.get_x_vect_history
.Rename
Database.get_last_n_x
toDatabase.get_last_n_x_vect
.Rename
Database.get_x_at_iteration
toDatabase.get_x_vect
.Rename
Database.get_index_of
toDatabase.get_iteration
.Rename
Database.get_f_of_x
toDatabase.get_function_value
.Rename the argument
all_function_names
tofunction_names
inDatabase.to_ggobi
.Rename the argument
design_variable_names
toinput_names
inDatabase.to_ggobi
.Rename the argument
add_dv
towith_x_vect
inDatabase.get_history_array
.Rename the argument
values_dict
tooutput_value
inDatabase.store
.Rename the argument
x_vect
toinput_value
.Rename the argument
listener_func
tofunction
.Rename the arguments
funcname
,fname
anddata_name
tofunction_name
.Rename the arguments
functions
andnames
tofunction_names
.Rename the argument
names
tooutput_names
inDatabase.filter
.Rename the argument
x_hist
toadd_x_vect_history
inDatabase.get_function_history
andDatabase.get_gradient_history
.Database.get_x_vect
starts counting the iterations at 1.Database.clear_from_iteration
starts counting the iterations at 1.RadarChart
,TopologyView
andGradientSensitivity
starts counting the iterations at 1.The input history returned by
Database.get_gradient_history
andDatabase.get_function_history
is now a 2D NumPy array.Remove
Database.n_new_iteration
.Remove
Database.reset_n_new_iteration
.Remove the argument
reset_iteration_counter
inDatabase.clear
.The
Database
no longer uses the tag"Iter"
.The
Database
no 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.api
have been moved togemseo.uncertainty
.Rename
BaseSensitivityAnalysis.export_to_dataset
toBaseSensitivityAnalysis.to_dataset
.Rename
BaseSensitivityAnalysis.save
toBaseSensitivityAnalysis.to_pickle
.Rename
BaseSensitivityAnalysis.load
toBaseSensitivityAnalysis.from_pickle
which is a class method.ComposedDistribution
usesNone
as value for independent copula.ParameterSpace
no longer uses acopula
passed at instantiation but toParameterSpace.build_composed_distribution
.SPComposedDistribution
raises an error when set up with a copula different fromNone
. #655The enumeration
RobustnessQuantifier.Approximation
replaced the constant:RobustnessQuantifier.AVAILABLE_APPROXIMATIONS
The enumeration
OTDistributionFitter.DistributionName
replaced the constants:OTDistributionFitter.AVAILABLE_DISTRIBUTIONS
OTDistributionFitter._AVAILABLE_DISTRIBUTIONS
The enumeration
OTDistributionFitter.FittingCriterion
replaced the constants:OTDistributionFitter.AVAILABLE_FITTING_TESTS
OTDistributionFitter._AVAILABLE_FITTING_TESTS
The enumeration
OTDistributionFitter.SignificanceTest
replaced the constant:OTDistributionFitter.SIGNIFICANCE_TESTS
The enumeration
ParametricStatistics.DistributionName
replaced the constant:ParametricStatistics.AVAILABLE_DISTRIBUTIONS
The enumeration
ParametricStatistics.FittingCriterion
replaced the constant:ParametricStatistics.AVAILABLE_FITTING_TESTS
The enumeration
ParametricStatistics.SignificanceTest
replaced the constant:ParametricStatistics.SIGNIFICANCE_TESTS
The enumeration
SobolAnalysis.Algorithm
replaced the constant:SobolAnalysis.Algorithm.Saltelli
bySobolAnalysis.Algorithm.SALTELLI
SobolAnalysis.Algorithm.Jansen
bySobolAnalysis.Algorithm.JANSEN
SobolAnalysis.Algorithm.MauntzKucherenko
bySobolAnalysis.Algorithm.MAUNTZ_KUCHERENKO
SobolAnalysis.Algorithm.Martinez
bySobolAnalysis.Algorithm.MARTINEZ
The enumeration
SobolAnalysis.Method
replaced the constant:SobolAnalysis.Method.first
bySobolAnalysis.Method.FIRST
SobolAnalysis.Method.total
bySobolAnalysis.Method.TOTAL
The enumeration
ToleranceInterval.ToleranceIntervalSide
replaced:distribution.ToleranceIntervalSide
The namedtuple
ToleranceInterval.Bounds
replaced:distribution.Bounds
Remove
n_legend_cols
inParametricStatistics.plot_criteria
.Rename
variables_names
,variables_sizes
andvariables_types
tovariable_names
,variable_sizes
andvariable_types
.Rename
inputs_names
andoutputs_names
toinput_names
andoutput_names
.Rename
constraints_names
toconstraint_names
.Rename
functions_names
tofunction_names
.Rename
inputs_sizes
andoutputs_sizes
toinput_sizes
andoutput_sizes
.Rename
disciplines_names
todiscipline_names
.Rename
jacobians_names
tojacobian_names
.Rename
observables_names
toobservable_names
.Rename
columns_names
tocolumn_names
.Rename
distributions_names
todistribution_names
.Rename
options_values
tooption_values
.Rename
constraints_values
toconstraint_values
.Rename
jacobians_values
tojacobian_values
.SobolAnalysis.AVAILABLE_ALGOS
no longer exists; use theenum
SobolAnalysis.Algorithm
instead.MLQualityMeasure.evaluate
no longer exists; please use eitherMLQualityMeasure.evaluate_learn
,MLQualityMeasure.evaluate_test
,MLQualityMeasure.evaluate_kfolds
,MLQualityMeasure.evaluate_loo
andMLQualityMeasure.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_arrays
togemseo.utils.comparisons.compare_dict_of_arrays
.Moved
gemseo.utils.testing.image_comparison
togemseo.utils.testing.helpers.image_comparison
.Moved
gemseo.utils.pytest_conftest
togemseo.utils.testing.pytest_conftest
.Moved
gemseo.utils.testing.pytest_conftest.concretize_classes
togemseo.utils.testing.helpers.concretize_classes
. #173Dataset
inherits fromDataFrame
and uses multi-indexing columns. Some methods have been added to improve the use of multi-index;Dataset.transform_variable
has been renamed toDataset.transform_data
. Two derived classes (IODataset
andOptimizationDataset
) can be considered for specific usages.Dataset
can be imported fromgemseo.datasets.dataset
.The default group of
Dataset
isparameters
.Dataset
no longer has theget_data_by_group
,get_all_data
andget_data_by_names
methods. 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_names
can 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_name
whilelen(dataset.get_variable_components(group_name, variable_name))
returns the size of the variable namedvariable_name
and belonging togroup_name
.The methods
to_dataset
no longer have an argumentby_group
as theDataset
no longer stores the data by group (the previousDataset
stored the data in a dictionary indexed by either variable names or group names).Dataset
no longer has theexport_to_dataframe
method, since it is aDataFrame
itself.Dataset
no longer has thelength
; uselen(dataset)
instead.Dataset
no longer has theis_empty
method. Use pandas attributeempty
instead.Dataset
no longer has theexport_to_cache
method.Dataset
no longer has therow_names
attribute. Useindex
instead.Dataset.add_variable
no longer has thegroup
argument. Usegroup_name
instead.Dataset.add_variable
no longer has thename
argument. Usevariable_name
instead.Dataset.add_variable
no longer has thecache_as_input
argument.Dataset.add_group
no longer has thegroup
argument. Usegroup_name
instead.Dataset.add_group
no longer has thevariables
argument. Usevariable_names
instead.Dataset.add_group
no longer has thesizes
argument. Usevariable_names_to_n_components
instead.Dataset.add_group
no longer has thecache_as_input
andpattern
arguments.Renamed
Dataset.set_from_array
toDataset.from_array
.Renamed
Dataset.get_names
toDataset.get_variable_names
.Renamed
Dataset.set_metadata
toDataset.misc
.Removed
Dataset.n_samples
in favor oflen()
.gemseo.load_dataset
is renamed:gemseo.create_benchmark_dataset
. Can be used to create a Burgers, Iris or Rosenbrock dataset.BurgerDataset
no longer exists. Create a Burger dataset withcreate_burgers_dataset
.IrisDataset
no longer exists. Create an Iris dataset withcreate_iris_dataset
.RosenbrockDataset
no longer exists. Create a Rosenbrock dataset withcreate_rosenbrock_dataset
.problems.dataset.factory
no longer exists.Scenario.to_dataset
no longer has theby_group
argument.AbstractCache.to_dataset
no longer has theby_group
andname
arguments. #257Rename
MDOObjScenarioAdapter
toMDOObjectiveScenarioAdapter
.The scenario adapters
MDOScenarioAdapter
andMDOObjectiveScenarioAdapter
are now located in the packagegemseo.disciplines.scenario_adapters
. #407Moved
gemseo.core.factory.Factory
togemseo.core.base_factory.BaseFactory
Removed the attribute
factory
of the factories.Removed
Factory._GEMS_PATH
.Moved
singleton._Multiton
tofactory._FactoryMultitonMeta
Renamed
Factory.cache_clear
toFactory.clear_cache
.Renamed
Factory.classes
toFactory.class_names
.Renamed
Factory
toBaseFactory
.Renamed
DriverFactory
toBaseAlgoFactory
. #522The way non-serializable attributes of an
MDODiscipline
are treated has changed. From now on, instead of defining the attributes to serialize with the class variable_ATTR_TO_SERIALIZE
,MDODiscipline
and 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_compatibility
was moved and renamed toutils.compatibility.python
. #689The enumeration
FilePathManager.FileType
replaced the constant:file_type_manager.FileType
Rename
Factory.classes
toFactory.class_names
.Move
ProgressBar
andTqdmToLogger
togemseo.algos.progress_bar
.Move
HashableNdarray
togemseo.algos.hashable_ndarray
.Move the HDF methods of
Database
toHDFDatabase
.Remove
BaseEnum.get_member_from_name
; please useBaseEnum.__getitem__
.StudyAnalysis.disciplines_descr
has been removed; useMDOStudyAnalysis.study.disciplines
instead.StudyAnalysis.scenarios_descr
has been removed; useMDOStudyAnalysis.study.scenarios
instead.StudyAnalysis.xls_study_path
has been removed; useCouplingStudyAnalysis.study.xls_study_path
instead.gemseo.utils.study_analysis.StudyAnalysis
has been moved togemseo.utils.study_analyses.mdo_study_analysis
and renamed toMDOStudyAnalysis
.gemseo.utils.study_analysis.XLSStudyParser
has been moved togemseo.utils.study_analyses.xls_study_parser
.gemseo.utils.study_analysis_cli
has been moved togemseo.utils.study_analyses
.MDOStudyAnalysis.generate_xdsm
no longer returns aMDOScenario
but anXDSM
.The option
fig_size
of thegemseo-study
has been replaced by the optionsheight
andwidth
.The CLI
gemseo-study
can be used for MDO studies withgemseo-study xls_file_path
and coupling studies withgemseo-study xls_file_path -t coupling
.
Removed#
Removed the
gemseo.core.jacobian_assembly
module that is now ingemseo.core.derivatives.jacobian_assembly
.Removed the obsolete
snopt
wrapper.Removed Python 3.7 support.
4.0.0#
API changes that impact user scripts code#
In post-processing,
fig_size
is the unique name to identify the size of a figure and the occurrences offigsize
,figsize_x
andfigsize_y
have been replaced byfig_size
,fig_size_x
andfig_size_y
.The argument
parallel_exec
inIDF.__init__()
has been renamed ton_processes
.The argument
quantile
ofVariableInfluence
has been renamed tolevel
.BasicHistory
:data_list
has been renamed tovariable_names
.MDAChain.sub_mda_list
has been renamed toMDAChain.inner_mdas
.RadarChart
:constraints_list
has been renamed toconstraint_names
.ScatterPlotMatrix
:variables_list
has been renamed tovariable_names
.All
MDA
algos now count their iterations starting from0
.The
MDA.residual_history
is now a list of normed residuals.The argument
figsize
inMDA.plot_residual_history()
was renamed tofig_size
to be consistent withOptPostProcessor
algos.ConstraintsHistory
:constraints_list
has been renamed toconstraint_names
.The
MDAChain
now takesinner_mda_name
as argument instead ofsub_mda_class
.The
MDF
formulation now takesmain_mda_name
as argument instead ofmain_mda_class
andinner_mda_name
instead of -sub_mda_class
.The
BiLevel
formulation now takesmain_mda_name
as argument instead ofmda_name
. It is now possible to explicitly define aninner_mda_name
as well.In
DesignSpace
:get_current_x
has been renamed toget_current_value()
.has_current_x
has been renamed tohas_current_value()
.set_current_x
has been renamed toset_current_value()
.Remove
get_current_x_normalized
andget_current_x_dict
.
The short names of some machine learning algorithms have been replaced by conventional acronyms.
MatlabDiscipline.__init__()
:input_data_list
andoutput_data_list
has been renamed toinput_names
andoutput_names
.save_matlab_file()
:dict_to_save
has been renamed todata
.The classes of the regression algorithms are renamed as
{Prefix}Regressor
.The class
ConcatenationDiscipline
has been renamed toConcatenater
.In Caches:
input_names
has been renamed toinput_names
.get_all_data()
has been replaced by[cache_entry for cache_entry in cache]
.get_data
has been removed.get_length()
has been replaced bylen(cache)
.get_outputs(input_data)
has been replaced bycache[input_data].outputs
.{INPUTS,JACOBIAN,OUTPUTS,SAMPLE}_GROUP
have 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_length
has been removed.merge
has been renamed toupdate()
.output_names
has been renamed tooutput_names
.varsizes
has been renamed tonames_to_sizes
.samples_indices
has been removed.
API changes that impact discipline wrappers#
In Grammar:
update_from
has been renamed toupdate()
.remove_item(name)
has been replaced bydel grammar[name]
.get_data_names
has been renamed tokeys()
.initialize_from_data_names
has been renamed toupdate()
.initialize_from_base_dict
has been renamed toupdate_from_data()
.update_from_if_not_in
has been renamed to now useupdate()
withexclude_names
.set_item_value
has been removed.remove_required(name)
has been replaced byrequired_names.remove(name)
.data_names
has been renamed tokeys()
.data_types
has been renamed tovalues()
.update_elements
has been renamed toupdate()
.update_required_elements
has been removed.init_from_schema_file
has been renamed toupdate_from_file()
.
API changes that affect plugin or features developers#
AlgoLib.lib_dict
has been renamed toAlgoLib.descriptions
.gemseo.utils.data_conversion.FLAT_JAC_SEP
has been renamed toSTRING_SEPARATOR
.In
gemseo.utils.data_conversion
:DataConversion.dict_to_array
has been renamed toconcatenate_dict_of_arrays_to_array()
.DataConversion.list_of_dict_to_array
removed.DataConversion.array_to_dict
has been renamed tosplit_array_to_dict_of_arrays()
.DataConversion.jac_2dmat_to_dict
has been renamed tosplit_array_to_dict_of_arrays()
.DataConversion.jac_3dmat_to_dict
has been renamed tosplit_array_to_dict_of_arrays()
.DataConversion.dict_jac_to_2dmat
removed.DataConversion.dict_jac_to_dict
has been renamed toflatten_nested_dict()
.DataConversion.flat_jac_name
removed.DataConversion.dict_to_jac_dict
has been renamed tonest_flat_bilevel_dict()
.DataConversion.update_dict_from_array
has been renamed toupdate_dict_of_arrays_from_array()
.DataConversion.deepcopy_datadict
has been renamed todeepcopy_dict_of_arrays()
.DataConversion.get_all_inputs
has been renamed toget_all_inputs()
.DataConversion.get_all_outputs
has been renamed toget_all_outputs()
.
DesignSpace.get_current_value
can now return a dictionary of NumPy arrays or normalized design values.The method
MDOFormulation.check_disciplines
has been removed.The class variable
MLAlgo.ABBR
has been renamed toMLAlgo.SHORT_ALGO_NAME
.For
OptResult
andMDOFunction
:get_data_dict_repr
has been renamed toto_dict
.Remove plugin detection for packages with
gemseo_
prefix.MDODisciplineAdapterGenerator.get_function
:input_names_list
andoutput_names_list
has been renamed tooutput_names
andoutput_names
.MDOScenarioAdapter.__init__
:inputs_list
andoutputs_list
has been renamed toinput_names
andoutput_names
.OptPostProcessor.out_data_dict
has been renamed toOptPostProcessor.materials_for_plotting
.In
ParallelExecution
:input_data_list
has been renamed toinput_values
.worker_list
has been renamed toworkers
.
In Grammar,
is_type_array
has been renamed tois_array()
.
Internal changes that rarely or not affect users#
In Grammar:
load_data
has 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_grammar
has been renamed toconvert_to_simple_grammar()
.is_required(name)
has been renamed toname in required_names
.write_schema
has been renamed towrite()
.schema_dict
has been renamed toschema
.JSONGrammar
class attributes removed has been renamed toPROPERTIES_FIELD
,REQUIRED_FIELD
,TYPE_FIELD
,OBJECT_FIELD
,TYPES_MAP
.AbstractGrammar
has been renamed toBaseGrammar
.
AnalyticDiscipline.expr_symbols_dict
has been renamed toAnalyticDiscipline.output_names_to_symbols
.AtomicExecSequence.get_state_dict
has been renamed toAtomicExecSequence.get_statuses()
.In
CompositeExecSequence
:CompositeExecSequence.get_state_dict
has been renamed toCompositeExecSequence.get_statuses()
.CompositeExecSequence.sequence_list
has 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