From 8f0e10a9c0323a004bb1ba3df230d7ea25f8d12c Mon Sep 17 00:00:00 2001 From: Yuan-Ru Lin Date: Sun, 24 Nov 2024 14:46:45 -0800 Subject: [PATCH 1/5] Track the metadata file s.t. the pacakage gets precompiled when it's changed --- src/MLJModels.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MLJModels.jl b/src/MLJModels.jl index 36b2c1a..88e4b0d 100755 --- a/src/MLJModels.jl +++ b/src/MLJModels.jl @@ -72,6 +72,7 @@ include("metadata.jl") # read in the metadata: metadata_file = joinpath(srcdir, "registry", "Metadata.toml") +Base.include_dependency(metadata_file) const INFO_GIVEN_HANDLE = info_given_handle(metadata_file) const PKGS_GIVEN_NAME = pkgs_given_name(INFO_GIVEN_HANDLE) const AMBIGUOUS_NAMES = ambiguous_names(INFO_GIVEN_HANDLE) From b27588ba47cb9070251b817370c389d96cfff57c Mon Sep 17 00:00:00 2001 From: Yuan-Ru Lin Date: Sun, 24 Nov 2024 14:47:15 -0800 Subject: [PATCH 2/5] Add the (initial version of) spec of AffinityPropagation --- src/registry/Metadata.toml | 36 ++++++++++++++++++++++++++++++++++++ src/registry/Models.toml | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/registry/Metadata.toml b/src/registry/Metadata.toml index 75b9043..134def7 100644 --- a/src/registry/Metadata.toml +++ b/src/registry/Metadata.toml @@ -5939,6 +5939,42 @@ ":reporting_operations" = "`()`" ":constructor" = "`RecursiveFeatureElimination`" +[Clustering.AffinityPropagation] +":input_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" +":output_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" +":target_scitype" = "`ScientificTypesBase.Unknown`" +":fit_data_scitype" = "`Tuple{ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}}`" +":predict_scitype" = "`ScientificTypesBase.Unknown`" +":transform_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" +":inverse_transform_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" +":target_in_fit" = "`false`" +":is_pure_julia" = "`true`" +":package_name" = "Clustering" +":package_license" = "MIT" +":load_path" = "MLJClusteringInterface.AffinityPropagation" +":package_uuid" = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +":package_url" = "https://github.com/JuliaStats/Clustering.jl" +":is_wrapper" = "`false`" +":supports_weights" = "`false`" +":supports_class_weights" = "`false`" +":supports_online" = "`false`" +":docstring" = "To be added" +":name" = "AffinityPropagation" +":human_name" = "affinity propagation clusterer" +":is_supervised" = "`false`" +":prediction_type" = ":unknown" +":abstract_type" = "`MLJModelInterface.Unsupervised`" +":implemented_methods" = [":clean!", ":fit", ":fitted_params", ":predict", ":transform"] +":hyperparameters" = "`(:damp, :maxiter, :tol, :preference, :metric)`" +":hyperparameter_types" = "`(\"Float64\", \"Int64\", \"Float64\", \"Union{Nothing, Float64}\", \"Distances.SemiMetric\")`" +":hyperparameter_ranges" = "`(nothing, nothing, nothing, nothing, nothing)`" +":iteration_parameter" = "`nothing`" +":supports_training_losses" = "`false`" +":reports_feature_importances" = "`false`" +":deep_properties" = "`()`" +":reporting_operations" = "`(:predict,)`" +":constructor" = "`nothing`" + [Clustering.HierarchicalClustering] ":input_scitype" = "`Tuple{ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}}`" ":output_scitype" = "`ScientificTypesBase.Unknown`" diff --git a/src/registry/Models.toml b/src/registry/Models.toml index 1c029f4..40bf203 100644 --- a/src/registry/Models.toml +++ b/src/registry/Models.toml @@ -17,7 +17,7 @@ MLJBalancing = ["BalancedBaggingClassifier", "BalancedModel"] Imbalance = ["RandomOversampler", "SMOTENC", "TomekUndersampler", "ClusterUndersampler", "SMOTE", "SMOTEN", "ROSE", "RandomUndersampler", "ENNUndersampler", "BorderlineSMOTE1", "RandomWalkOversampler"] MLJTuning = ["TunedModel"] FeatureSelection = ["FeatureSelector", "RecursiveFeatureElimination"] -Clustering = ["HierarchicalClustering", "DBSCAN", "KMeans", "KMedoids"] +Clustering = ["HierarchicalClustering", "DBSCAN", "KMeans", "KMedoids", "AffinityPropagation"] EvoLinear = ["EvoSplineRegressor", "EvoLinearRegressor"] MLJText = ["TfidfTransformer", "CountTransformer", "BM25Transformer"] LightGBM = ["LGBMClassifier", "LGBMRegressor"] From b40e71503b0edb226c7f7918be572607d58061c8 Mon Sep 17 00:00:00 2001 From: Yuan-Ru Lin Date: Mon, 2 Dec 2024 18:12:51 -0800 Subject: [PATCH 3/5] Turn Affinity Propagation Static --- src/registry/Metadata.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/registry/Metadata.toml b/src/registry/Metadata.toml index 134def7..892670b 100644 --- a/src/registry/Metadata.toml +++ b/src/registry/Metadata.toml @@ -5941,11 +5941,11 @@ [Clustering.AffinityPropagation] ":input_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" -":output_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" +":output_scitype" = "`ScientificTypesBase.Unknown`" ":target_scitype" = "`ScientificTypesBase.Unknown`" -":fit_data_scitype" = "`Tuple{ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}}`" +":fit_data_scitype" = "`Tuple{}`" ":predict_scitype" = "`ScientificTypesBase.Unknown`" -":transform_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" +":transform_scitype" = "`ScientificTypesBase.Unknown`" ":inverse_transform_scitype" = "`ScientificTypesBase.Table{<:AbstractVector{<:ScientificTypesBase.Continuous}}`" ":target_in_fit" = "`false`" ":is_pure_julia" = "`true`" @@ -5963,8 +5963,8 @@ ":human_name" = "affinity propagation clusterer" ":is_supervised" = "`false`" ":prediction_type" = ":unknown" -":abstract_type" = "`MLJModelInterface.Unsupervised`" -":implemented_methods" = [":clean!", ":fit", ":fitted_params", ":predict", ":transform"] +":abstract_type" = "`MLJModelInterface.Static`" +":implemented_methods" = [":clean!", ":predict"] ":hyperparameters" = "`(:damp, :maxiter, :tol, :preference, :metric)`" ":hyperparameter_types" = "`(\"Float64\", \"Int64\", \"Float64\", \"Union{Nothing, Float64}\", \"Distances.SemiMetric\")`" ":hyperparameter_ranges" = "`(nothing, nothing, nothing, nothing, nothing)`" From be4d4deee3901ce8809f4a830fe065d6f5693ed7 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 12 Dec 2024 08:37:28 -0500 Subject: [PATCH 4/5] The issue with stdlib versions being fixed to 0.0.0 has been fixed in new versions of Julia --- test/runtests.jl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index cf47ac8..6fcede3 100755 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,12 @@ -# The next two lines added as a workaround to -# https://github.com/JuliaLang/Pkg.jl/issues/3628 (Julia 1.6): import Pkg -Pkg.add(name="Statistics", version=VERSION) + +if Base.VERSION >= v"1.10-" + # The issue with stdlib versions being fixed to 0.0.0 has been fixed in new versions of Julia +else + # The next line added as a workaround to + # https://github.com/JuliaLang/Pkg.jl/issues/3628 (Julia 1.6): + Pkg.add(name="Statistics", version=VERSION, uuid="10745b16-79ce-11e8-11f9-7d13ad32a3b2") +end using Test, MLJModels From 6deebcf7044d5663e4dbccec985658d6e7ce3ebc Mon Sep 17 00:00:00 2001 From: Yuan-Ru Lin Date: Sun, 15 Dec 2024 14:41:05 -0800 Subject: [PATCH 5/5] Bump Julia compat from 1.6 to 1.10 --- .github/workflows/ci.yml | 2 +- Project.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bff42a..5fde3dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: version: - - '1.6' + - '1.10' - '1' os: - ubuntu-latest diff --git a/Project.toml b/Project.toml index 13262a4..3c465e9 100644 --- a/Project.toml +++ b/Project.toml @@ -49,7 +49,7 @@ StatisticalTraits = "3" Statistics = "<0.0.1, 1" StatsBase = "0.32,0.33, 0.34" Tables = "0.2,1.0" -julia = "1.6" +julia = "1.10" [extras] MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"