kaggle 1.6.0a5__tar.gz → 1.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {kaggle-1.6.0a5/kaggle.egg-info → kaggle-1.6.1}/PKG-INFO +1 -1
  2. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/__init__.py +1 -1
  3. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/api/__init__.py +1 -1
  4. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/api/kaggle_api.py +1 -1
  5. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/api/kaggle_api_extended.py +70 -24
  6. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/api_client.py +1 -1
  7. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/cli.py +1 -1
  8. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/configuration.py +1 -1
  9. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/__init__.py +1 -1
  10. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/api_blob_type.py +1 -1
  11. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/collaborator.py +1 -1
  12. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/create_inbox_file_request.py +1 -1
  13. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/dataset_column.py +1 -1
  14. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/dataset_new_request.py +2 -2
  15. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/dataset_new_version_request.py +1 -1
  16. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/dataset_update_settings_request.py +1 -1
  17. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/error.py +1 -1
  18. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/kaggle_models_extended.py +1 -1
  19. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/kernel_push_request.py +1 -1
  20. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/license.py +2 -2
  21. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/model_instance_new_version_request.py +1 -1
  22. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/model_instance_update_request.py +95 -5
  23. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/model_new_instance_request.py +95 -5
  24. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/model_new_request.py +1 -1
  25. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/model_update_request.py +1 -1
  26. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/result.py +1 -1
  27. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/start_blob_upload_request.py +1 -1
  28. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/start_blob_upload_response.py +1 -1
  29. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/models/upload_file.py +1 -1
  30. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/rest.py +1 -1
  31. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/test/__init__.py +1 -1
  32. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle/test/test_authenticate.py +1 -1
  33. {kaggle-1.6.0a5 → kaggle-1.6.1/kaggle.egg-info}/PKG-INFO +1 -1
  34. {kaggle-1.6.0a5 → kaggle-1.6.1}/setup.py +2 -2
  35. {kaggle-1.6.0a5 → kaggle-1.6.1}/LICENSE +0 -0
  36. {kaggle-1.6.0a5 → kaggle-1.6.1}/MANIFEST.in +0 -0
  37. {kaggle-1.6.0a5 → kaggle-1.6.1}/README.md +0 -0
  38. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle.egg-info/SOURCES.txt +0 -0
  39. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle.egg-info/dependency_links.txt +0 -0
  40. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle.egg-info/entry_points.txt +0 -0
  41. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle.egg-info/requires.txt +0 -0
  42. {kaggle-1.6.0a5 → kaggle-1.6.1}/kaggle.egg-info/top_level.txt +0 -0
  43. {kaggle-1.6.0a5 → kaggle-1.6.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaggle
3
- Version: 1.6.0a5
3
+ Version: 1.6.1
4
4
  Summary: Kaggle API
5
5
  Home-page: https://github.com/Kaggle/kaggle-api
6
6
  Author: Kaggle
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -272,7 +272,7 @@ class ResumableFileUpload(object):
272
272
 
273
273
 
274
274
  class KaggleApi(KaggleApi):
275
- __version__ = '1.6.0a5'
275
+ __version__ = '1.6.1'
276
276
 
277
277
  CONFIG_NAME_PROXY = 'proxy'
278
278
  CONFIG_NAME_COMPETITION = 'competition'
@@ -911,7 +911,7 @@ class KaggleApi(KaggleApi):
911
911
  """ download a competition file to a designated location, or use
912
912
  a default location
913
913
 
914
- Paramters
914
+ Parameters
915
915
  =========
916
916
  competition: the name of the competition
917
917
  file_name: the configuration file name
@@ -2876,6 +2876,16 @@ class KaggleApi(KaggleApi):
2876
2876
  data['licenseName'] = mi['licenseName']
2877
2877
  data['fineTunable'] = mi['fineTunable']
2878
2878
  data['trainingData'] = mi['trainingData']
2879
+ data['versionId'] = mi['versionId']
2880
+ data['versionNumber'] = mi['versionNumber']
2881
+ data['modelInstanceType'] = mi['modelInstanceType']
2882
+ if mi['baseModelInstanceInformation'] is not None:
2883
+ data['baseModelInstance'] = '{}/{}/{}/{}'.format(
2884
+ mi['baseModelInstanceInformation']['owner']['slug'],
2885
+ mi['baseModelInstanceInformation']['modelSlug'],
2886
+ mi['baseModelInstanceInformation']['framework'],
2887
+ mi['baseModelInstanceInformation']['instanceSlug'])
2888
+ data['externalBaseModelUrl'] = mi['externalBaseModelUrl']
2879
2889
 
2880
2890
  with open(meta_file, 'w') as f:
2881
2891
  json.dump(data, f, indent=2)
@@ -2912,7 +2922,10 @@ class KaggleApi(KaggleApi):
2912
2922
  ''',
2913
2923
  'licenseName': 'Apache 2.0',
2914
2924
  'fineTunable': False,
2915
- 'trainingData': []
2925
+ 'trainingData': [],
2926
+ 'modelInstanceType': 'Unspecified',
2927
+ 'baseModelInstanceId': 0,
2928
+ 'externalBaseModelUrl': ''
2916
2929
  }
2917
2930
  meta_file = os.path.join(folder, self.MODEL_INSTANCE_METADATA_FILE)
2918
2931
  with open(meta_file, 'w') as f:
@@ -2952,6 +2965,14 @@ class KaggleApi(KaggleApi):
2952
2965
  license_name = self.get_or_fail(meta_data, 'licenseName')
2953
2966
  fine_tunable = self.get_or_default(meta_data, 'fineTunable', False)
2954
2967
  training_data = self.get_or_default(meta_data, 'trainingData', [])
2968
+ model_instance_type = self.get_or_default(meta_data,
2969
+ 'modelInstanceType',
2970
+ 'Unspecified')
2971
+ base_model_instance = self.get_or_default(meta_data,
2972
+ 'baseModelInstance', '')
2973
+ external_base_model_url = self.get_or_default(meta_data,
2974
+ 'externalBaseModelUrl',
2975
+ '')
2955
2976
 
2956
2977
  # validations
2957
2978
  if owner_slug == 'INSERT_OWNER_SLUG_HERE':
@@ -2977,14 +2998,18 @@ class KaggleApi(KaggleApi):
2977
2998
  if not isinstance(training_data, list):
2978
2999
  raise ValueError('modelInstance.trainingData must be a list')
2979
3000
 
2980
- request = ModelNewInstanceRequest(instance_slug=instance_slug,
2981
- framework=framework,
2982
- overview=overview,
2983
- usage=usage,
2984
- license_name=license_name,
2985
- fine_tunable=fine_tunable,
2986
- training_data=training_data,
2987
- files=[])
3001
+ request = ModelNewInstanceRequest(
3002
+ instance_slug=instance_slug,
3003
+ framework=framework,
3004
+ overview=overview,
3005
+ usage=usage,
3006
+ license_name=license_name,
3007
+ fine_tunable=fine_tunable,
3008
+ training_data=training_data,
3009
+ model_instance_type=model_instance_type,
3010
+ base_model_instance=base_model_instance,
3011
+ external_base_model_url=external_base_model_url,
3012
+ files=[])
2988
3013
 
2989
3014
  with ResumableUploadContext() as upload_context:
2990
3015
  self.upload_files(request, None, folder, ApiBlobType.MODEL,
@@ -3077,6 +3102,13 @@ class KaggleApi(KaggleApi):
3077
3102
  license_name = self.get_or_default(meta_data, 'licenseName', None)
3078
3103
  fine_tunable = self.get_or_default(meta_data, 'fineTunable', None)
3079
3104
  training_data = self.get_or_default(meta_data, 'trainingData', None)
3105
+ model_instance_type = self.get_or_default(meta_data,
3106
+ 'modelInstanceType', None)
3107
+ base_model_instance = self.get_or_default(meta_data,
3108
+ 'baseModelInstance', None)
3109
+ external_base_model_url = self.get_or_default(meta_data,
3110
+ 'externalBaseModelUrl',
3111
+ None)
3080
3112
 
3081
3113
  # validations
3082
3114
  if owner_slug == 'INSERT_OWNER_SLUG_HERE':
@@ -3116,13 +3148,23 @@ class KaggleApi(KaggleApi):
3116
3148
  update_mask['paths'].append('fine_tunable')
3117
3149
  if training_data != None:
3118
3150
  update_mask['paths'].append('training_data')
3119
-
3120
- request = ModelInstanceUpdateRequest(overview=overview,
3121
- usage=usage,
3122
- license_name=license_name,
3123
- fine_tunable=fine_tunable,
3124
- training_data=training_data,
3125
- update_mask=update_mask)
3151
+ if model_instance_type != None:
3152
+ update_mask['paths'].append('model_instance_type')
3153
+ if base_model_instance != None:
3154
+ update_mask['paths'].append('base_model_instance')
3155
+ if external_base_model_url != None:
3156
+ update_mask['paths'].append('external_base_model_url')
3157
+
3158
+ request = ModelInstanceUpdateRequest(
3159
+ overview=overview,
3160
+ usage=usage,
3161
+ license_name=license_name,
3162
+ fine_tunable=fine_tunable,
3163
+ training_data=training_data,
3164
+ model_instance_type=model_instance_type,
3165
+ base_model_instance=base_model_instance,
3166
+ external_base_model_url=external_base_model_url,
3167
+ update_mask=update_mask)
3126
3168
  result = ModelNewResponse(
3127
3169
  self.process_response(
3128
3170
  self.update_model_instance_with_http_info(
@@ -3271,6 +3313,7 @@ class KaggleApi(KaggleApi):
3271
3313
  os.remove(outfile)
3272
3314
  except OSError as e:
3273
3315
  print('Could not delete tar file, got %s' % e)
3316
+ return outfile
3274
3317
 
3275
3318
  def model_instance_version_download_cli(self,
3276
3319
  model_instance_version,
@@ -3289,11 +3332,11 @@ class KaggleApi(KaggleApi):
3289
3332
  quiet: suppress verbose output (default is False)
3290
3333
  untar: if True, untar files upon download (default is False)
3291
3334
  """
3292
- self.model_instance_version_download(model_instance_version,
3293
- path=path,
3294
- untar=untar,
3295
- force=force,
3296
- quiet=quiet)
3335
+ return self.model_instance_version_download(model_instance_version,
3336
+ path=path,
3337
+ untar=untar,
3338
+ force=force,
3339
+ quiet=quiet)
3297
3340
 
3298
3341
  def model_instance_version_delete(self, model_instance_version, yes):
3299
3342
  """ call to delete a model instance version from the API
@@ -3517,6 +3560,9 @@ class KaggleApi(KaggleApi):
3517
3560
  'Version, please consider updating (server ' +
3518
3561
  api_version + ' / client ' + self.__version__ + ')')
3519
3562
  self.already_printed_version_warning = True
3563
+ if isinstance(data,
3564
+ dict) and 'code' in data and data['code'] != 200:
3565
+ raise Exception(data['message'])
3520
3566
  return data
3521
3567
  return result
3522
3568
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -199,7 +199,7 @@ class DatasetNewRequest(object):
199
199
  :param license_name: The license_name of this DatasetNewRequest. # noqa: E501
200
200
  :type: str
201
201
  """
202
- allowed_values = ["CC0-1.0", "CC-BY-SA-4.0", "GPL-2.0", "ODbL-1.0", "CC-BY-NC-SA-4.0", "unknown", "DbCL-1.0", "CC-BY-SA-3.0", "copyright-authors", "other", "reddit-api", "world-bank", "CC-BY-4.0", "CC-BY-NC-4.0", "PDDL", "CC-BY-3.0", "CC-BY-3.0-IGO", "US-Government-Works", "CC-BY-NC-SA-3.0-IGO", "CDLA-Permissive-1.0", "CDLA-Sharing-1.0", "CC-BY-ND-4.0", "CC-BY-NC-ND-4.0", "ODC-BY-1.0", "LGPL-3.0", "AGPL-3.0", "FDL-1.3", "EU-ODP-Legal-Notice", "apache-2.0"] # noqa: E501
202
+ allowed_values = ["CC0-1.0", "CC-BY-SA-4.0", "GPL-2.0", "ODbL-1.0", "CC-BY-NC-SA-4.0", "unknown", "DbCL-1.0", "CC-BY-SA-3.0", "copyright-authors", "other", "reddit-api", "world-bank", "CC-BY-4.0", "CC-BY-NC-4.0", "PDDL", "CC-BY-3.0", "CC-BY-3.0-IGO", "US-Government-Works", "CC-BY-NC-SA-3.0-IGO", "CDLA-Permissive-1.0", "CDLA-Sharing-1.0", "CC-BY-ND-4.0", "CC-BY-NC-ND-4.0", "ODC-BY-1.0", "LGPL-3.0", "AGPL-3.0", "FDL-1.3", "EU-ODP-Legal-Notice", "apache-2.0", "GPL-3.0"] # noqa: E501
203
203
  if license_name not in allowed_values:
204
204
  raise ValueError(
205
205
  "Invalid value for `license_name` ({0}), must be one of {1}" # noqa: E501
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ class License(object):
84
84
  """
85
85
  if name is None:
86
86
  raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
87
- allowed_values = ["CC0-1.0", "CC-BY-SA-4.0", "GPL-2.0", "ODbL-1.0", "CC-BY-NC-SA-4.0", "unknown", "DbCL-1.0", "CC-BY-SA-3.0", "copyright-authors", "other", "reddit-api", "world-bank", "CC-BY-4.0", "CC-BY-NC-4.0", "PDDL", "CC-BY-3.0", "CC-BY-3.0-IGO", "US-Government-Works", "CC-BY-NC-SA-3.0-IGO", "CDLA-Permissive-1.0", "CDLA-Sharing-1.0", "CC-BY-ND-4.0", "CC-BY-NC-ND-4.0", "ODC-BY-1.0", "LGPL-3.0", "AGPL-3.0", "FDL-1.3", "EU-ODP-Legal-Notice", "apache-2.0"] # noqa: E501
87
+ allowed_values = ["CC0-1.0", "CC-BY-SA-4.0", "GPL-2.0", "ODbL-1.0", "CC-BY-NC-SA-4.0", "unknown", "DbCL-1.0", "CC-BY-SA-3.0", "copyright-authors", "other", "reddit-api", "world-bank", "CC-BY-4.0", "CC-BY-NC-4.0", "PDDL", "CC-BY-3.0", "CC-BY-3.0-IGO", "US-Government-Works", "CC-BY-NC-SA-3.0-IGO", "CDLA-Permissive-1.0", "CDLA-Sharing-1.0", "CC-BY-ND-4.0", "CC-BY-NC-ND-4.0", "ODC-BY-1.0", "LGPL-3.0", "AGPL-3.0", "FDL-1.3", "EU-ODP-Legal-Notice", "apache-2.0", "GPL-3.0"] # noqa: E501
88
88
  if name not in allowed_values:
89
89
  raise ValueError(
90
90
  "Invalid value for `name` ({0}), must be one of {1}" # noqa: E501
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -52,6 +52,9 @@ class ModelInstanceUpdateRequest(object):
52
52
  'license_name': 'str',
53
53
  'fine_tunable': 'bool',
54
54
  'training_data': 'list[str]',
55
+ 'model_instance_type': 'str',
56
+ 'base_model_instance': 'str',
57
+ 'external_base_model_url': 'int',
55
58
  'update_mask': 'str'
56
59
  }
57
60
 
@@ -61,10 +64,13 @@ class ModelInstanceUpdateRequest(object):
61
64
  'license_name': 'licenseName',
62
65
  'fine_tunable': 'fineTunable',
63
66
  'training_data': 'trainingData',
67
+ 'model_instance_type': 'modelInstanceType',
68
+ 'base_model_instance': 'baseModelInstance',
69
+ 'external_base_model_url': 'externalBaseModelUrl',
64
70
  'update_mask': 'updateMask'
65
71
  }
66
72
 
67
- def __init__(self, overview=None, usage=None, license_name='Apache 2.0', fine_tunable=True, training_data=None, update_mask=None): # noqa: E501
73
+ def __init__(self, overview=None, usage=None, license_name='Apache 2.0', fine_tunable=True, training_data=None, model_instance_type=None, base_model_instance=None, external_base_model_url=None, update_mask=None): # noqa: E501
68
74
  """ModelInstanceUpdateRequest - a model defined in Swagger""" # noqa: E501
69
75
 
70
76
  self._overview = None
@@ -72,6 +78,9 @@ class ModelInstanceUpdateRequest(object):
72
78
  self._license_name = None
73
79
  self._fine_tunable = None
74
80
  self._training_data = None
81
+ self._model_instance_type = None
82
+ self._base_model_instance = None
83
+ self._external_base_model_url = None
75
84
  self._update_mask = None
76
85
  self.discriminator = None
77
86
 
@@ -85,6 +94,12 @@ class ModelInstanceUpdateRequest(object):
85
94
  self.fine_tunable = fine_tunable
86
95
  if training_data is not None:
87
96
  self.training_data = training_data
97
+ if model_instance_type is not None:
98
+ self.model_instance_type = model_instance_type
99
+ if base_model_instance is not None:
100
+ self.base_model_instance = base_model_instance
101
+ if external_base_model_url is not None:
102
+ self.external_base_model_url = external_base_model_url
88
103
  self.update_mask = update_mask
89
104
 
90
105
  @property
@@ -137,7 +152,7 @@ class ModelInstanceUpdateRequest(object):
137
152
  def license_name(self):
138
153
  """Gets the license_name of this ModelInstanceUpdateRequest. # noqa: E501
139
154
 
140
- The license that should be associated with the model # noqa: E501
155
+ The license that should be associated with the model instance # noqa: E501
141
156
 
142
157
  :return: The license_name of this ModelInstanceUpdateRequest. # noqa: E501
143
158
  :rtype: str
@@ -148,12 +163,12 @@ class ModelInstanceUpdateRequest(object):
148
163
  def license_name(self, license_name):
149
164
  """Sets the license_name of this ModelInstanceUpdateRequest.
150
165
 
151
- The license that should be associated with the model # noqa: E501
166
+ The license that should be associated with the model instance # noqa: E501
152
167
 
153
168
  :param license_name: The license_name of this ModelInstanceUpdateRequest. # noqa: E501
154
169
  :type: str
155
170
  """
156
- allowed_values = ["CC BY-NC-SA 4.0", "CC BY-SA 4.0", "GPL 2", "CC BY-SA 3.0", "Attribution 4.0 International (CC BY 4.0)", "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", "ODC Public Domain Dedication and Licence (PDDL)", "Attribution 3.0 Unported (CC BY 3.0)", "Attribution 3.0 IGO (CC BY 3.0 IGO)", "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)", "Community Data License Agreement - Permissive - Version 1.0", "Community Data License Agreement - Sharing - Version 1.0", "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", "ODC Attribution License (ODC-By)", "GNU Lesser General Public License 3.0", "GNU Affero General Public License 3.0", "GNU Free Documentation License 1.3", "Apache 2.0", "MIT", "BSD-3-Clause"] # noqa: E501
171
+ allowed_values = ["CC BY-NC-SA 4.0", "CC BY-SA 4.0", "GPL 2", "CC BY-SA 3.0", "Attribution 4.0 International (CC BY 4.0)", "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", "ODC Public Domain Dedication and Licence (PDDL)", "Attribution 3.0 Unported (CC BY 3.0)", "Attribution 3.0 IGO (CC BY 3.0 IGO)", "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)", "Community Data License Agreement - Permissive - Version 1.0", "Community Data License Agreement - Sharing - Version 1.0", "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", "ODC Attribution License (ODC-By)", "GNU Lesser General Public License 3.0", "GNU Affero General Public License 3.0", "GNU Free Documentation License 1.3", "Apache 2.0", "MIT", "BSD-3-Clause", "GPL 3"] # noqa: E501
157
172
  if license_name not in allowed_values:
158
173
  raise ValueError(
159
174
  "Invalid value for `license_name` ({0}), must be one of {1}" # noqa: E501
@@ -208,6 +223,81 @@ class ModelInstanceUpdateRequest(object):
208
223
 
209
224
  self._training_data = training_data
210
225
 
226
+ @property
227
+ def model_instance_type(self):
228
+ """Gets the model_instance_type of this ModelInstanceUpdateRequest. # noqa: E501
229
+
230
+ Whether the model instance is a base model, external variant, internal variant, or unspecified # noqa: E501
231
+
232
+ :return: The model_instance_type of this ModelInstanceUpdateRequest. # noqa: E501
233
+ :rtype: str
234
+ """
235
+ return self._model_instance_type
236
+
237
+ @model_instance_type.setter
238
+ def model_instance_type(self, model_instance_type):
239
+ """Sets the model_instance_type of this ModelInstanceUpdateRequest.
240
+
241
+ Whether the model instance is a base model, external variant, internal variant, or unspecified # noqa: E501
242
+
243
+ :param model_instance_type: The model_instance_type of this ModelInstanceUpdateRequest. # noqa: E501
244
+ :type: str
245
+ """
246
+ allowed_values = ["Unspecified", "BaseModel", "KaggleVariant", "ExternalVariant"] # noqa: E501
247
+ if model_instance_type not in allowed_values:
248
+ raise ValueError(
249
+ "Invalid value for `model_instance_type` ({0}), must be one of {1}" # noqa: E501
250
+ .format(model_instance_type, allowed_values)
251
+ )
252
+
253
+ self._model_instance_type = model_instance_type
254
+
255
+ @property
256
+ def base_model_instance(self):
257
+ """Gets the base_model_instance of this ModelInstanceUpdateRequest. # noqa: E501
258
+
259
+ If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance # noqa: E501
260
+
261
+ :return: The base_model_instance of this ModelInstanceUpdateRequest. # noqa: E501
262
+ :rtype: str
263
+ """
264
+ return self._base_model_instance
265
+
266
+ @base_model_instance.setter
267
+ def base_model_instance(self, base_model_instance):
268
+ """Sets the base_model_instance of this ModelInstanceUpdateRequest.
269
+
270
+ If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance # noqa: E501
271
+
272
+ :param base_model_instance: The base_model_instance of this ModelInstanceUpdateRequest. # noqa: E501
273
+ :type: str
274
+ """
275
+
276
+ self._base_model_instance = base_model_instance
277
+
278
+ @property
279
+ def external_base_model_url(self):
280
+ """Gets the external_base_model_url of this ModelInstanceUpdateRequest. # noqa: E501
281
+
282
+ If this is an external variant, a URL to the base model # noqa: E501
283
+
284
+ :return: The external_base_model_url of this ModelInstanceUpdateRequest. # noqa: E501
285
+ :rtype: int
286
+ """
287
+ return self._external_base_model_url
288
+
289
+ @external_base_model_url.setter
290
+ def external_base_model_url(self, external_base_model_url):
291
+ """Sets the external_base_model_url of this ModelInstanceUpdateRequest.
292
+
293
+ If this is an external variant, a URL to the base model # noqa: E501
294
+
295
+ :param external_base_model_url: The external_base_model_url of this ModelInstanceUpdateRequest. # noqa: E501
296
+ :type: int
297
+ """
298
+
299
+ self._external_base_model_url = external_base_model_url
300
+
211
301
  @property
212
302
  def update_mask(self):
213
303
  """Gets the update_mask of this ModelInstanceUpdateRequest. # noqa: E501
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -56,6 +56,9 @@ class ModelNewInstanceRequest(object):
56
56
  'license_name': 'str',
57
57
  'fine_tunable': 'bool',
58
58
  'training_data': 'list[str]',
59
+ 'model_instance_type': 'str',
60
+ 'base_model_instance': 'str',
61
+ 'external_base_model_url': 'int',
59
62
  'files': 'list[UploadFile]'
60
63
  }
61
64
 
@@ -67,10 +70,13 @@ class ModelNewInstanceRequest(object):
67
70
  'license_name': 'licenseName',
68
71
  'fine_tunable': 'fineTunable',
69
72
  'training_data': 'trainingData',
73
+ 'model_instance_type': 'modelInstanceType',
74
+ 'base_model_instance': 'baseModelInstance',
75
+ 'external_base_model_url': 'externalBaseModelUrl',
70
76
  'files': 'files'
71
77
  }
72
78
 
73
- def __init__(self, instance_slug=None, framework=None, overview=None, usage=None, license_name='Apache 2.0', fine_tunable=True, training_data=None, files=None): # noqa: E501
79
+ def __init__(self, instance_slug=None, framework=None, overview=None, usage=None, license_name='Apache 2.0', fine_tunable=True, training_data=None, model_instance_type=None, base_model_instance=None, external_base_model_url=None, files=None): # noqa: E501
74
80
  """ModelNewInstanceRequest - a model defined in Swagger""" # noqa: E501
75
81
 
76
82
  self._instance_slug = None
@@ -80,6 +86,9 @@ class ModelNewInstanceRequest(object):
80
86
  self._license_name = None
81
87
  self._fine_tunable = None
82
88
  self._training_data = None
89
+ self._model_instance_type = None
90
+ self._base_model_instance = None
91
+ self._external_base_model_url = None
83
92
  self._files = None
84
93
  self.discriminator = None
85
94
 
@@ -94,6 +103,12 @@ class ModelNewInstanceRequest(object):
94
103
  self.fine_tunable = fine_tunable
95
104
  if training_data is not None:
96
105
  self.training_data = training_data
106
+ if model_instance_type is not None:
107
+ self.model_instance_type = model_instance_type
108
+ if base_model_instance is not None:
109
+ self.base_model_instance = base_model_instance
110
+ if external_base_model_url is not None:
111
+ self.external_base_model_url = external_base_model_url
97
112
  if files is not None:
98
113
  self.files = files
99
114
 
@@ -203,7 +218,7 @@ class ModelNewInstanceRequest(object):
203
218
  def license_name(self):
204
219
  """Gets the license_name of this ModelNewInstanceRequest. # noqa: E501
205
220
 
206
- The license that should be associated with the model # noqa: E501
221
+ The license that should be associated with the model instance # noqa: E501
207
222
 
208
223
  :return: The license_name of this ModelNewInstanceRequest. # noqa: E501
209
224
  :rtype: str
@@ -214,14 +229,14 @@ class ModelNewInstanceRequest(object):
214
229
  def license_name(self, license_name):
215
230
  """Sets the license_name of this ModelNewInstanceRequest.
216
231
 
217
- The license that should be associated with the model # noqa: E501
232
+ The license that should be associated with the model instance # noqa: E501
218
233
 
219
234
  :param license_name: The license_name of this ModelNewInstanceRequest. # noqa: E501
220
235
  :type: str
221
236
  """
222
237
  if license_name is None:
223
238
  raise ValueError("Invalid value for `license_name`, must not be `None`") # noqa: E501
224
- allowed_values = ["CC BY-NC-SA 4.0", "CC BY-SA 4.0", "GPL 2", "CC BY-SA 3.0", "Attribution 4.0 International (CC BY 4.0)", "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", "ODC Public Domain Dedication and Licence (PDDL)", "Attribution 3.0 Unported (CC BY 3.0)", "Attribution 3.0 IGO (CC BY 3.0 IGO)", "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)", "Community Data License Agreement - Permissive - Version 1.0", "Community Data License Agreement - Sharing - Version 1.0", "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", "ODC Attribution License (ODC-By)", "GNU Lesser General Public License 3.0", "GNU Affero General Public License 3.0", "GNU Free Documentation License 1.3", "Apache 2.0", "MIT", "BSD-3-Clause"] # noqa: E501
239
+ allowed_values = ["CC BY-NC-SA 4.0", "CC BY-SA 4.0", "GPL 2", "CC BY-SA 3.0", "Attribution 4.0 International (CC BY 4.0)", "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", "ODC Public Domain Dedication and Licence (PDDL)", "Attribution 3.0 Unported (CC BY 3.0)", "Attribution 3.0 IGO (CC BY 3.0 IGO)", "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)", "Community Data License Agreement - Permissive - Version 1.0", "Community Data License Agreement - Sharing - Version 1.0", "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", "ODC Attribution License (ODC-By)", "GNU Lesser General Public License 3.0", "GNU Affero General Public License 3.0", "GNU Free Documentation License 1.3", "Apache 2.0", "MIT", "BSD-3-Clause", "GPL 3"] # noqa: E501
225
240
  if license_name not in allowed_values:
226
241
  raise ValueError(
227
242
  "Invalid value for `license_name` ({0}), must be one of {1}" # noqa: E501
@@ -276,6 +291,81 @@ class ModelNewInstanceRequest(object):
276
291
 
277
292
  self._training_data = training_data
278
293
 
294
+ @property
295
+ def model_instance_type(self):
296
+ """Gets the model_instance_type of this ModelNewInstanceRequest. # noqa: E501
297
+
298
+ Whether the model instance is a base model, external variant, internal variant, or unspecified # noqa: E501
299
+
300
+ :return: The model_instance_type of this ModelNewInstanceRequest. # noqa: E501
301
+ :rtype: str
302
+ """
303
+ return self._model_instance_type
304
+
305
+ @model_instance_type.setter
306
+ def model_instance_type(self, model_instance_type):
307
+ """Sets the model_instance_type of this ModelNewInstanceRequest.
308
+
309
+ Whether the model instance is a base model, external variant, internal variant, or unspecified # noqa: E501
310
+
311
+ :param model_instance_type: The model_instance_type of this ModelNewInstanceRequest. # noqa: E501
312
+ :type: str
313
+ """
314
+ allowed_values = ["Unspecified", "BaseModel", "KaggleVariant", "ExternalVariant"] # noqa: E501
315
+ if model_instance_type not in allowed_values:
316
+ raise ValueError(
317
+ "Invalid value for `model_instance_type` ({0}), must be one of {1}" # noqa: E501
318
+ .format(model_instance_type, allowed_values)
319
+ )
320
+
321
+ self._model_instance_type = model_instance_type
322
+
323
+ @property
324
+ def base_model_instance(self):
325
+ """Gets the base_model_instance of this ModelNewInstanceRequest. # noqa: E501
326
+
327
+ If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance # noqa: E501
328
+
329
+ :return: The base_model_instance of this ModelNewInstanceRequest. # noqa: E501
330
+ :rtype: str
331
+ """
332
+ return self._base_model_instance
333
+
334
+ @base_model_instance.setter
335
+ def base_model_instance(self, base_model_instance):
336
+ """Sets the base_model_instance of this ModelNewInstanceRequest.
337
+
338
+ If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance # noqa: E501
339
+
340
+ :param base_model_instance: The base_model_instance of this ModelNewInstanceRequest. # noqa: E501
341
+ :type: str
342
+ """
343
+
344
+ self._base_model_instance = base_model_instance
345
+
346
+ @property
347
+ def external_base_model_url(self):
348
+ """Gets the external_base_model_url of this ModelNewInstanceRequest. # noqa: E501
349
+
350
+ If this is an external variant, a URL to the base model # noqa: E501
351
+
352
+ :return: The external_base_model_url of this ModelNewInstanceRequest. # noqa: E501
353
+ :rtype: int
354
+ """
355
+ return self._external_base_model_url
356
+
357
+ @external_base_model_url.setter
358
+ def external_base_model_url(self, external_base_model_url):
359
+ """Sets the external_base_model_url of this ModelNewInstanceRequest.
360
+
361
+ If this is an external variant, a URL to the base model # noqa: E501
362
+
363
+ :param external_base_model_url: The external_base_model_url of this ModelNewInstanceRequest. # noqa: E501
364
+ :type: int
365
+ """
366
+
367
+ self._external_base_model_url = external_base_model_url
368
+
279
369
  @property
280
370
  def files(self):
281
371
  """Gets the files of this ModelNewInstanceRequest. # noqa: E501
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaggle
3
- Version: 1.6.0a5
3
+ Version: 1.6.1
4
4
  Summary: Kaggle API
5
5
  Home-page: https://github.com/Kaggle/kaggle-api
6
6
  Author: Kaggle
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/python
2
2
  #
3
- # Copyright 2023 Kaggle Inc
3
+ # Copyright 2024 Kaggle Inc
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@ from setuptools import setup, find_packages
19
19
 
20
20
  setup(
21
21
  name='kaggle',
22
- version='1.6.0a5',
22
+ version='1.6.1',
23
23
  description='Kaggle API',
24
24
  long_description=
25
25
  ('Official API for https://www.kaggle.com, accessible using a command line '
File without changes
File without changes
File without changes
File without changes