Commit
·
9d2346f
1
Parent(s):
4726829
Refactor datasets_server_valid_rows function to handle exceptions
Browse files
app.py
CHANGED
@@ -46,9 +46,12 @@ TARGET_COLUMN_NAMES = {
|
|
46 |
|
47 |
|
48 |
def datasets_server_valid_rows(hub_id: str):
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
52 |
|
53 |
|
54 |
def get_first_config_and_split_name(hub_id: str):
|
|
|
46 |
|
47 |
|
48 |
def datasets_server_valid_rows(hub_id: str):
|
49 |
+
try:
|
50 |
+
resp = client.get(f"{BASE_DATASETS_SERVER_URL}/is-valid?dataset={hub_id}")
|
51 |
+
return resp.json()["viewer"]
|
52 |
+
except Exception as e:
|
53 |
+
logger.error(f"Failed to get is-valid for {hub_id}: {e}")
|
54 |
+
return False
|
55 |
|
56 |
|
57 |
def get_first_config_and_split_name(hub_id: str):
|