Skip to content

Cookbook APIs - #29

Merged
mgoldmansight merged 10 commits into
masterfrom
ENG-586_SDK_cookbooks
Mar 23, 2023
Merged

Cookbook APIs#29
mgoldmansight merged 10 commits into
masterfrom
ENG-586_SDK_cookbooks

Conversation

@mgoldmansight

Copy link
Copy Markdown
Contributor

No description provided.

@srblum srblum left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally ok, but please review grammar/spelling for documentation, and add docstrings to methods.

Comment thread tests/cookbook/test_cookbook.py Outdated
dt = Client("demo")

# Run
runs = dt.get_top_results('recipe_group_id', 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method and the current value method should have "cookbook" in the name somewhere.

Comment thread smsdk/client.py

return fields

def get_cookbooks(self, **kwargs):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add docstrings for these functions, akin to the docstring in get_data_v1 above (copied below). Docstrings are helpful because they show up automatically when you call help(cli.get_cookbooks) in the python REPL.

        """
        Main data fetching function for all the entities.  Note this is the general data fetch function.  You probably want to use the model-specific functions such as get_cycles().
        :param ename: Name of the entities
        :param util_name: Name of the utility function
        :param normalize: Flatten nested data structures
        :return: pandas dataframe
        """

Comment thread docs/commonly_used_data_types/run.md Outdated
We will go over each key in more detail

## _count
The number of total runs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of total records in the run.

Comment thread docs/commonly_used_data_types/run.md Outdated
The number of total runs.

## _count_muted
The number of runs muted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of records filtered out in the run.

Comment thread docs/commonly_used_data_types/run.md Outdated
A list of the constraints on this run

## cookbook
The id of the cookbook this run relates to?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Remove question mark.

The name of the field used for the constraint.

#### type
The data type of the constraint, mostly commonly continuous or categorical

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: mostly commonly

The wieght you are putting on this outcome as compared to the others.

#### optimization_func
How you wish to optimize this field usually 'maximize' or 'minize'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minize

"filters": {'duration': {'isEnabled': False, 'minimum': 0, 'unit': 'second'}, 'recordFilters': []},
"dateRange": {'value': {'relativeAmount': 7, 'relativeUnit': 'day'}, 'config': {'mode': 'relative', 'selectableRelativeUnits': ['minute', 'hour', 'day', 'week', 'month', 'year'], 'enableTimeTypeSelection': True, 'showQuarterShortcuts': True}}
"computeDeployedDateRange": None,
"statsCalculationSetting": "defualt",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defualt -> default

The time the cookbook was last updated.

## assets
A list of assets used in the cookbook?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

This is used by the frontend UI and can be safely ignored for our purposes.

### statsCalculationSetting
How the recipe group runs calculations? Can be set to defualt?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy. Unused.

@mgoldmansight
mgoldmansight merged commit c1d22e2 into master Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants