Skip to content

Commit

Permalink
add docstring for codes
Browse files Browse the repository at this point in the history
Signed-off-by: hsj576 <sjhu21@m.fudan.edu.cn>
  • Loading branch information
hsj576 committed Oct 30, 2023
1 parent 6089e65 commit 8e846cf
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ benchmarkingjob:
# job name of bechmarking; string type;
name: "benchmarkingjob"
# the url address of job workspace that will reserve the output of tests; string type;
workspace: "/home/vipuser/ianvs/lifelong_learning_bench/robot-workspace-test"
workspace: "/ianvs/lifelong_learning_bench/robot-workspace-test"

# the url address of test environment configuration file; string type;
# the file format supports yaml/yml;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def train(self, train_data, valid_data=None, **kwargs):
return self.train_model_url

def predict(self, data, **kwargs):
"""
Use the RFNet model to predict at the edge
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -103,6 +106,9 @@ def predict(self, data, **kwargs):
return predictions

def predict_cloud(self, data, **kwargs):
"""
Use the SAM model to predict at the cloud
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -124,6 +130,9 @@ def predict_cloud(self, data, **kwargs):
return predictions

def predict_score(self, data, **kwargs):
"""
Get the prediction scores of RFNet model
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def train(self, train_data, valid_data=None, **kwargs):
return self.train_model_url

def predict(self, data, **kwargs):
"""
Use the RFNet model to predict at the edge
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -103,6 +106,9 @@ def predict(self, data, **kwargs):
return predictions

def predict_cloud(self, data, **kwargs):
"""
Use the SAM model to predict at the cloud
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -124,6 +130,9 @@ def predict_cloud(self, data, **kwargs):
return predictions

def predict_score(self, data, **kwargs):
"""
Get the prediction scores of RFNet model
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def train(self, train_data, valid_data=None, **kwargs):
return self.train_model_url

def predict(self, data, **kwargs):
"""
Use the Segformer model to predict at the edge
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -103,6 +106,9 @@ def predict(self, data, **kwargs):
return predictions

def predict_cloud(self, data, **kwargs):
"""
Use the SAM model to predict at the cloud
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -124,6 +130,9 @@ def predict_cloud(self, data, **kwargs):
return predictions

def predict_score(self, data, **kwargs):
"""
Get the prediction scores of RFNet model
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def train(self, train_data, valid_data=None, **kwargs):
return self.train_model_url

def predict(self, data, **kwargs):
"""
Use the Segformer model to predict at the edge
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -103,6 +106,9 @@ def predict(self, data, **kwargs):
return predictions

def predict_cloud(self, data, **kwargs):
"""
Use the SAM model to predict at the cloud
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand All @@ -124,6 +130,9 @@ def predict_cloud(self, data, **kwargs):
return predictions

def predict_score(self, data, **kwargs):
"""
Get the prediction scores of RFNet model
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def train(self, train_data, valid_data=None, **kwargs):
return self.train_model_url

def predict(self, data, **kwargs):
"""
Use the RFNet model to predict at the edge
"""
if len(data) > 10:
print("predict start for big data")
my_kwargs = {'num_workers': self.val_args.workers, 'pin_memory': True}
Expand Down

0 comments on commit 8e846cf

Please sign in to comment.