Skip to content
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

docs: Improved image dataset creation sample #818

Merged
merged 2 commits into from Nov 6, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,19 +12,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# [START aiplatform_sdk_create_and_import_dataset_image_sample]
from typing import List, Union

from google.cloud import aiplatform


# [START aiplatform_sdk_create_and_import_dataset_image_sample]
def create_and_import_dataset_image_sample(
project: str,
location: str,
display_name: str,
src_uris: Union[str, List[str]],
sync: bool = True,
):
"""
src_uris -- a string or list of strings, e.g.
["gs://bucket1/source1.jsonl", "gs://bucket7/source4.jsonl"]
"""

aiplatform.init(project=project, location=location)

ds = aiplatform.ImageDataset.create(
Expand Down