Эх сурвалжийг харах

Adapted to new chia v2 structure

Clemens-Alexander Brust 5 жил өмнө
parent
commit
080e766c21

+ 3 - 3
chillax/chillax_classifier.py

@@ -1,5 +1,5 @@
-from chia.v2.components.classifiers import keras_hierarchicalclassification
-from chia.v2 import instrumentation, knowledge
+from chia.components.classifiers import keras_hierarchicalclassification
+from chia import instrumentation, knowledge
 
 import networkx as nx
 import numpy as np
@@ -169,7 +169,7 @@ class CHILLAXKerasHC(
         self.prediction_target_uids = {
             concept.uid
             for concept in self.kb.concepts(
-                flags={knowledge.ConceptFlagV2.PREDICTION_TARGET}
+                flags={knowledge.ConceptFlag.PREDICTION_TARGET}
             )
         }
 

+ 3 - 3
chillax/chillax_extrapolator.py

@@ -1,4 +1,4 @@
-from chia.v2 import components, knowledge, instrumentation
+from chia import components, knowledge, instrumentation
 
 from chillax import information_content
 
@@ -10,7 +10,7 @@ import numpy as np
 
 class CHILLAXExtrapolator(instrumentation.Observer, abc.ABC):
     def __init__(
-        self, knowledge_base: knowledge.KnowledgeBaseV2, apply_ground_truth: bool
+        self, knowledge_base: knowledge.KnowledgeBase, apply_ground_truth: bool
     ):
         self.knowledge_base = knowledge_base
         self.knowledge_base.register(self)
@@ -166,7 +166,7 @@ class DepthStepsCHILLAXExtrapolator(CHILLAXExtrapolator):
             self.prediction_targets = {
                 concept.uid
                 for concept in self.knowledge_base.concepts(
-                    flags={knowledge.ConceptFlagV2.PREDICTION_TARGET}
+                    flags={knowledge.ConceptFlag.PREDICTION_TARGET}
                 )
             }
 

+ 3 - 3
chillax/experiment_selfsupervised.py

@@ -1,6 +1,6 @@
-from chia.v2 import containers, instrumentation
-from chia.v2.components import classifiers
-from chia.v2 import helpers
+from chia import containers, instrumentation
+from chia.components import classifiers
+from chia import helpers
 from chillax import chillax_classifier, chillax_extrapolator
 
 import config as pcfg

+ 1 - 1
chillax/information_content.py

@@ -2,7 +2,7 @@ import math
 import abc
 import networkx as nx
 
-from chia.v2 import components
+from chia import components
 
 
 class InformationContentCalculator(abc.ABC):