We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a31f8e commit 7313f78Copy full SHA for 7313f78
api/core/serializers.py
@@ -12,6 +12,7 @@ class StrategySerializer(serializers.Serializer):
12
name = serializers.CharField(max_length=200)
13
description = serializers.SerializerMethodField()
14
classifier = serializers.SerializerMethodField()
15
+ params = serializers.SerializerMethodField()
16
17
def get_id(self, strategy):
18
return strategy_id(strategy)
@@ -31,3 +32,9 @@ def get_classifier(self, strategy):
31
32
if classifier['memory_depth'] == float('inf'):
33
classifier['memory_depth'] = -1
34
return classifier
35
+
36
+ def get_params(self, strategy):
37
+ params = strategy.init_params()
38
+ if 'memory_depth' in params and params['memory_depth'] == float('inf'):
39
+ params['memory_depth'] = -1
40
+ return params
0 commit comments