functions
__list_flows(api_call, output_format='dict')
¶
Retrieve information about flows from OpenML API and parse it to a dictionary or a Pandas DataFrame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_call
|
str
|
Retrieves the information about flows. |
required |
output_format
|
Literal['dict', 'dataframe']
|
The output format. |
'dict'
|
Returns:
Type | Description |
---|---|
The flows information in the specified output format.
|
|
Source code in openml/flows/functions.py
assert_flows_equal(flow1, flow2, ignore_parameter_values_on_older_children=None, ignore_parameter_values=False, ignore_custom_name_if_none=False, check_description=True)
¶
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:
Name | Type | Description | Default |
---|---|---|---|
flow1
|
OpenMLFlow
|
|
required |
flow2
|
OpenMLFlow
|
|
required |
ignore_parameter_values_on_older_children
|
str(optional)
|
If set to |
None
|
ignore_parameter_values
|
bool
|
Whether to ignore parameter values when comparing flows. |
False
|
ignore_custom_name_if_none
|
bool
|
Whether to ignore the custom name field if either flow has |
False
|
check_description
|
bool
|
Whether to ignore matching of flow descriptions. |
True
|
Source code in openml/flows/functions.py
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 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
|
delete_flow(flow_id)
¶
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:
Name | Type | Description | Default |
---|---|---|---|
flow_id
|
int
|
OpenML id of the flow |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the deletion was successful. False otherwise. |
Source code in openml/flows/functions.py
flow_exists(name, external_version)
¶
Retrieves the flow id.
A flow is uniquely identified by name + external_version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
string
|
Name of the flow |
required |
external_version
|
string
|
Version information associated with flow. |
required |
Returns:
Name | Type | Description |
---|---|---|
flow_exist |
int or bool
|
flow id iff exists, False otherwise |
Source code in openml/flows/functions.py
get_flow(flow_id, reinstantiate=False, strict_version=True)
¶
Download the OpenML flow for a given flow ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flow_id
|
int
|
The OpenML flow id. |
required |
reinstantiate
|
bool
|
Whether to reinstantiate the flow to a model instance. |
False
|
strict_version
|
bool
|
Whether to fail if version requirements are not fulfilled. |
True
|
Returns:
Name | Type | Description |
---|---|---|
flow |
OpenMLFlow
|
the flow |
Source code in openml/flows/functions.py
get_flow_id(model=None, name=None, exact_version=True)
¶
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:
Name | Type | Description | Default |
---|---|---|---|
model
|
object
|
Any model. Must provide either |
None
|
name
|
str
|
Name of the flow. Must provide either |
None
|
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 |
True
|
Returns:
Type | Description |
---|---|
(int or bool, List)
|
flow id iff exists, |
Source code in openml/flows/functions.py
list_flows(offset=None, size=None, tag=None, output_format='dict', **kwargs)
¶
Return a list of all flows which are on OpenML. (Supports large amount of results)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
offset
|
int
|
the number of flows to skip, starting from the first |
None
|
size
|
int
|
the maximum number of flows to return |
None
|
tag
|
str
|
the tag to include |
None
|
output_format
|
Literal['dict', 'dataframe']
|
The parameter decides the format of the output. - If 'dict' the output is a dict of dict - If 'dataframe' the output is a pandas DataFrame |
'dict'
|
kwargs
|
Any
|
Legal filter operators: uploader. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
flows |
dict of dicts, or dataframe
|
|