Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/openmldb_autofe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ OpenMLDB AutoFE steps:
1. generate time features, translate them to one sql(`OpenMLDBSQLGenerator`)
1. use the sql to query OpenMLDB(include creating tables,loading data, extracting feature), get extracted features, you can check it in `<offline_feature_path>/first_features`
1. use `first_features` to train(`AutoXTrain`), get top k features
1. `OpenMLDBSQLGenerator` traslate the top k features to one sql(`final_sql`)
1. `OpenMLDBSQLGenerator` translate the top k features to one sql(`final_sql`)

### Boundary

Expand Down
2 changes: 1 addition & 1 deletion python/openmldb_autofe/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install_requires =
pandas
pyyaml
pyarrow
tensorflow # inclue keras, automl-x won't install them
tensorflow # include keras, automl-x won't install them

[options.entry_points]
console_scripts =
Expand Down
2 changes: 1 addition & 1 deletion python/openmldb_autofe/tests/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ windows:
window_type: rows_range
start: 1d PRECEDING
end: CURRENT ROW
# TODO supoort exclude ...
# TODO support exclude ...

# ref autoX table relations https://github.com/4paradigm/AutoX/blob/a2b0f8dfe9e8870c8ff5d420dd970a485a0e0f1a/autox/autox_competition/README.md#%E8%A1%A8%E5%85%B3%E7%B3%BB
# relations:
Expand Down
4 changes: 2 additions & 2 deletions python/openmldb_sdk/openmldb/dbapi/dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def batch_row_request(self, sql, commonCol, parameters):
def executeRequest(self, sql, parameter):
command = sql.strip(' \t\n\r')
if selectRE.match(command) == False:
raise Exception("Invalid opertion for request")
raise Exception("Invalid operation for request")

ok, rs = self.connection._sdk.doRequestQuery(None, sql, parameter)
if not ok:
Expand Down Expand Up @@ -591,7 +591,7 @@ def rollback(self):

def commit(self):
"""
openmldb doesn't suppport transactions
openmldb doesn't support transactions

So just do nothing to support this method
"""
Expand Down
4 changes: 2 additions & 2 deletions python/openmldb_tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ openmldb_tool status --cluster=127.0.0.1:2181/openmldb

## Status
```
status [-h] [--helpfull] [--diff DIFF]
status [-h] [--helpful] [--diff DIFF]

optional arguments:
-h, --help show this help message and exit
--helpfull show full help message and exit
--helpful show full help message and exit
--diff check if all endpoints in conf are in cluster. If set, need to set `-f,--conf_file`
```

Expand Down
6 changes: 3 additions & 3 deletions python/openmldb_tool/diagnostic_tool/diagnose.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def inspect(args):
inspect_hint(offlines, hints)


def insepct_online(args):
def inspect_online(args):
"""inspect online"""
connect = Connector()
# scan all db include system db
Expand Down Expand Up @@ -261,7 +261,7 @@ def rpc(args):
)
return

# use status connction to get version
# use status connection to get version
conns_with_version = {
endpoint: version
for endpoint, version, _, _ in status_checker.check_connection()
Expand Down Expand Up @@ -338,7 +338,7 @@ def parse_arg(argv):
inspect_sub = inspect_parser.add_subparsers()
# inspect online
online = inspect_sub.add_parser("online", help="only inspect online table.")
online.set_defaults(command=insepct_online)
online.set_defaults(command=inspect_online)
online.add_argument(
"--dist", action="store_true", help="Inspect online distribution."
)
Expand Down
2 changes: 1 addition & 1 deletion python/openmldb_tool/diagnostic_tool/log_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def log_files(self, server_info: ServerInfo):
return [f"{logs_path}{f}" for f in os.listdir(logs_path) if os.path.isfile(f"{logs_path}{f}")]

def run(self):
"""anaylsis all servers' log file"""
"""analysis all servers' log file"""
# cxx server glog
def grep_log(server_info: ServerInfo) -> bool:
files = self.log_files(server_info)
Expand Down
6 changes: 3 additions & 3 deletions python/openmldb_tool/diagnostic_tool/server_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def check_components(self):
return self._check_status(components_map)

def check_connection(self):
"""check all compontents connections"""
"""check all components connections"""
component_map = self._get_components(show=False)
t = PrettyTable()
t.title = "Connections"
Expand All @@ -63,7 +63,7 @@ def check_connection(self):
return conns

def _get_information(self, endpoint):
"""get informations from components except taskmanager"""
"""get information from components except taskmanager"""
try:
response = requests.get(f"http://{endpoint}/status", timeout=1) # the connection timeout is 1 second
response.raise_for_status()
Expand All @@ -79,7 +79,7 @@ def _get_information(self, endpoint):
return version, response_time, ex, ""

def _get_information_taskmanager(self, endpoint):
"""get informations from taskmanager"""
"""get information from taskmanager"""
try:
response = requests.post(f"http://{endpoint}/openmldb.taskmanager.TaskManagerServer/GetVersion", json={})
response.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion python/openmldb_tool/tests/cmd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_helpmsg():
with pytest.raises(SystemExit):
parse_arg(["foo", "static-check", "-h"])
with pytest.raises(SystemExit):
parse_arg(["foo", "--helpfull"])
parse_arg(["foo", "--helpful"])
with pytest.raises(SystemExit):
parse_arg(["foo", "rpc", "-h"])

Expand Down
6 changes: 3 additions & 3 deletions python/openmldb_tool/tests/dist_conf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_read_yaml():
dist = YamlConfReader(current_path + "/cluster_dist.yml").conf()
yaml_asserts(dist)

def hosts_asssert(dist):
def hosts_assert(dist):
assert dist.mode == "cluster"
assert len(dist.server_info_map.map["nameserver"]) == 1
assert len(dist.server_info_map.map["tablet"]) == 2
Expand All @@ -40,13 +40,13 @@ def hosts_asssert(dist):
def test_read_hosts():
current_path = os.path.dirname(__file__)
dist = HostsConfReader(current_path + "/hosts").conf()
hosts_asssert(dist)
hosts_assert(dist)


def test_auto_read():
current_path = os.path.dirname(__file__)
# read in yaml style failed, then read in hosts style
dist = read_conf(current_path + "/hosts")
hosts_asssert(dist)
hosts_assert(dist)
dist = read_conf(current_path + "/cluster_dist.yml")
yaml_asserts(dist)
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#--max_traverse_cnt=0
# max table traverse pk number(batch query), default: 0
#--max_traverse_pk_cnt=0
# max result size in byte (default: 0 ulimited)
# max result size in byte (default: 0 unlimited)
#--scan_max_bytes_size=0

# loadtable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#--max_traverse_cnt=0
# max table traverse pk number(batch query), default: 0
#--max_traverse_pk_cnt=0
# max result size in byte (default: 0 ulimited)
# max result size in byte (default: 0 unlimited)
#--scan_max_bytes_size=0

# loadtable
Expand Down
Loading