MCPcopy Create free account
hub / github.com/alibaba/GraphScope / set_option

Function set_option

python/graphscope/client/session.py:1438–1493  ·  view source on GitHub ↗

Set the value of specified options. Find params detail in :class:`graphscope.Session` Available options: - num_workers - log_level - show_log - vineyard_shared_mem - k8s_namespace - k8s_service_type - k8s_gs_image - k8s_etcd_i

(**kwargs)

Source from the content-addressed store, hash-verified

1436
1437
1438def set_option(**kwargs):
1439 """Set the value of specified options.
1440
1441 Find params detail in :class:`graphscope.Session`
1442
1443 Available options:
1444 - num_workers
1445 - log_level
1446 - show_log
1447 - vineyard_shared_mem
1448 - k8s_namespace
1449 - k8s_service_type
1450 - k8s_gs_image
1451 - k8s_etcd_image
1452 - k8s_image_pull_policy
1453 - k8s_image_pull_secrets
1454 - k8s_coordinator_cpu
1455 - k8s_coordinator_mem
1456 - k8s_vineyard_deployment
1457 - k8s_vineyard_cpu
1458 - k8s_vineyard_mem
1459 - k8s_engine_cpu
1460 - k8s_engine_mem
1461 - k8s_mars_worker_cpu
1462 - k8s_mars_worker_mem
1463 - k8s_mars_scheduler_cpu
1464 - k8s_mars_scheduler_mem
1465 - enabled_engines
1466 - with_mars
1467 - with_dataset
1468 - k8s_volumes
1469 - k8s_waiting_for_delete
1470 - timeout_seconds
1471 - dataset_download_retries
1472 - k8s_deploy_mode
1473
1474 Args:
1475 kwargs: dict
1476 kv pair of GraphScope config you want to set.
1477
1478 Raises:
1479 ValueError: If no such option exists.
1480
1481 Returns: None
1482 """
1483
1484 for k, v in kwargs.items():
1485 gs_config.set_option(k, v)
1486
1487 # use string as log level
1488 if k == "log_level" and isinstance(v, int):
1489 level = logging.getLevelName(v)
1490 if " " not in level: # invalid number will return "Level xxx"
1491 gs_config.set_option(k, level.upper())
1492
1493 GSLogger.update()
1494
1495

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.80
set_optionMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected