Browse Source

[MNT] Fix typo finetune

tags/v0.3.2
bxdd 3 years ago
parent
commit
a2ae775e25
4 changed files with 5 additions and 5 deletions
  1. +1
    -1
      examples/example_market_db/example_init.py
  2. +1
    -1
      examples/workflow_by_code/example_init.py
  3. +1
    -2
      examples/workflow_by_code/main.py
  4. +2
    -1
      learnware/model/base.py

+ 1
- 1
examples/example_market_db/example_init.py View File

@@ -15,5 +15,5 @@ class SVM(BaseModel):
def predict(self, X: np.ndarray) -> np.ndarray:
return self.model.predict(X)

def fintune(self, X: np.ndarray, y: np.ndarray):
def finetune(self, X: np.ndarray, y: np.ndarray):
pass

+ 1
- 1
examples/workflow_by_code/example_init.py View File

@@ -15,5 +15,5 @@ class SVM(BaseModel):
def predict(self, X: np.ndarray) -> np.ndarray:
return self.model.predict(X)

def fintune(self, X: np.ndarray, y: np.ndarray):
def finetune(self, X: np.ndarray, y: np.ndarray):
pass

+ 1
- 2
examples/workflow_by_code/main.py View File

@@ -135,8 +135,6 @@ class LearnwareMarketWorkflow:
os.makedirs(unzip_dir, exist_ok=True)
os.system(f"unzip -o -q {zip_path} -d {unzip_dir}")

user_spec = specification.rkme.RKMEStatSpecification()
user_spec.load(os.path.join(unzip_dir, "svm.json"))
user_info = BaseUserInfo(id="user_0", semantic_spec=user_senmantic)
_, single_learnware_list, _ = easy_market.search_learnware(user_info)

@@ -151,6 +149,7 @@ class LearnwareMarketWorkflow:
self._init_learnware_market()
self.prepare_learnware_randomly(learnware_num)

print(self.zip_path_list)
easy_market = EasyMarket()
print("Total Item:", len(easy_market))



+ 2
- 1
learnware/model/base.py View File

@@ -1,4 +1,5 @@
import numpy as np
from abc import abstractmethod


class BaseModel:
@@ -11,5 +12,5 @@ class BaseModel:
def predict(self, X: np.ndarray) -> np.ndarray:
pass

def fintune(self, X: np.ndarray, y: np.ndarray):
def finetune(self, X: np.ndarray, y: np.ndarray):
pass

Loading…
Cancel
Save