Skip to content

ppai: fix lint errors #7788

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

Merged
merged 16 commits into from
Apr 19, 2022

Conversation

davidcavazos
Copy link
Contributor

Description

Fixes #7786

Checklist

@davidcavazos davidcavazos requested a review from a team as a code owner April 12, 2022 15:44
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 12, 2022
@dandhlee
Copy link
Collaborator

TypeError: 'type' object is not subscriptable D:

@leahecole
Copy link
Collaborator

TypeError: 'type' object is not subscriptable D:

Ah crap - this might be a backwards compatibility thing. If that's the case and we need to maintain compatibility with older versions of Python and that means we have to use Any, that's an okay justification.

@davidcavazos davidcavazos requested a review from a team as a code owner April 12, 2022 19:43
@glasnt glasnt mentioned this pull request Apr 12, 2022
4 tasks
@dandhlee
Copy link
Collaborator

Few more issues:

  File "/workspace/people-and-planet-ai/timeseries-classification/create_datasets.py", line 32, in <module>
    train_eval_split: list[int],
TypeError: 'type' object is not subscriptable
  • 404 on models

Is the 404 error flaky? Or is it an actual error?

@davidcavazos
Copy link
Contributor Author

It looks like the Dataflow pipeline failed with File "train_model.py", line 129, in get_image NameError: name 'beam' is not defined [while running 'Get image-ptransform-59']. That's weird because we're passing save_main_session=True to the pipeline, so it should have all the imports (including beam).

@davidcavazos
Copy link
Contributor Author

It looks like there's some sort of exception on saving the global context for the Beam library itself. It looks like it's something that changed on a more recent version because it wasn't an issue before. Importing beam explicitly inside those functions seems to fix it.

@davidcavazos
Copy link
Contributor Author

It's not finding the AutoML model to do predictions. The model was a permanent resource and it somehow got deleted. I'm going to make a fallback so if it doesn't find the model in AutoML, it'll use a mock implementation to simply test that all methods are called correctly.

@davidcavazos davidcavazos merged commit 8064e13 into GoogleCloudPlatform:main Apr 19, 2022
@davidcavazos davidcavazos deleted the ppai-lint-errors branch April 19, 2022 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

People and Planet AI is throwing lint errors
4 participants