functions
openml.flows.functions
#
__list_flows
#
Retrieve information about flows from OpenML API and parse it to a dictionary or a Pandas DataFrame.
Parameters#
api_call: str Retrieves the information about flows.
Returns#
The flows information in the specified output format.
Source code in openml/flows/functions.py
assert_flows_equal
#
assert_flows_equal(flow1: OpenMLFlow, flow2: OpenMLFlow, ignore_parameter_values_on_older_children: str | None = None, ignore_parameter_values: bool = False, ignore_custom_name_if_none: bool = False, check_description: bool = True) -> None
Check equality of two flows.
Two flows are equal if their all keys which are not set by the server are equal, as well as all their parameters and components.
Parameters#
flow1 : OpenMLFlow
flow2 : OpenMLFlow
str (optional)
If set to OpenMLFlow.upload_date
, ignores parameters in a child
flow if it's upload date predates the upload date of the parent flow.
bool
Whether to ignore parameter values when comparing flows.
bool
Whether to ignore the custom name field if either flow has custom_name
equal to None
.
bool
Whether to ignore matching of flow descriptions.
Source code in openml/flows/functions.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
|
delete_flow
#
Delete flow with id flow_id
from the OpenML server.
You can only delete flows which you uploaded and which which are not linked to runs.
Parameters#
flow_id : int OpenML id of the flow
Returns#
bool True if the deletion was successful. False otherwise.
Source code in openml/flows/functions.py
flow_exists
#
Retrieves the flow id.
A flow is uniquely identified by name + external_version.
Parameters#
name : string Name of the flow external_version : string Version information associated with flow.
Returns#
flow_exist : int or bool flow id iff exists, False otherwise
Notes#
see www.openml.org/api_docs/#!/flow/get_flow_exists_name_version
Source code in openml/flows/functions.py
get_flow
#
get_flow(flow_id: int, reinstantiate: bool = False, strict_version: bool = True) -> OpenMLFlow
Download the OpenML flow for a given flow ID.
Parameters#
flow_id : int The OpenML flow id.
bool
Whether to reinstantiate the flow to a model instance.
bool, default=True
Whether to fail if version requirements are not fulfilled.
Returns#
flow : OpenMLFlow the flow
Source code in openml/flows/functions.py
get_flow_id
#
get_flow_id(model: Any | None = None, name: str | None = None, exact_version: bool = True) -> int | bool | list[int]
Retrieves the flow id for a model or a flow name.
Provide either a model or a name to this function. Depending on the input, it does
model
andexact_version == True
: This helper function first queries for the necessary extension. Second, it uses that extension to convert the model into a flow. Third, it executesflow_exists
to potentially obtain the flow id the flow is published to the server.model
andexact_version == False
: This helper function first queries for the necessary extension. Second, it uses that extension to convert the model into a flow. Third it callslist_flows
and filters the returned values based on the flow name.name
: Ignoresexact_version
and callslist_flows
, then filters the returned values based on the flow name.
Parameters#
model : object
Any model. Must provide either model
or name
.
name : str
Name of the flow. Must provide either model
or name
.
exact_version : bool
Whether to return the flow id of the exact version or all flow ids where the name
of the flow matches. This is only taken into account for a model where a version number
is available (requires model
to be set).
Returns#
int or bool, List
flow id iff exists, False
otherwise, List if exact_version is False
Source code in openml/flows/functions.py
list_flows
#
list_flows(offset: int | None = None, size: int | None = None, tag: str | None = None, uploader: str | None = None) -> DataFrame
Return a list of all flows which are on OpenML. (Supports large amount of results)
Parameters#
offset : int, optional the number of flows to skip, starting from the first size : int, optional the maximum number of flows to return tag : str, optional the tag to include kwargs: dict, optional Legal filter operators: uploader.
Returns#
flows : dataframe Each row maps to a dataset Each column contains the following information: - flow id - full name - name - version - external version - uploader