File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 44from pystac import Asset , Item , Link
55from pystac .extensions .eo import Band , EOExtension
66
7+ from stac_model .base import TaskEnum
78from stac_model .input import InputStructure , ModelInput
89from stac_model .output import MLMClassification , ModelOutput , ModelResult
910from stac_model .schema import ItemMLModelExtension , MLModelExtension , MLModelProperties
@@ -44,7 +45,7 @@ def from_torch(
4445) -> ItemMLModelExtension :
4546 total_params = sum (p .numel () for p in model .parameters ())
4647 arch = f"{ model .__class__ .__module__ } .{ model .__class__ .__name__ } "
47- task = {"classification" }
48+ task = {TaskEnum . CLASSIFICATION }
4849
4950 # Extra metadata only found in weights of torchgeo models
5051 has_meta = weights is not None and hasattr (weights , "meta" )
@@ -76,7 +77,6 @@ def from_torch(
7677 bands = bands ,
7778 input = input_struct ,
7879 resize_type = None ,
79- value_scaling = None ,
8080 pre_processing_function = None ,
8181 )
8282
You can’t perform that action at this time.
0 commit comments