torch-rb 0.14.0 → 0.14.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 844ea56ce58c08b3c2fc3b93d39755cedfc1ded9ac60a8e88ebdd252979032c2
4
- data.tar.gz: fe0fb4f66a541412e0af073c149e101dc8d0d3d5855b96fc2ee42d864a18866d
3
+ metadata.gz: 998c7844d24482a76c6bb1a7a60c508bc4f2946688d7a4a3801a9c832bf54379
4
+ data.tar.gz: 2cdd9b8832159282976a5c8c44098fa1c8501b54cc4e499e908aaf3d9016061e
5
5
  SHA512:
6
- metadata.gz: 4828aad90774777a00cc552ea0c524a4b3a810cc501727f91e5efc14242027b73da226c80bbc67bd48bfa8e826c2103997b5f1787b93fb588493f1290f1b0d12
7
- data.tar.gz: 4721a8c989af6decd7599c802fa2a89214332f924928cb8a138e70744d5cb7198355a1839d584580864e3b299c53d7d54f4984d349885b9f1b916734a12bc219
6
+ metadata.gz: d5f536c8d0ce11a2a885c74e4a99211bff50716f80e1e9da69040f7899ca02a6a6e663e085188e89f1e85238893dafa1552422dbb844144f08c3a56a44084bc4
7
+ data.tar.gz: 455a356eb60204a02d6fab0041b5fd1ad9ac26e8eefcb383be42dd5a0d4c026586d5c46749e919c0f471708e897265f48c37b5683e86b86d225f957acd6a7049
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.14.1 (2023-12-26)
2
+
3
+ - Fixed default arguments for `conv1d`
4
+
1
5
  ## 0.14.0 (2023-11-09)
2
6
 
3
7
  - Updated LibTorch to 2.1.0
@@ -401,7 +401,7 @@ void FunctionParameter::set_default_str(const std::string& str) {
401
401
  if (str != "None") {
402
402
  throw std::runtime_error("default value for Tensor must be none, got: " + str);
403
403
  }
404
- } else if (type_ == ParameterType::INT64) {
404
+ } else if (type_ == ParameterType::INT64 || type_ == ParameterType::SYM_INT) {
405
405
  default_int = atol(str.c_str());
406
406
  } else if (type_ == ParameterType::BOOL) {
407
407
  default_bool = (str == "True" || str == "true");
@@ -417,7 +417,7 @@ void FunctionParameter::set_default_str(const std::string& str) {
417
417
  default_scalar = as_integer.has_value() ? at::Scalar(as_integer.value()) :
418
418
  at::Scalar(atof(str.c_str()));
419
419
  }
420
- } else if (type_ == ParameterType::INT_LIST) {
420
+ } else if (type_ == ParameterType::INT_LIST || type_ == ParameterType::SYM_INT_LIST) {
421
421
  if (str != "None") {
422
422
  default_intlist = parse_intlist_args(str, size);
423
423
  }
@@ -452,6 +452,31 @@ void FunctionParameter::set_default_str(const std::string& str) {
452
452
  default_string = parse_string_literal(str);
453
453
  }
454
454
  }
455
+ // These types weren't handled here before. Adding a default error
456
+ // led to a lot of test failures so adding this skip for now.
457
+ // We should correctly handle these though because it might be causing
458
+ // silent failures.
459
+ else if (type_ == ParameterType::TENSOR_LIST) {
460
+ // throw std::runtime_error("Invalid Tensor List");
461
+ } else if (type_ == ParameterType::GENERATOR) {
462
+ // throw std::runtime_error("ParameterType::GENERATOR");
463
+ } else if (type_ == ParameterType::PYOBJECT) {
464
+ // throw std::runtime_error("ParameterType::PYOBJECT");
465
+ } else if (type_ == ParameterType::MEMORY_FORMAT) {
466
+ // throw std::runtime_error("ParameterType::MEMORY_FORMAT");
467
+ } else if (type_ == ParameterType::DIMNAME) {
468
+ // throw std::runtime_error("ParameterType::DIMNAME");
469
+ } else if (type_ == ParameterType::DIMNAME_LIST) {
470
+ // throw std::runtime_error("ParameterType::DIMNAME_LIST");
471
+ } else if (type_ == ParameterType::SCALAR_LIST) {
472
+ // throw std::runtime_error("ParameterType::SCALAR_LIST");
473
+ } else if (type_ == ParameterType::STORAGE) {
474
+ // throw std::runtime_error("ParameterType::STORAGE");
475
+ } else if (type_ == ParameterType::QSCHEME) {
476
+ // throw std::runtime_error("ParameterType::QSCHEME");
477
+ } else {
478
+ throw std::runtime_error("unknown parameter type");
479
+ }
455
480
  }
456
481
 
457
482
  FunctionSignature::FunctionSignature(const std::string& fmt, int index)
data/lib/torch/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Torch
2
- VERSION = "0.14.0"
2
+ VERSION = "0.14.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torch-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-09 00:00:00.000000000 Z
11
+ date: 2023-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: '0'
239
239
  requirements: []
240
- rubygems_version: 3.4.10
240
+ rubygems_version: 3.5.3
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: Deep learning for Ruby, powered by LibTorch