MCPcopy
hub / github.com/ray-project/ray / config

Function config

python/ray/serve/scripts.py:623–656  ·  view source on GitHub ↗
(address: str, name: Optional[str])

Source from the content-addressed store, hash-verified

621 ),
622)
623def config(address: str, name: Optional[str]):
624 warn_if_agent_address_set()
625
626 serve_details = ServeInstanceDetails(
627 **ServeSubmissionClient(address).get_serve_details()
628 )
629 applications = serve_details.applications
630
631 # Fetch app configs for all live applications on the cluster
632 if name is None:
633 configs = [
634 yaml.dump(
635 app.deployed_app_config.model_dump(exclude_unset=True),
636 Dumper=ServeDeploySchemaDumper,
637 sort_keys=False,
638 )
639 for app in applications.values()
640 if app.deployed_app_config is not None
641 ]
642 if configs:
643 print("\n---\n\n".join(configs), end="")
644 else:
645 print("No configuration was found.")
646 # Fetch a specific app config by name.
647 else:
648 app = applications.get(name)
649 if app is None or app.deployed_app_config is None:
650 print(f'No config has been deployed for application "{name}".')
651 else:
652 config = app.deployed_app_config.model_dump(exclude_unset=True)
653 print(
654 yaml.dump(config, Dumper=ServeDeploySchemaDumper, sort_keys=False),
655 end="",
656 )
657
658
659@cli.command(

Callers

nothing calls this directly

Calls 9

printFunction · 0.85
getMethod · 0.65
get_serve_detailsMethod · 0.45
dumpMethod · 0.45
valuesMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…