-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ValueError(f"Bad value for instance type: '{instance_type}'") #3993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To summarize the problem a bit more compactly: it seems that as of this writing, the newer versions of the sagemaker Python package (e.g. 2.171.0), require Is there a reason it was changed now, or is it a bug? |
Hi @evakravi, pinging you because you're the author of the change mentioned above. We noticed the recent change you made doesn't evaluate the ParameterString value, but uses the default_value. This might let an invalid instance_type pass if its default_instance_type is valid for the volume. We're considering creating a PR to modify this logic. We want to use a PipelineVariable akin to a JsonGet (as we've done before), allowing us to assign an instance_type later in the pipeline execution instead of at the start. So basically we need to bypass the check altogether because we can't know the volume ahead of time. Could you please provide more context for your change, to help us understand if our approach is okay? |
Putting a summary here for the regression resulted from #3870:
Tagging the change owner @evakravi for more context, can we fix this issue and make your change backward compatible? |
Also, seems we're missing test cases for inputing pipeline variables other than ParameterString (e.g. JsonGet) to instance_type. Hi @mlsquareup, as you've mentioned:
Have you opened a PR or have done that locally already? Thanks! |
I work with @mlsquareup. We haven't created such a PR yet, as we were first looking to get feedback explaining why the change was made in the first place. We'd still rather someone with more familiarity with the codebase than us make the change (this is the first time we've looked at the source), if that's possible and something folks are interested in addressing. |
Thanks @eugeneyarovoi for confirming! |
Describe the bug
Good Morning, I get an error when trying to create a pipeline execution, after updating sagemaker, as follows:
Firstly the TypeError is incorrect, I don't want to to_string() the pipeline variable right off the bat, as I don't know what instance type I will need. I want to dynamically assign an instance_type after I've estimated the resources required to run a job. This resource estimation is part of our pipeline.
To reproduce
Try to create an estimator with instance_type = a PipelineVariable with recent version of sagemaker==2.171.0
Expected behavior
Before recent changes I was able to dynamically assign an instance type. Now I have to do some kind of workaround, such as using ConditionStep and JsonGet'ing the type. Or some other workaround, if you could please provide any suggestions.
Is this expected behavior? Is the point that each step should be assigned an instance_type at pipeline execution start or is there another reason? If not, assigning an instance_type is important as we want to accurately estimate the resources for a training job rather than overprovision or guess too early. We have files that might have high compression ratios that we cannot accurate gauge the size of early on.
The text was updated successfully, but these errors were encountered: