functions
__list_flows(api_call)
¶
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 |
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
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(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
modelandexact_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_existsto potentially obtain the flow id the flow is published to the server.modelandexact_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_flowsand filters the returned values based on the flow name.name: Ignoresexact_versionand 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, uploader=None)
¶
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
|
kwargs
|
Legal filter operators: uploader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
flows |
dataframe
|
Each row maps to a dataset Each column contains the following information: - flow id - full name - name - version - external version - uploader |