This repository was archived by the owner on Mar 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
hypervector/resources/core Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ def to_response(self):
3131 def from_get (cls , response ):
3232 return cls .from_response (response .json ())
3333
34+ def refresh (self ):
35+ benchmark = self .get (self .benchmark_uuid )
36+ self .__dict__ .update (benchmark .__dict__ )
37+
3438 @classmethod
3539 def list (cls , ensemble ):
3640 parent_endpoint = f"{ hypervector .API_BASE } /definition/{ ensemble .definition_uuid } " \
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ def to_response(self):
4646 def from_get (cls , response ):
4747 return cls .from_response (response .json ())
4848
49+ def refresh (self ):
50+ ensemble = self .get (self .ensemble_uuid )
51+ self .__dict__ .update (ensemble .__dict__ )
52+
4953 @classmethod
5054 def list (cls , definition ):
5155 parent_endpoint = f"{ hypervector .API_BASE } /definition/{ definition .definition_uuid } "
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ def to_response(self):
3333 def from_get (cls , response ):
3434 return cls .from_response (response .json ())
3535
36+ def refresh (self ):
37+ project = self .get (self .project_uuid )
38+ self .__dict__ .update (project .__dict__ )
39+
3640 @classmethod
3741 def list (cls ):
3842 endpoint = f"{ hypervector .API_BASE } /projects"
You can’t perform that action at this time.
0 commit comments