Skip to content

[Launch] add bundle_id for model creation#270

Merged
syandroo merged 18 commits intomasterfrom
bundle-link
May 10, 2022
Merged

[Launch] add bundle_id for model creation#270
syandroo merged 18 commits intomasterfrom
bundle-link

Conversation

@syandroo
Copy link
Contributor

@syandroo syandroo commented Apr 4, 2022

added the ability to link a bundle to the model project object in #34891, this adds it to the client so we can demo

nucleus/model.py Outdated
name=payload["name"],
reference_id=payload["ref_id"],
metadata=payload["metadata"] or None,
bundle_id=payload["bundle_id"] or None,

Choose a reason for hiding this comment

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

I am curious, is payload["smth"] or None is justified, or payload.get("smth", None) would be better? Or wee need the code to break if bundle_id is not provided?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm - interesting question, i think metadata is also not a required field but the thing that calls this defaults it to None also so this is really just a fallback

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for payload.get("smth", None)

@phil-scale
Copy link
Contributor

The interface change looks reasonable to me, though I wonder if you want to use bundle_id or bundle_name - is the bundle name guaranteed to be unique per user?

@syandroo
Copy link
Contributor Author

syandroo commented Apr 5, 2022

@phil-scale good q, it's actually mostly semantic since what we actually store is the bundle_name, (we used to refer to the bundle_name as bundle_id then moved some to bundle_name). on the user side we never expose the uuid that bundle or endpoint has, just their names.

@syandroo
Copy link
Contributor Author

syandroo commented Apr 5, 2022

i just wanted both the client and the API endpoint to have the same name, but i can change both to bundle_name if u think it's needed, just would require a lil bit more coordination on deploying.

@sasha-scale
Copy link
Contributor

I agree with Phil, let's keep the user interface always using user defined names

nucleus/model.py Outdated
"""

def __init__(self, model_id, name, reference_id, metadata, client):
def __init__(self, model_id, name, reference_id, metadata, bundle_id, client):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a default bundle_id=None or is that something that Nucleus doesn't do? I guess if this isn't ever user-created it's probably fine to not have this default?

Copy link
Contributor Author

@syandroo syandroo left a comment

Choose a reason for hiding this comment

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

need to commit from phone

@yixu34
Copy link
Member

yixu34 commented Apr 8, 2022

Don't we want to base this off of the hmi-release branch? Or have we moved onto master?

@seanshi-scale
Copy link
Contributor

Don't we want to base this off of the hmi-release branch? Or have we moved onto master?

This looks like client changes on the nucleus side to support Launch integration, so I think this goes on master, irrespective of whatever happens to hmi-release.

@sasha-scale
Copy link
Contributor

that's correct, OK to merge this into master (independent of HMI release branch)

Copy link
Contributor

@seanshi-scale seanshi-scale left a comment

Choose a reason for hiding this comment

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

I'll defer to someone on nucleus but this looks good to me

@syandroo syandroo merged commit 523ca50 into master May 10, 2022
@syandroo syandroo deleted the bundle-link branch May 10, 2022 23:36
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.

6 participants